mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-02 13:23:10 +00:00
* Statis L2 Linea test deployment * Fix config when private key is empty * Remove circuit files
2296 lines
236 KiB
JSON
2296 lines
236 KiB
JSON
{
|
|
"address": "0x34F606C65869277f236ce07aBe9af0B8c88F486B",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "repairRewardPercentage",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "maxNumberOfSlashes",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "slashPercentage",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "validatorRewardPercentage",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct CollateralConfig",
|
|
"name": "collateral",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "period",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "timeout",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "downtime",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "downtimeProduct",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "zkeyHash",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"internalType": "struct ProofConfig",
|
|
"name": "proofs",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "maxReservations",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct SlotReservationsConfig",
|
|
"name": "reservations",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "requestDurationLimit",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct MarketplaceConfig",
|
|
"name": "config",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "token_",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "contract IGroth16Verifier",
|
|
"name": "verifier",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_AlreadyPaid",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_DurationExceedsLimit",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InsufficientCollateral",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InsufficientDuration",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InsufficientProofProbability",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InsufficientReward",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InsufficientSlots",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidCid",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidClientAddress",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidExpiry",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidMaxSlotLoss",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidSlot",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidSlotHost",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_InvalidState",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_MaximumSlashingTooHigh",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_NothingToWithdraw",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_RepairRewardPercentageTooHigh",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_RequestAlreadyExists",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_ReservationRequired",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_SlashPercentageTooHigh",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_SlotIsFree",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_SlotNotAcceptingProofs",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_SlotNotFree",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_StartNotBeforeExpiry",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_TransferFailed",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Marketplace_UnknownRequest",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Periods_InvalidSecondsPerPeriod",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_InsufficientBlockHeight",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_InvalidProof",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_PeriodNotEnded",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_ProofAlreadyMarkedMissing",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_ProofAlreadySubmitted",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_ProofNotMissing",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_ProofNotRequired",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "Proofs_ValidationTimedOut",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "SlotReservations_ReservationNotAllowed",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ProofSubmitted",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "RequestCancelled",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "RequestFailed",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "RequestFulfilled",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "SlotFilled",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "SlotFreed",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "SlotReservationsFull",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "proofProbability",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "pricePerBytePerSecond",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "collateralPerByte",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slots",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotSize",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "duration",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "maxSlotLoss",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"indexed": false,
|
|
"internalType": "struct Ask",
|
|
"name": "ask",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint64",
|
|
"name": "expiry",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "StorageRequested",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "canReserveSlot",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "configuration",
|
|
"outputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "repairRewardPercentage",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "maxNumberOfSlashes",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "slashPercentage",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "validatorRewardPercentage",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct CollateralConfig",
|
|
"name": "collateral",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "period",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "timeout",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "downtime",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "downtimeProduct",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "zkeyHash",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"internalType": "struct ProofConfig",
|
|
"name": "proofs",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "maxReservations",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct SlotReservationsConfig",
|
|
"name": "reservations",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "requestDurationLimit",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct MarketplaceConfig",
|
|
"name": "",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "currentCollateral",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "x",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "y",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct G1Point",
|
|
"name": "a",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "real",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "imag",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct Fp2Element",
|
|
"name": "x",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "real",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "imag",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct Fp2Element",
|
|
"name": "y",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"internalType": "struct G2Point",
|
|
"name": "b",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "x",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "y",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct G1Point",
|
|
"name": "c",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"internalType": "struct Groth16Proof",
|
|
"name": "proof",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "fillSlot",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "rewardRecipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "collateralRecipient",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "freeSlot",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "freeSlot",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getActiveSlot",
|
|
"outputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "client",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "proofProbability",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "pricePerBytePerSecond",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "collateralPerByte",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slots",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotSize",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "duration",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "maxSlotLoss",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct Ask",
|
|
"name": "ask",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "cid",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "merkleRoot",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Content",
|
|
"name": "content",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "expiry",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "nonce",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Request",
|
|
"name": "request",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct Marketplace.ActiveSlot",
|
|
"name": "",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getChallenge",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getHost",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getPointer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getRequest",
|
|
"outputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "client",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "proofProbability",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "pricePerBytePerSecond",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "collateralPerByte",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slots",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotSize",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "duration",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "maxSlotLoss",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct Ask",
|
|
"name": "ask",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "cid",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "merkleRoot",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Content",
|
|
"name": "content",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "expiry",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "nonce",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Request",
|
|
"name": "",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "isProofRequired",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "Periods.Period",
|
|
"name": "period",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "markProofAsMissing",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "missingProofs",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "myRequests",
|
|
"outputs": [
|
|
{
|
|
"internalType": "RequestId[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "mySlots",
|
|
"outputs": [
|
|
{
|
|
"internalType": "SlotId[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "requestEnd",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "requestExpiry",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "requestState",
|
|
"outputs": [
|
|
{
|
|
"internalType": "enum RequestState",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "client",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "proofProbability",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "pricePerBytePerSecond",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "collateralPerByte",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slots",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotSize",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "duration",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "maxSlotLoss",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"internalType": "struct Ask",
|
|
"name": "ask",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "cid",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "merkleRoot",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Content",
|
|
"name": "content",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "expiry",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "nonce",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct Request",
|
|
"name": "request",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "requestStorage",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint64",
|
|
"name": "slotIndex",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"name": "reserveSlot",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "slotProbability",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "slotId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "slotState",
|
|
"outputs": [
|
|
{
|
|
"internalType": "enum SlotState",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "x",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "y",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct G1Point",
|
|
"name": "a",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "real",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "imag",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct Fp2Element",
|
|
"name": "x",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "real",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "imag",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct Fp2Element",
|
|
"name": "y",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"internalType": "struct G2Point",
|
|
"name": "b",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "x",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "y",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct G1Point",
|
|
"name": "c",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"internalType": "struct Groth16Proof",
|
|
"name": "proof",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "submitProof",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "token",
|
|
"outputs": [
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "SlotId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "willProofBeRequired",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "withdrawFunds",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "RequestId",
|
|
"name": "requestId",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "withdrawRecipient",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "withdrawFunds",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"transactionHash": "0x7fb9a6221316c917217d63a1ef44c3d0726a43b869f1743818e57dfaa7255005",
|
|
"receipt": {
|
|
"to": null,
|
|
"from": "0xC3B5023e9d6522f9A8B0E187EB324C8341E5C9cf",
|
|
"contractAddress": "0x34F606C65869277f236ce07aBe9af0B8c88F486B",
|
|
"transactionIndex": 1,
|
|
"gasUsed": "4267896",
|
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
"blockHash": "0x31baee527a534a9a93dcfd9a62855e7402b589979fa00fc0bd02b1b7f5271ae9",
|
|
"transactionHash": "0x7fb9a6221316c917217d63a1ef44c3d0726a43b869f1743818e57dfaa7255005",
|
|
"logs": [],
|
|
"blockNumber": 2001331,
|
|
"cumulativeGasUsed": "4288896",
|
|
"status": 1,
|
|
"byzantium": true
|
|
},
|
|
"args": [
|
|
{
|
|
"collateral": {
|
|
"repairRewardPercentage": 10,
|
|
"maxNumberOfSlashes": 2,
|
|
"slashPercentage": 20,
|
|
"validatorRewardPercentage": 20
|
|
},
|
|
"proofs": {
|
|
"period": 120,
|
|
"timeout": 30,
|
|
"downtime": 64,
|
|
"downtimeProduct": 67,
|
|
"zkeyHash": "754e3339afbb9260109b6dd3ab33a8136046cc45f525c790fbd385dcd8ad35de"
|
|
},
|
|
"reservations": {
|
|
"maxReservations": 3
|
|
},
|
|
"requestDurationLimit": 2592000
|
|
},
|
|
"0xe5C3daA5eeD91976d0997122f1B8688bFE4f3Af5",
|
|
"0xF119248ffe0a8A07Ff91301F83BFaE7c20456173"
|
|
],
|
|
"numDeployments": 3,
|
|
"solcInputHash": "38bc1dfa6eb605585a1d33e30c68e961",
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"repairRewardPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"maxNumberOfSlashes\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"slashPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"validatorRewardPercentage\",\"type\":\"uint8\"}],\"internalType\":\"struct CollateralConfig\",\"name\":\"collateral\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"downtime\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"downtimeProduct\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"zkeyHash\",\"type\":\"string\"}],\"internalType\":\"struct ProofConfig\",\"name\":\"proofs\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"maxReservations\",\"type\":\"uint8\"}],\"internalType\":\"struct SlotReservationsConfig\",\"name\":\"reservations\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"requestDurationLimit\",\"type\":\"uint64\"}],\"internalType\":\"struct MarketplaceConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"contract IERC20\",\"name\":\"token_\",\"type\":\"address\"},{\"internalType\":\"contract IGroth16Verifier\",\"name\":\"verifier\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Marketplace_AlreadyPaid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_DurationExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InsufficientCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InsufficientDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InsufficientProofProbability\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InsufficientReward\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InsufficientSlots\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidCid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidClientAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidMaxSlotLoss\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidSlot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidSlotHost\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_InvalidState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_MaximumSlashingTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_NothingToWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_RepairRewardPercentageTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_RequestAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_ReservationRequired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_SlashPercentageTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_SlotIsFree\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_SlotNotAcceptingProofs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_SlotNotFree\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_StartNotBeforeExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Marketplace_UnknownRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Periods_InvalidSecondsPerPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_InsufficientBlockHeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_PeriodNotEnded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_ProofAlreadyMarkedMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_ProofAlreadySubmitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_ProofNotMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_ProofNotRequired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Proofs_ValidationTimedOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SlotReservations_ReservationNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ProofSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"RequestCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"RequestFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"RequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"name\":\"SlotFilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"name\":\"SlotFreed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"name\":\"SlotReservationsFull\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"proofProbability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pricePerBytePerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralPerByte\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"slots\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"slotSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlotLoss\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Ask\",\"name\":\"ask\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"name\":\"StorageRequested\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"name\":\"canReserveSlot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"configuration\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"repairRewardPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"maxNumberOfSlashes\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"slashPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"validatorRewardPercentage\",\"type\":\"uint8\"}],\"internalType\":\"struct CollateralConfig\",\"name\":\"collateral\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"downtime\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"downtimeProduct\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"zkeyHash\",\"type\":\"string\"}],\"internalType\":\"struct ProofConfig\",\"name\":\"proofs\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"maxReservations\",\"type\":\"uint8\"}],\"internalType\":\"struct SlotReservationsConfig\",\"name\":\"reservations\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"requestDurationLimit\",\"type\":\"uint64\"}],\"internalType\":\"struct MarketplaceConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"currentCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"y\",\"type\":\"uint256\"}],\"internalType\":\"struct G1Point\",\"name\":\"a\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"real\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"imag\",\"type\":\"uint256\"}],\"internalType\":\"struct Fp2Element\",\"name\":\"x\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"real\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"imag\",\"type\":\"uint256\"}],\"internalType\":\"struct Fp2Element\",\"name\":\"y\",\"type\":\"tuple\"}],\"internalType\":\"struct G2Point\",\"name\":\"b\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"y\",\"type\":\"uint256\"}],\"internalType\":\"struct G1Point\",\"name\":\"c\",\"type\":\"tuple\"}],\"internalType\":\"struct Groth16Proof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"fillSlot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"rewardRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"collateralRecipient\",\"type\":\"address\"}],\"name\":\"freeSlot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"freeSlot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"getActiveSlot\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"proofProbability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pricePerBytePerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralPerByte\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"slots\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"slotSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlotLoss\",\"type\":\"uint64\"}],\"internalType\":\"struct Ask\",\"name\":\"ask\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"cid\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"struct Content\",\"name\":\"content\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"internalType\":\"struct Marketplace.ActiveSlot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getChallenge\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"getHost\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getPointer\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"getRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"proofProbability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pricePerBytePerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralPerByte\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"slots\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"slotSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlotLoss\",\"type\":\"uint64\"}],\"internalType\":\"struct Ask\",\"name\":\"ask\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"cid\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"struct Content\",\"name\":\"content\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"internalType\":\"struct Request\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"isProofRequired\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"},{\"internalType\":\"Periods.Period\",\"name\":\"period\",\"type\":\"uint64\"}],\"name\":\"markProofAsMissing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"missingProofs\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"myRequests\",\"outputs\":[{\"internalType\":\"RequestId[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mySlots\",\"outputs\":[{\"internalType\":\"SlotId[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"requestEnd\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"requestExpiry\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"requestState\",\"outputs\":[{\"internalType\":\"enum RequestState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"proofProbability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pricePerBytePerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralPerByte\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"slots\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"slotSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlotLoss\",\"type\":\"uint64\"}],\"internalType\":\"struct Ask\",\"name\":\"ask\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"cid\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"struct Content\",\"name\":\"content\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"requestStorage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"slotIndex\",\"type\":\"uint64\"}],\"name\":\"reserveSlot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"slotProbability\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"slotState\",\"outputs\":[{\"internalType\":\"enum SlotState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"y\",\"type\":\"uint256\"}],\"internalType\":\"struct G1Point\",\"name\":\"a\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"real\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"imag\",\"type\":\"uint256\"}],\"internalType\":\"struct Fp2Element\",\"name\":\"x\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"real\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"imag\",\"type\":\"uint256\"}],\"internalType\":\"struct Fp2Element\",\"name\":\"y\",\"type\":\"tuple\"}],\"internalType\":\"struct G2Point\",\"name\":\"b\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"y\",\"type\":\"uint256\"}],\"internalType\":\"struct G1Point\",\"name\":\"c\",\"type\":\"tuple\"}],\"internalType\":\"struct Groth16Proof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"submitProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"willProofBeRequired\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"withdrawRecipient\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"fillSlot(bytes32,uint64,((uint256,uint256),((uint256,uint256),(uint256,uint256)),(uint256,uint256)))\":{\"params\":{\"proof\":\"Groth16 proof procing possession of the slot data.\",\"requestId\":\"RequestId identifying the request containing the slot to fill.\",\"slotIndex\":\"Index of the slot in the request.\"}},\"freeSlot(bytes32)\":{\"details\":\"The host that filled the slot must have initiated the transaction (msg.sender). This overload allows `rewardRecipient` and `collateralRecipient` to be optional.\",\"params\":{\"slotId\":\"id of the slot to free\"}},\"freeSlot(bytes32,address,address)\":{\"params\":{\"collateralRecipient\":\"address to refund collateral to\",\"rewardRecipient\":\"address to send rewards to\",\"slotId\":\"id of the slot to free\"}},\"getChallenge(bytes32)\":{\"params\":{\"id\":\"Slot's ID for which the challenge should be calculated\"},\"returns\":{\"_0\":\"Challenge for current Period that should be used for generation of proofs\"}},\"getPointer(bytes32)\":{\"details\":\"For more information see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md)\",\"params\":{\"id\":\"Slot's ID for which the pointer should be calculated\"},\"returns\":{\"_0\":\"Uint8 pointer that is stable over current Period, ie an integer offset [0-255] of the last 256 blocks, pointing to a block that remains constant for the entire Period's duration.\"}},\"isProofRequired(bytes32)\":{\"params\":{\"id\":\"Slot's ID for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned.\"},\"returns\":{\"_0\":\"bool indicating if proof is required for current period\"}},\"missingProofs(bytes32)\":{\"returns\":{\"_0\":\"Number of missed proofs since Slot was Filled\"}},\"willProofBeRequired(bytes32)\":{\"details\":\"for more info about downtime see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md#pointer-downtime)\",\"params\":{\"id\":\"SlotId for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned.\"},\"returns\":{\"_0\":\"bool\"}},\"withdrawFunds(bytes32)\":{\"details\":\"Request must be cancelled, failed or finished, and the transaction must originate from the depositor address.\",\"params\":{\"requestId\":\"the id of the request\"}},\"withdrawFunds(bytes32,address)\":{\"details\":\"Request must be expired, must be in RequestState.New, and the transaction must originate from the depositer address.\",\"params\":{\"requestId\":\"the id of the request\",\"withdrawRecipient\":\"address to return the remaining funds to\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"fillSlot(bytes32,uint64,((uint256,uint256),((uint256,uint256),(uint256,uint256)),(uint256,uint256)))\":{\"notice\":\"Fills a slot. Reverts if an invalid proof of the slot data is provided.\"},\"freeSlot(bytes32)\":{\"notice\":\"Frees a slot, paying out rewards and returning collateral for finished or cancelled requests to the host that has filled the slot.\"},\"freeSlot(bytes32,address,address)\":{\"notice\":\"Frees a slot, paying out rewards and returning collateral for finished or cancelled requests.\"},\"willProofBeRequired(bytes32)\":{\"notice\":\"Proof Downtime specifies part of the Period when the proof is not required even if the proof should be required. This function returns true if the pointer is in downtime (hence no proof required now) and at the same time the proof will be required later on in the Period.\"},\"withdrawFunds(bytes32)\":{\"notice\":\"Withdraws remaining storage request funds back to the client that deposited them.\"},\"withdrawFunds(bytes32,address)\":{\"notice\":\"Withdraws storage request funds to the provided address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Marketplace.sol\":\"Marketplace\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xc3ff3f5c4584e1d9a483ad7ced51ab64523201f4e3d3c65293e4ca8aeb77a961\",\"license\":\"MIT\"},\"contracts/Configuration.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nstruct MarketplaceConfig {\\n CollateralConfig collateral;\\n ProofConfig proofs;\\n SlotReservationsConfig reservations;\\n uint64 requestDurationLimit;\\n}\\n\\nstruct CollateralConfig {\\n /// @dev percentage of collateral that is used as repair reward\\n uint8 repairRewardPercentage;\\n uint8 maxNumberOfSlashes; // frees slot when the number of slashing reaches this value\\n uint8 slashPercentage; // percentage of the collateral that is slashed\\n uint8 validatorRewardPercentage; // percentage of the slashed amount going to the validators\\n}\\n\\nstruct ProofConfig {\\n uint64 period; // proofs requirements are calculated per period (in seconds)\\n uint64 timeout; // mark proofs as missing before the timeout (in seconds)\\n uint8 downtime; // ignore this much recent blocks for proof requirements\\n // Ensures the pointer does not remain in downtime for many consecutive\\n // periods. For each period increase, move the pointer `pointerProduct`\\n // blocks. Should be a prime number to ensure there are no cycles.\\n uint8 downtimeProduct;\\n string zkeyHash; // hash of the zkey file which is linked to the verifier\\n}\\n\\nstruct SlotReservationsConfig {\\n // Number of allowed reservations per slot\\n uint8 maxReservations;\\n}\\n\",\"keccak256\":\"0x1d6cbbf7fff2b6807f29d46c8550a71b95c076b1136a30999c9578145174b36c\",\"license\":\"MIT\"},\"contracts/Endian.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\ncontract Endian {\\n /// reverses byte order to allow conversion between little endian and big\\n /// endian integers\\n function _byteSwap(bytes32 input) internal pure returns (bytes32 output) {\\n output = output | bytes1(input);\\n for (uint i = 1; i < 32; i++) {\\n output = output >> 8;\\n output = output | bytes1(input << (i * 8));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa721187e8bda9245ce16ad989fda5812874f2bf70ae4009bbeb0951c65ba6a2b\",\"license\":\"MIT\"},\"contracts/Groth16.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nstruct G1Point {\\n uint256 x;\\n uint256 y;\\n}\\n\\n// A field element F_{p^2} encoded as `real + i * imag`.\\n// We chose to not represent this as an array of 2 numbers, because both Circom\\n// and Ethereum EIP-197 encode to an array, but with conflicting encodings.\\nstruct Fp2Element {\\n uint256 real;\\n uint256 imag;\\n}\\n\\nstruct G2Point {\\n Fp2Element x;\\n Fp2Element y;\\n}\\n\\nstruct Groth16Proof {\\n G1Point a;\\n G2Point b;\\n G1Point c;\\n}\\n\\ninterface IGroth16Verifier {\\n function verify(\\n Groth16Proof calldata proof,\\n uint256[] calldata pubSignals\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x3694cd68f518dc4dfeb2f9a9d18f594b5511b110e129018348f21db25de1ed92\",\"license\":\"MIT\"},\"contracts/Marketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport \\\"./Configuration.sol\\\";\\nimport \\\"./Requests.sol\\\";\\nimport \\\"./Proofs.sol\\\";\\nimport \\\"./SlotReservations.sol\\\";\\nimport \\\"./StateRetrieval.sol\\\";\\nimport \\\"./Endian.sol\\\";\\nimport \\\"./Groth16.sol\\\";\\n\\ncontract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {\\n error Marketplace_RepairRewardPercentageTooHigh();\\n error Marketplace_SlashPercentageTooHigh();\\n error Marketplace_MaximumSlashingTooHigh();\\n error Marketplace_InvalidExpiry();\\n error Marketplace_InvalidMaxSlotLoss();\\n error Marketplace_InsufficientSlots();\\n error Marketplace_InsufficientDuration();\\n error Marketplace_InsufficientProofProbability();\\n error Marketplace_InsufficientCollateral();\\n error Marketplace_InsufficientReward();\\n error Marketplace_InvalidClientAddress();\\n error Marketplace_RequestAlreadyExists();\\n error Marketplace_InvalidSlot();\\n error Marketplace_InvalidCid();\\n error Marketplace_SlotNotFree();\\n error Marketplace_InvalidSlotHost();\\n error Marketplace_AlreadyPaid();\\n error Marketplace_TransferFailed();\\n error Marketplace_UnknownRequest();\\n error Marketplace_InvalidState();\\n error Marketplace_StartNotBeforeExpiry();\\n error Marketplace_SlotNotAcceptingProofs();\\n error Marketplace_SlotIsFree();\\n error Marketplace_ReservationRequired();\\n error Marketplace_NothingToWithdraw();\\n error Marketplace_DurationExceedsLimit();\\n\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using Requests for Request;\\n using AskHelpers for Ask;\\n\\n IERC20 private immutable _token;\\n MarketplaceConfig private _config;\\n\\n mapping(RequestId => Request) private _requests;\\n mapping(RequestId => RequestContext) internal _requestContexts;\\n mapping(SlotId => Slot) internal _slots;\\n\\n MarketplaceTotals internal _marketplaceTotals;\\n\\n struct RequestContext {\\n RequestState state;\\n /// @notice Tracks how much funds should be returned to the client as not all funds might be used for hosting the request\\n /// @dev The sum starts with the full reward amount for the request and is reduced every time a host fills a slot.\\n /// The reduction is calculated from the duration of time between the slot being filled and the request's end.\\n /// This is the amount that will be paid out to the host when the request successfully finishes.\\n /// @dev fundsToReturnToClient == 0 is used to signal that after request is terminated all the remaining funds were withdrawn.\\n /// This is possible, because technically it is not possible for this variable to reach 0 in \\\"natural\\\" way as\\n /// that would require all the slots to be filled at the same block as the request was created.\\n uint256 fundsToReturnToClient;\\n uint64 slotsFilled;\\n uint64 startedAt;\\n uint64 endsAt;\\n uint64 expiresAt;\\n }\\n\\n struct Slot {\\n SlotState state;\\n RequestId requestId;\\n /// @notice Timestamp that signals when slot was filled\\n /// @dev Used for calculating payouts as hosts are paid\\n /// based on time they actually host the content\\n uint64 filledAt;\\n uint64 slotIndex;\\n /// @notice Tracks the current amount of host's collateral that is\\n /// to be payed out at the end of Slot's lifespan.\\n /// @dev When Slot is filled, the collateral is collected in amount\\n /// of request.ask.collateralPerByte * request.ask.slotSize\\n /// (== request.ask.collateralPerSlot() when using the AskHelpers library)\\n /// @dev When Host is slashed for missing a proof the slashed amount is\\n /// reflected in this variable\\n uint256 currentCollateral;\\n /// @notice address used for collateral interactions and identifying hosts\\n address host;\\n }\\n\\n struct ActiveSlot {\\n Request request;\\n uint64 slotIndex;\\n }\\n\\n constructor(\\n MarketplaceConfig memory config,\\n IERC20 token_,\\n IGroth16Verifier verifier\\n ) SlotReservations(config.reservations) Proofs(config.proofs, verifier) {\\n _token = token_;\\n\\n if (config.collateral.repairRewardPercentage > 100)\\n revert Marketplace_RepairRewardPercentageTooHigh();\\n if (config.collateral.slashPercentage > 100)\\n revert Marketplace_SlashPercentageTooHigh();\\n\\n if (\\n config.collateral.maxNumberOfSlashes * config.collateral.slashPercentage >\\n 100\\n ) {\\n revert Marketplace_MaximumSlashingTooHigh();\\n }\\n _config = config;\\n }\\n\\n function configuration() public view returns (MarketplaceConfig memory) {\\n return _config;\\n }\\n\\n function token() public view returns (IERC20) {\\n return _token;\\n }\\n\\n function currentCollateral(SlotId slotId) public view returns (uint256) {\\n return _slots[slotId].currentCollateral;\\n }\\n\\n function requestStorage(Request calldata request) public {\\n RequestId id = request.id();\\n\\n if (request.client != msg.sender) revert Marketplace_InvalidClientAddress();\\n if (_requests[id].client != address(0)) {\\n revert Marketplace_RequestAlreadyExists();\\n }\\n if (request.expiry == 0 || request.expiry >= request.ask.duration)\\n revert Marketplace_InvalidExpiry();\\n if (request.ask.slots == 0) revert Marketplace_InsufficientSlots();\\n if (request.ask.maxSlotLoss > request.ask.slots)\\n revert Marketplace_InvalidMaxSlotLoss();\\n if (request.ask.duration == 0) {\\n revert Marketplace_InsufficientDuration();\\n }\\n if (request.ask.proofProbability == 0) {\\n revert Marketplace_InsufficientProofProbability();\\n }\\n if (request.ask.collateralPerByte == 0) {\\n revert Marketplace_InsufficientCollateral();\\n }\\n if (request.ask.pricePerBytePerSecond == 0) {\\n revert Marketplace_InsufficientReward();\\n }\\n if (bytes(request.content.cid).length == 0) {\\n revert Marketplace_InvalidCid();\\n }\\n if (request.ask.duration > _config.requestDurationLimit) {\\n revert Marketplace_DurationExceedsLimit();\\n }\\n\\n _requests[id] = request;\\n _requestContexts[id].endsAt =\\n uint64(block.timestamp) +\\n request.ask.duration;\\n _requestContexts[id].expiresAt = uint64(block.timestamp) + request.expiry;\\n\\n _addToMyRequests(request.client, id);\\n\\n uint256 amount = request.maxPrice();\\n _requestContexts[id].fundsToReturnToClient = amount;\\n _marketplaceTotals.received += amount;\\n _transferFrom(msg.sender, amount);\\n\\n emit StorageRequested(id, request.ask, _requestContexts[id].expiresAt);\\n }\\n\\n /**\\n * @notice Fills a slot. Reverts if an invalid proof of the slot data is\\n provided.\\n * @param requestId RequestId identifying the request containing the slot to\\n fill.\\n * @param slotIndex Index of the slot in the request.\\n * @param proof Groth16 proof procing possession of the slot data.\\n */\\n function fillSlot(\\n RequestId requestId,\\n uint64 slotIndex,\\n Groth16Proof calldata proof\\n ) public requestIsKnown(requestId) {\\n Request storage request = _requests[requestId];\\n if (slotIndex >= request.ask.slots) revert Marketplace_InvalidSlot();\\n\\n SlotId slotId = Requests.slotId(requestId, slotIndex);\\n\\n if (!_reservations[slotId].contains(msg.sender))\\n revert Marketplace_ReservationRequired();\\n\\n Slot storage slot = _slots[slotId];\\n slot.requestId = requestId;\\n slot.slotIndex = slotIndex;\\n RequestContext storage context = _requestContexts[requestId];\\n\\n if (\\n slotState(slotId) != SlotState.Free &&\\n slotState(slotId) != SlotState.Repair\\n ) {\\n revert Marketplace_SlotNotFree();\\n }\\n\\n _startRequiringProofs(slotId);\\n submitProof(slotId, proof);\\n\\n slot.host = msg.sender;\\n slot.filledAt = uint64(block.timestamp);\\n\\n context.slotsFilled += 1;\\n context.fundsToReturnToClient -= _slotPayout(requestId, slot.filledAt);\\n\\n // Collect collateral\\n uint256 collateralAmount;\\n uint256 collateralPerSlot = request.ask.collateralPerSlot();\\n if (slotState(slotId) == SlotState.Repair) {\\n // Host is repairing a slot and is entitled for repair reward, so he gets \\\"discounted collateral\\\"\\n // in this way he gets \\\"physically\\\" the reward at the end of the request when the full amount of collateral\\n // is returned to him.\\n collateralAmount =\\n collateralPerSlot -\\n ((collateralPerSlot * _config.collateral.repairRewardPercentage) / 100);\\n } else {\\n collateralAmount = collateralPerSlot;\\n }\\n _transferFrom(msg.sender, collateralAmount);\\n _marketplaceTotals.received += collateralAmount;\\n slot.currentCollateral = collateralPerSlot; // Even if he has collateral discounted, he is operating with full collateral\\n\\n _addToMySlots(slot.host, slotId);\\n\\n slot.state = SlotState.Filled;\\n emit SlotFilled(requestId, slotIndex);\\n\\n if (\\n context.slotsFilled == request.ask.slots &&\\n context.state == RequestState.New // Only New requests can \\\"start\\\" the requests\\n ) {\\n context.state = RequestState.Started;\\n context.startedAt = uint64(block.timestamp);\\n emit RequestFulfilled(requestId);\\n }\\n }\\n\\n /**\\n * @notice Frees a slot, paying out rewards and returning collateral for\\n finished or cancelled requests to the host that has filled the slot.\\n * @param slotId id of the slot to free\\n * @dev The host that filled the slot must have initiated the transaction\\n (msg.sender). This overload allows `rewardRecipient` and\\n `collateralRecipient` to be optional.\\n */\\n function freeSlot(SlotId slotId) public slotIsNotFree(slotId) {\\n return freeSlot(slotId, msg.sender, msg.sender);\\n }\\n\\n /**\\n * @notice Frees a slot, paying out rewards and returning collateral for\\n finished or cancelled requests.\\n * @param slotId id of the slot to free\\n * @param rewardRecipient address to send rewards to\\n * @param collateralRecipient address to refund collateral to\\n */\\n function freeSlot(\\n SlotId slotId,\\n address rewardRecipient,\\n address collateralRecipient\\n ) public slotIsNotFree(slotId) {\\n Slot storage slot = _slots[slotId];\\n if (slot.host != msg.sender) revert Marketplace_InvalidSlotHost();\\n\\n SlotState state = slotState(slotId);\\n if (state == SlotState.Paid) revert Marketplace_AlreadyPaid();\\n\\n if (state == SlotState.Finished) {\\n _payoutSlot(slot.requestId, slotId, rewardRecipient, collateralRecipient);\\n } else if (state == SlotState.Cancelled) {\\n _payoutCancelledSlot(\\n slot.requestId,\\n slotId,\\n rewardRecipient,\\n collateralRecipient\\n );\\n } else if (state == SlotState.Failed) {\\n _removeFromMySlots(msg.sender, slotId);\\n } else if (state == SlotState.Filled) {\\n // free slot without returning collateral, effectively a 100% slash\\n _forciblyFreeSlot(slotId);\\n }\\n }\\n\\n function _challengeToFieldElement(\\n bytes32 challenge\\n ) internal pure returns (uint256) {\\n // use only 31 bytes of the challenge to ensure that it fits into the field\\n bytes32 truncated = bytes32(bytes31(challenge));\\n // convert from little endian to big endian\\n bytes32 bigEndian = _byteSwap(truncated);\\n // convert bytes to integer\\n return uint256(bigEndian);\\n }\\n\\n function _merkleRootToFieldElement(\\n bytes32 merkleRoot\\n ) internal pure returns (uint256) {\\n // convert from little endian to big endian\\n bytes32 bigEndian = _byteSwap(merkleRoot);\\n // convert bytes to integer\\n return uint256(bigEndian);\\n }\\n\\n function submitProof(\\n SlotId id,\\n Groth16Proof calldata proof\\n ) public requestIsKnown(_slots[id].requestId) {\\n Slot storage slot = _slots[id];\\n Request storage request = _requests[slot.requestId];\\n uint256[] memory pubSignals = new uint256[](3);\\n pubSignals[0] = _challengeToFieldElement(getChallenge(id));\\n pubSignals[1] = _merkleRootToFieldElement(request.content.merkleRoot);\\n pubSignals[2] = slot.slotIndex;\\n _proofReceived(id, proof, pubSignals);\\n }\\n\\n function markProofAsMissing(SlotId slotId, Period period) public {\\n if (slotState(slotId) != SlotState.Filled)\\n revert Marketplace_SlotNotAcceptingProofs();\\n\\n _markProofAsMissing(slotId, period);\\n Slot storage slot = _slots[slotId];\\n Request storage request = _requests[slot.requestId];\\n\\n uint256 slashedAmount = (request.ask.collateralPerSlot() *\\n _config.collateral.slashPercentage) / 100;\\n\\n uint256 validatorRewardAmount = (slashedAmount *\\n _config.collateral.validatorRewardPercentage) / 100;\\n _marketplaceTotals.sent += validatorRewardAmount;\\n assert(_token.transfer(msg.sender, validatorRewardAmount));\\n\\n slot.currentCollateral -= slashedAmount;\\n if (missingProofs(slotId) >= _config.collateral.maxNumberOfSlashes) {\\n // When the number of slashings is at or above the allowed amount,\\n // free the slot.\\n _forciblyFreeSlot(slotId);\\n }\\n }\\n\\n /**\\n * @notice Abandons the slot without returning collateral, effectively slashing the\\n entire collateral.\\n * @param slotId SlotId of the slot to free.\\n * @dev _slots[slotId] is deleted, resetting _slots[slotId].currentCollateral\\n to 0.\\n */\\n function _forciblyFreeSlot(SlotId slotId) internal {\\n Slot storage slot = _slots[slotId];\\n RequestId requestId = slot.requestId;\\n RequestContext storage context = _requestContexts[requestId];\\n\\n // We need to refund the amount of payout of the current node to the `fundsToReturnToClient` so\\n // we keep correctly the track of the funds that needs to be returned at the end.\\n context.fundsToReturnToClient += _slotPayout(requestId, slot.filledAt);\\n\\n _removeFromMySlots(slot.host, slotId);\\n delete _reservations[slotId]; // We purge all the reservations for the slot\\n slot.state = SlotState.Repair;\\n slot.filledAt = 0;\\n slot.currentCollateral = 0;\\n slot.host = address(0);\\n context.slotsFilled -= 1;\\n emit SlotFreed(requestId, slot.slotIndex);\\n _resetMissingProofs(slotId);\\n\\n Request storage request = _requests[requestId];\\n uint256 slotsLost = request.ask.slots - context.slotsFilled;\\n if (\\n slotsLost > request.ask.maxSlotLoss &&\\n context.state == RequestState.Started\\n ) {\\n context.state = RequestState.Failed;\\n context.endsAt = uint64(block.timestamp) - 1;\\n emit RequestFailed(requestId);\\n }\\n }\\n\\n function _payoutSlot(\\n RequestId requestId,\\n SlotId slotId,\\n address rewardRecipient,\\n address collateralRecipient\\n ) private requestIsKnown(requestId) {\\n RequestContext storage context = _requestContexts[requestId];\\n Request storage request = _requests[requestId];\\n context.state = RequestState.Finished;\\n Slot storage slot = _slots[slotId];\\n\\n _removeFromMyRequests(request.client, requestId);\\n _removeFromMySlots(slot.host, slotId);\\n\\n uint256 payoutAmount = _slotPayout(requestId, slot.filledAt);\\n uint256 collateralAmount = slot.currentCollateral;\\n _marketplaceTotals.sent += (payoutAmount + collateralAmount);\\n slot.state = SlotState.Paid;\\n if (!_token.transfer(rewardRecipient, payoutAmount)) {\\n revert Marketplace_TransferFailed();\\n }\\n\\n if (!_token.transfer(collateralRecipient, collateralAmount)) {\\n revert Marketplace_TransferFailed();\\n }\\n }\\n\\n /**\\n * @notice Pays out a host for duration of time that the slot was filled, and\\n returns the collateral.\\n * @dev The payouts are sent to the rewardRecipient, and collateral is returned\\n to the host address.\\n * @param requestId RequestId of the request that contains the slot to be paid\\n out.\\n * @param slotId SlotId of the slot to be paid out.\\n */\\n function _payoutCancelledSlot(\\n RequestId requestId,\\n SlotId slotId,\\n address rewardRecipient,\\n address collateralRecipient\\n ) private requestIsKnown(requestId) {\\n Slot storage slot = _slots[slotId];\\n _removeFromMySlots(slot.host, slotId);\\n\\n uint256 payoutAmount = _slotPayout(\\n requestId,\\n slot.filledAt,\\n requestExpiry(requestId)\\n );\\n uint256 collateralAmount = slot.currentCollateral;\\n _marketplaceTotals.sent += (payoutAmount + collateralAmount);\\n slot.state = SlotState.Paid;\\n if (!_token.transfer(rewardRecipient, payoutAmount)) {\\n revert Marketplace_TransferFailed();\\n }\\n\\n if (!_token.transfer(collateralRecipient, collateralAmount)) {\\n revert Marketplace_TransferFailed();\\n }\\n }\\n\\n /**\\n * @notice Withdraws remaining storage request funds back to the client that\\n deposited them.\\n * @dev Request must be cancelled, failed or finished, and the\\n transaction must originate from the depositor address.\\n * @param requestId the id of the request\\n */\\n function withdrawFunds(RequestId requestId) public {\\n withdrawFunds(requestId, msg.sender);\\n }\\n\\n /**\\n * @notice Withdraws storage request funds to the provided address.\\n * @dev Request must be expired, must be in RequestState.New, and the\\n transaction must originate from the depositer address.\\n * @param requestId the id of the request\\n * @param withdrawRecipient address to return the remaining funds to\\n */\\n function withdrawFunds(\\n RequestId requestId,\\n address withdrawRecipient\\n ) public requestIsKnown(requestId) {\\n Request storage request = _requests[requestId];\\n RequestContext storage context = _requestContexts[requestId];\\n\\n if (request.client != msg.sender) revert Marketplace_InvalidClientAddress();\\n\\n RequestState state = requestState(requestId);\\n if (\\n state != RequestState.Cancelled &&\\n state != RequestState.Failed &&\\n state != RequestState.Finished\\n ) {\\n revert Marketplace_InvalidState();\\n }\\n\\n // fundsToReturnToClient == 0 is used for \\\"double-spend\\\" protection, once the funds are withdrawn\\n // then this variable is set to 0.\\n if (context.fundsToReturnToClient == 0)\\n revert Marketplace_NothingToWithdraw();\\n\\n if (state == RequestState.Cancelled) {\\n context.state = RequestState.Cancelled;\\n emit RequestCancelled(requestId);\\n\\n // `fundsToReturnToClient` currently tracks funds to be returned for requests that successfully finish.\\n // When requests are cancelled, funds earmarked for payment for the duration\\n // between request expiry and request end (for every slot that was filled), should be returned to the client.\\n // Update `fundsToReturnToClient` to reflect this.\\n context.fundsToReturnToClient +=\\n context.slotsFilled *\\n _slotPayout(requestId, requestExpiry(requestId));\\n } else if (state == RequestState.Failed) {\\n // For Failed requests the client is refunded whole amount.\\n context.fundsToReturnToClient = request.maxPrice();\\n } else {\\n context.state = RequestState.Finished;\\n }\\n\\n _removeFromMyRequests(request.client, requestId);\\n\\n uint256 amount = context.fundsToReturnToClient;\\n _marketplaceTotals.sent += amount;\\n\\n if (!_token.transfer(withdrawRecipient, amount)) {\\n revert Marketplace_TransferFailed();\\n }\\n\\n // We zero out the funds tracking in order to prevent double-spends\\n context.fundsToReturnToClient = 0;\\n }\\n\\n function getActiveSlot(\\n SlotId slotId\\n ) public view slotIsNotFree(slotId) returns (ActiveSlot memory) {\\n Slot storage slot = _slots[slotId];\\n ActiveSlot memory activeSlot;\\n activeSlot.request = _requests[slot.requestId];\\n activeSlot.slotIndex = slot.slotIndex;\\n return activeSlot;\\n }\\n\\n modifier requestIsKnown(RequestId requestId) {\\n if (_requests[requestId].client == address(0))\\n revert Marketplace_UnknownRequest();\\n\\n _;\\n }\\n\\n function getRequest(\\n RequestId requestId\\n ) public view requestIsKnown(requestId) returns (Request memory) {\\n return _requests[requestId];\\n }\\n\\n modifier slotIsNotFree(SlotId slotId) {\\n if (_slots[slotId].state == SlotState.Free) revert Marketplace_SlotIsFree();\\n _;\\n }\\n\\n function _slotIsFree(SlotId slotId) internal view override returns (bool) {\\n return _slots[slotId].state == SlotState.Free;\\n }\\n\\n function requestEnd(RequestId requestId) public view returns (uint64) {\\n RequestState state = requestState(requestId);\\n if (state == RequestState.New || state == RequestState.Started) {\\n return _requestContexts[requestId].endsAt;\\n }\\n if (state == RequestState.Cancelled) {\\n return _requestContexts[requestId].expiresAt;\\n }\\n return\\n uint64(Math.min(_requestContexts[requestId].endsAt, block.timestamp));\\n }\\n\\n function requestExpiry(RequestId requestId) public view returns (uint64) {\\n return _requestContexts[requestId].expiresAt;\\n }\\n\\n /**\\n * @notice Calculates the amount that should be paid out to a host that successfully finished the request\\n * @param requestId RequestId of the request used to calculate the payout\\n * amount.\\n * @param startingTimestamp timestamp indicating when a host filled a slot and\\n * started providing proofs.\\n */\\n function _slotPayout(\\n RequestId requestId,\\n uint64 startingTimestamp\\n ) private view returns (uint256) {\\n return\\n _slotPayout(\\n requestId,\\n startingTimestamp,\\n _requestContexts[requestId].endsAt\\n );\\n }\\n\\n /// @notice Calculates the amount that should be paid out to a host based on the specified time frame.\\n function _slotPayout(\\n RequestId requestId,\\n uint64 startingTimestamp,\\n uint64 endingTimestamp\\n ) private view returns (uint256) {\\n Request storage request = _requests[requestId];\\n if (startingTimestamp >= endingTimestamp)\\n revert Marketplace_StartNotBeforeExpiry();\\n return\\n (endingTimestamp - startingTimestamp) *\\n request.ask.pricePerSlotPerSecond();\\n }\\n\\n function getHost(SlotId slotId) public view returns (address) {\\n return _slots[slotId].host;\\n }\\n\\n function requestState(\\n RequestId requestId\\n ) public view requestIsKnown(requestId) returns (RequestState) {\\n RequestContext storage context = _requestContexts[requestId];\\n if (\\n context.state == RequestState.New &&\\n uint64(block.timestamp) > requestExpiry(requestId)\\n ) {\\n return RequestState.Cancelled;\\n } else if (\\n (context.state == RequestState.Started ||\\n context.state == RequestState.New) &&\\n uint64(block.timestamp) > context.endsAt\\n ) {\\n return RequestState.Finished;\\n } else {\\n return context.state;\\n }\\n }\\n\\n function slotState(SlotId slotId) public view override returns (SlotState) {\\n Slot storage slot = _slots[slotId];\\n if (RequestId.unwrap(slot.requestId) == 0) {\\n return SlotState.Free;\\n }\\n RequestState reqState = requestState(slot.requestId);\\n if (slot.state == SlotState.Paid) {\\n return SlotState.Paid;\\n }\\n if (reqState == RequestState.Cancelled) {\\n return SlotState.Cancelled;\\n }\\n if (reqState == RequestState.Finished) {\\n return SlotState.Finished;\\n }\\n if (reqState == RequestState.Failed) {\\n return SlotState.Failed;\\n }\\n return slot.state;\\n }\\n\\n function slotProbability(\\n SlotId slotId\\n ) public view override returns (uint256) {\\n Slot storage slot = _slots[slotId];\\n Request storage request = _requests[slot.requestId];\\n return\\n (request.ask.proofProbability * (256 - _config.proofs.downtime)) / 256;\\n }\\n\\n function _transferFrom(address sender, uint256 amount) internal {\\n address receiver = address(this);\\n if (!_token.transferFrom(sender, receiver, amount))\\n revert Marketplace_TransferFailed();\\n }\\n\\n event StorageRequested(RequestId requestId, Ask ask, uint64 expiry);\\n event RequestFulfilled(RequestId indexed requestId);\\n event RequestFailed(RequestId indexed requestId);\\n event SlotFilled(RequestId indexed requestId, uint64 slotIndex);\\n event SlotFreed(RequestId indexed requestId, uint64 slotIndex);\\n event RequestCancelled(RequestId indexed requestId);\\n\\n struct MarketplaceTotals {\\n uint256 received;\\n uint256 sent;\\n }\\n}\\n\",\"keccak256\":\"0x183c27e6316d854781a5b8319c833f7af087e57982fa26d724cad68759bb3c6e\",\"license\":\"MIT\"},\"contracts/Periods.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\ncontract Periods {\\n error Periods_InvalidSecondsPerPeriod();\\n\\n type Period is uint64;\\n\\n uint64 internal immutable _secondsPerPeriod;\\n\\n constructor(uint64 secondsPerPeriod) {\\n if (secondsPerPeriod == 0) {\\n revert Periods_InvalidSecondsPerPeriod();\\n }\\n _secondsPerPeriod = secondsPerPeriod;\\n }\\n\\n function _periodOf(uint64 timestamp) internal view returns (Period) {\\n return Period.wrap(timestamp / _secondsPerPeriod);\\n }\\n\\n function _blockPeriod() internal view returns (Period) {\\n return _periodOf(uint64(block.timestamp));\\n }\\n\\n function _nextPeriod(Period period) internal pure returns (Period) {\\n return Period.wrap(Period.unwrap(period) + 1);\\n }\\n\\n function _periodStart(Period period) internal view returns (uint64) {\\n return Period.unwrap(period) * _secondsPerPeriod;\\n }\\n\\n function _periodEnd(Period period) internal view returns (uint64) {\\n return _periodStart(_nextPeriod(period));\\n }\\n\\n function _isBefore(Period a, Period b) internal pure returns (bool) {\\n return Period.unwrap(a) < Period.unwrap(b);\\n }\\n\\n function _isAfter(Period a, Period b) internal pure returns (bool) {\\n return _isBefore(b, a);\\n }\\n}\\n\",\"keccak256\":\"0xd8b259c4b2b8f94f1a5530c7028ec5ecebccd7c97de5cb3283d4e51c24ac4b05\",\"license\":\"MIT\"},\"contracts/Proofs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"./Configuration.sol\\\";\\nimport \\\"./Requests.sol\\\";\\nimport \\\"./Periods.sol\\\";\\nimport \\\"./Groth16.sol\\\";\\n\\n/**\\n * @title Proofs\\n * @notice Abstract contract that handles proofs tracking, validation and reporting functionality\\n */\\nabstract contract Proofs is Periods {\\n error Proofs_InsufficientBlockHeight();\\n error Proofs_InvalidProof();\\n error Proofs_ProofAlreadySubmitted();\\n error Proofs_PeriodNotEnded();\\n error Proofs_ValidationTimedOut();\\n error Proofs_ProofNotMissing();\\n error Proofs_ProofNotRequired();\\n error Proofs_ProofAlreadyMarkedMissing();\\n\\n ProofConfig private _config;\\n IGroth16Verifier private _verifier;\\n\\n /**\\n * Creation of the contract requires at least 256 mined blocks!\\n * @param config Proving configuration\\n */\\n constructor(\\n ProofConfig memory config,\\n IGroth16Verifier verifier\\n ) Periods(config.period) {\\n if (block.number <= 256) {\\n revert Proofs_InsufficientBlockHeight();\\n }\\n\\n _config = config;\\n _verifier = verifier;\\n }\\n\\n mapping(SlotId => uint64) private _slotStarts;\\n mapping(SlotId => uint64) private _missed;\\n mapping(SlotId => mapping(Period => bool)) private _received;\\n mapping(SlotId => mapping(Period => bool)) private _missing;\\n\\n function slotState(SlotId id) public view virtual returns (SlotState);\\n\\n /**\\n * @param id Slot's ID\\n * @return Integer which specifies the probability of how often the proofs will be required. Lower number means higher probability.\\n */\\n function slotProbability(SlotId id) public view virtual returns (uint256);\\n\\n /**\\n * @return Number of missed proofs since Slot was Filled\\n */\\n function missingProofs(SlotId slotId) public view returns (uint64) {\\n return _missed[slotId];\\n }\\n\\n /**\\n * @param slotId Slot's ID for which the proofs should be reset\\n * @notice Resets the missing proofs counter to zero\\n */\\n function _resetMissingProofs(SlotId slotId) internal {\\n _missed[slotId] = 0;\\n }\\n\\n /**\\n * @param id Slot's ID for which the proofs should be started to require\\n * @notice Notes down the block's timestamp as Slot's starting time for requiring proofs\\n * and saves the required probability.\\n */\\n function _startRequiringProofs(SlotId id) internal {\\n _slotStarts[id] = uint64(block.timestamp);\\n }\\n\\n /**\\n * @param id Slot's ID for which the pointer should be calculated\\n * @param period Period for which the pointer should be calculated\\n * @return Uint8 pointer that is stable over current Period, ie an integer offset [0-255] of the last 256 blocks, pointing to a block that remains constant for the entire Period's duration.\\n * @dev For more information see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md)\\n */\\n function _getPointer(SlotId id, Period period) internal view returns (uint8) {\\n uint256 blockNumber = block.number % 256;\\n uint256 periodNumber = (Period.unwrap(period) * _config.downtimeProduct) %\\n 256;\\n uint256 idOffset = uint256(SlotId.unwrap(id)) % 256;\\n uint256 pointer = (blockNumber + periodNumber + idOffset) % 256;\\n return uint8(pointer);\\n }\\n\\n /**\\n * @param id Slot's ID for which the pointer should be calculated\\n * @return Uint8 pointer that is stable over current Period, ie an integer offset [0-255] of the last 256 blocks, pointing to a block that remains constant for the entire Period's duration.\\n * @dev For more information see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md)\\n */\\n function getPointer(SlotId id) public view returns (uint8) {\\n return _getPointer(id, _blockPeriod());\\n }\\n\\n /**\\n * @param pointer Integer [0-255] that indicates an offset of the last 256 blocks, pointing to a block that remains constant for the entire Period's duration.\\n * @return Challenge that should be used for generation of proofs\\n */\\n function _getChallenge(uint8 pointer) internal view returns (bytes32) {\\n bytes32 hash = blockhash(block.number - 1 - pointer);\\n assert(uint256(hash) != 0);\\n return keccak256(abi.encode(hash));\\n }\\n\\n /**\\n * @param id Slot's ID for which the challenge should be calculated\\n * @param period Period for which the challenge should be calculated\\n * @return Challenge that should be used for generation of proofs\\n */\\n function _getChallenge(\\n SlotId id,\\n Period period\\n ) internal view returns (bytes32) {\\n return _getChallenge(_getPointer(id, period));\\n }\\n\\n /**\\n * @param id Slot's ID for which the challenge should be calculated\\n * @return Challenge for current Period that should be used for generation of proofs\\n */\\n function getChallenge(SlotId id) public view returns (bytes32) {\\n return _getChallenge(id, _blockPeriod());\\n }\\n\\n /**\\n * @param id Slot's ID for which the requirements are gathered. If the Slot's state is other than Filled, `false` is always returned.\\n * @param period Period for which the requirements are gathered.\\n */\\n function _getProofRequirement(\\n SlotId id,\\n Period period\\n ) internal view returns (bool isRequired, uint8 pointer) {\\n SlotState state = slotState(id);\\n Period start = _periodOf(_slotStarts[id]);\\n if (state != SlotState.Filled || !_isAfter(period, start)) {\\n return (false, 0);\\n }\\n pointer = _getPointer(id, period);\\n bytes32 challenge = _getChallenge(pointer);\\n\\n /// Scaling of the probability according the downtime configuration\\n /// See: https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md#pointer-downtime\\n uint256 probability = slotProbability(id);\\n isRequired = probability == 0 || uint256(challenge) % probability == 0;\\n }\\n\\n /**\\n * See isProofRequired\\n */\\n function _isProofRequired(\\n SlotId id,\\n Period period\\n ) internal view returns (bool) {\\n bool isRequired;\\n uint8 pointer;\\n (isRequired, pointer) = _getProofRequirement(id, period);\\n return isRequired && pointer >= _config.downtime;\\n }\\n\\n /**\\n * @param id Slot's ID for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned.\\n * @return bool indicating if proof is required for current period\\n */\\n function isProofRequired(SlotId id) public view returns (bool) {\\n return _isProofRequired(id, _blockPeriod());\\n }\\n\\n /**\\n * Proof Downtime specifies part of the Period when the proof is not required even\\n * if the proof should be required. This function returns true if the pointer is\\n * in downtime (hence no proof required now) and at the same time the proof\\n * will be required later on in the Period.\\n *\\n * @dev for more info about downtime see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md#pointer-downtime)\\n * @param id SlotId for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned.\\n * @return bool\\n */\\n function willProofBeRequired(SlotId id) public view returns (bool) {\\n bool isRequired;\\n uint8 pointer;\\n (isRequired, pointer) = _getProofRequirement(id, _blockPeriod());\\n return isRequired && pointer < _config.downtime;\\n }\\n\\n /**\\n * Function used for submitting and verification of the proofs.\\n *\\n * @dev Reverts when proof is invalid or had been already submitted.\\n * @dev Emits ProofSubmitted event.\\n * @param id Slot's ID for which the proof requirements should be checked\\n * @param proof Groth16 proof\\n * @param pubSignals Proofs public input\\n */\\n function _proofReceived(\\n SlotId id,\\n Groth16Proof calldata proof,\\n uint[] memory pubSignals\\n ) internal {\\n if (_received[id][_blockPeriod()]) revert Proofs_ProofAlreadySubmitted();\\n if (!_verifier.verify(proof, pubSignals)) revert Proofs_InvalidProof();\\n\\n _received[id][_blockPeriod()] = true;\\n emit ProofSubmitted(id);\\n }\\n\\n /**\\n * Function used to mark proof as missing.\\n *\\n * @param id Slot's ID for which the proof is missing\\n * @param missedPeriod Period for which the proof was missed\\n * @dev Reverts when:\\n * - missedPeriod has not ended yet ended\\n * - missing proof was time-barred\\n * - proof was submitted\\n * - proof was not required for missedPeriod period\\n * - proof was already marked as missing\\n */\\n function _markProofAsMissing(SlotId id, Period missedPeriod) internal {\\n uint256 end = _periodEnd(missedPeriod);\\n if (end >= block.timestamp) revert Proofs_PeriodNotEnded();\\n if (block.timestamp >= end + _config.timeout)\\n revert Proofs_ValidationTimedOut();\\n if (_received[id][missedPeriod]) revert Proofs_ProofNotMissing();\\n if (!_isProofRequired(id, missedPeriod)) revert Proofs_ProofNotRequired();\\n if (_missing[id][missedPeriod]) revert Proofs_ProofAlreadyMarkedMissing();\\n\\n _missing[id][missedPeriod] = true;\\n _missed[id] += 1;\\n }\\n\\n event ProofSubmitted(SlotId id);\\n}\\n\",\"keccak256\":\"0xc0ea30ef10d9a450dd869da7af85dc328c33e912e385e9f413bf32b21e3d8b3e\",\"license\":\"MIT\"},\"contracts/Requests.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\ntype RequestId is bytes32;\\ntype SlotId is bytes32;\\n\\nstruct Request {\\n address client;\\n Ask ask;\\n Content content;\\n uint64 expiry; // amount of seconds since start of the request at which this request expires\\n bytes32 nonce; // random nonce to differentiate between similar requests\\n}\\n\\nstruct Ask {\\n uint256 proofProbability; // how often storage proofs are required\\n uint256 pricePerBytePerSecond; // amount of tokens paid per second per byte to hosts\\n uint256 collateralPerByte; // amount of tokens per byte required to be deposited by the hosts in order to fill the slot\\n uint64 slots; // the number of requested slots\\n uint64 slotSize; // amount of storage per slot (in number of bytes)\\n uint64 duration; // how long content should be stored (in seconds)\\n uint64 maxSlotLoss; // Max slots that can be lost without data considered to be lost\\n}\\n\\nstruct Content {\\n bytes cid; // content id, used to download the dataset\\n bytes32 merkleRoot; // merkle root of the dataset, used to verify storage proofs\\n}\\n\\nenum RequestState {\\n New, // [default] waiting to fill slots\\n Started, // all slots filled, accepting regular proofs\\n Cancelled, // not enough slots filled before expiry\\n Finished, // successfully completed\\n Failed // too many nodes have failed to provide proofs, data lost\\n}\\n\\nenum SlotState {\\n Free, // [default] not filled yet\\n Filled, // host has filled slot\\n Finished, // successfully completed\\n Failed, // the request has failed\\n Paid, // host has been paid\\n Cancelled, // when request was cancelled then slot is cancelled as well\\n Repair // when slot slot was forcible freed (host was kicked out from hosting the slot because of too many missed proofs) and needs to be repaired\\n}\\n\\nlibrary AskHelpers {\\n function collateralPerSlot(Ask memory ask) internal pure returns (uint256) {\\n return ask.collateralPerByte * ask.slotSize;\\n }\\n\\n function pricePerSlotPerSecond(\\n Ask memory ask\\n ) internal pure returns (uint256) {\\n return ask.pricePerBytePerSecond * ask.slotSize;\\n }\\n}\\n\\nlibrary Requests {\\n using AskHelpers for Ask;\\n\\n function id(Request memory request) internal pure returns (RequestId) {\\n return RequestId.wrap(keccak256(abi.encode(request)));\\n }\\n\\n function slotId(\\n RequestId requestId,\\n uint64 slotIndex\\n ) internal pure returns (SlotId) {\\n return SlotId.wrap(keccak256(abi.encode(requestId, slotIndex)));\\n }\\n\\n function toRequestIds(\\n bytes32[] memory ids\\n ) internal pure returns (RequestId[] memory result) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := ids\\n }\\n }\\n\\n function toSlotIds(\\n bytes32[] memory ids\\n ) internal pure returns (SlotId[] memory result) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := ids\\n }\\n }\\n\\n function maxPrice(Request memory request) internal pure returns (uint256) {\\n return\\n request.ask.slots *\\n request.ask.duration *\\n request.ask.pricePerSlotPerSecond();\\n }\\n}\\n\",\"keccak256\":\"0x48ae7387078d0c3175d0b7fb8c0b7a2fc82a7e98ac28953904d0cca67e47e352\",\"license\":\"MIT\"},\"contracts/SlotReservations.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport \\\"./Requests.sol\\\";\\nimport \\\"./Configuration.sol\\\";\\n\\nabstract contract SlotReservations {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n error SlotReservations_ReservationNotAllowed();\\n\\n mapping(SlotId => EnumerableSet.AddressSet) internal _reservations;\\n SlotReservationsConfig private _config;\\n\\n constructor(SlotReservationsConfig memory config) {\\n _config = config;\\n }\\n\\n function _slotIsFree(SlotId slotId) internal view virtual returns (bool);\\n\\n function reserveSlot(RequestId requestId, uint64 slotIndex) public {\\n if (!canReserveSlot(requestId, slotIndex))\\n revert SlotReservations_ReservationNotAllowed();\\n\\n SlotId slotId = Requests.slotId(requestId, slotIndex);\\n _reservations[slotId].add(msg.sender);\\n\\n if (_reservations[slotId].length() == _config.maxReservations) {\\n emit SlotReservationsFull(requestId, slotIndex);\\n }\\n }\\n\\n function canReserveSlot(\\n RequestId requestId,\\n uint64 slotIndex\\n ) public view returns (bool) {\\n address host = msg.sender;\\n SlotId slotId = Requests.slotId(requestId, slotIndex);\\n return\\n // TODO: add in check for address inside of expanding window\\n _slotIsFree(slotId) &&\\n (_reservations[slotId].length() < _config.maxReservations) &&\\n (!_reservations[slotId].contains(host));\\n }\\n\\n event SlotReservationsFull(RequestId indexed requestId, uint64 slotIndex);\\n}\\n\",\"keccak256\":\"0x4c1ad6a6b4c702835f42800d5e51824882f375861ed7c0d959a5aec37483648d\",\"license\":\"MIT\"},\"contracts/StateRetrieval.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport \\\"./Requests.sol\\\";\\n\\ncontract StateRetrieval {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using Requests for bytes32[];\\n\\n mapping(address => EnumerableSet.Bytes32Set) private _requestsPerClient;\\n mapping(address => EnumerableSet.Bytes32Set) private _slotsPerHost;\\n\\n function myRequests() public view returns (RequestId[] memory) {\\n return _requestsPerClient[msg.sender].values().toRequestIds();\\n }\\n\\n function mySlots() public view returns (SlotId[] memory) {\\n return _slotsPerHost[msg.sender].values().toSlotIds();\\n }\\n\\n function _hasSlots(address host) internal view returns (bool) {\\n return _slotsPerHost[host].length() > 0;\\n }\\n\\n function _addToMyRequests(address client, RequestId requestId) internal {\\n _requestsPerClient[client].add(RequestId.unwrap(requestId));\\n }\\n\\n function _addToMySlots(address host, SlotId slotId) internal {\\n _slotsPerHost[host].add(SlotId.unwrap(slotId));\\n }\\n\\n function _removeFromMyRequests(address client, RequestId requestId) internal {\\n _requestsPerClient[client].remove(RequestId.unwrap(requestId));\\n }\\n\\n function _removeFromMySlots(address host, SlotId slotId) internal {\\n _slotsPerHost[host].remove(SlotId.unwrap(slotId));\\n }\\n}\\n\",\"keccak256\":\"0xedc2d20f718aa5bd75e250ab5e2c11eae7849057391eb06996245899922ee6cf\",\"license\":\"MIT\"}},\"version\":1}",
|
|
"bytecode": "0x60c060405234801561001057600080fd5b50604051614eb5380380614eb583398101604081905261002f9161053b565b602083015180516040850151516001805460ff191660ff90921691909117905582906001600160401b03811660000361007b5760405163015536c760e51b815260040160405180910390fd5b6001600160401b031660805261010043116100a9576040516338f5f66160e11b815260040160405180910390fd5b8151600280546020850151604086015160608701516001600160401b039586166001600160801b0319909416939093176801000000000000000095909216949094021761ffff60801b1916600160801b60ff9485160260ff60881b191617600160881b9390911692909202919091178155608083015183919060039061012f90826106d9565b5050600480546001600160a01b0319166001600160a01b0393841617905550831660a05250825151606460ff909116111561017d576040516302bd816360e41b815260040160405180910390fd5b606483600001516040015160ff1611156101aa576040516354e5e0ab60e11b815260040160405180910390fd5b825160408101516020909101516064916101c391610797565b60ff1611156101e5576040516317ff9d0f60e21b815260040160405180910390fd5b82518051600b805460208085015160408087015160609788015160ff90811663010000000263ff0000001992821662010000029290921663ffff0000199482166101000261ffff1990971698821698909817959095179290921695909517178355808801518051600c80549383015196830151978301518516600160881b0260ff60881b1998909516600160801b029790971661ffff60801b196001600160401b0397881668010000000000000000026001600160801b031990951697909216969096179290921791909116939093171783556080820151869391929190600d906102d090826106d9565b50505060408201515160038201805460ff191660ff909216919091179055606090910151600490910180546001600160401b0319166001600160401b03909216919091179055506107c8915050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156103575761035761031f565b60405290565b604051608081016001600160401b03811182821017156103575761035761031f565b604051601f8201601f191681016001600160401b03811182821017156103a7576103a761031f565b604052919050565b805160ff811681146103c057600080fd5b919050565b80516001600160401b03811681146103c057600080fd5b600060a082840312156103ee57600080fd5b6103f6610335565b9050610401826103c5565b815261040f602083016103c5565b6020820152610420604083016103af565b6040820152610431606083016103af565b606082015260808201516001600160401b0381111561044f57600080fd5b8201601f8101841361046057600080fd5b80516001600160401b038111156104795761047961031f565b61048c601f8201601f191660200161037f565b8181528560208385010111156104a157600080fd5b60005b828110156104c0576020818501810151838301820152016104a4565b5060006020838301015280608085015250505092915050565b6000602082840312156104eb57600080fd5b604051602081016001600160401b038111828210171561050d5761050d61031f565b60405290508061051c836103af565b905292915050565b80516001600160a01b03811681146103c057600080fd5b60008060006060848603121561055057600080fd5b83516001600160401b0381111561056657600080fd5b840180860360e081121561057957600080fd5b61058161035d565b608082121561058f57600080fd5b61059761035d565b91506105a2836103af565b82526105b0602084016103af565b60208301526105c1604084016103af565b60408301526105d2606084016103af565b60608301529081526080820151906001600160401b038211156105f457600080fd5b610600888385016103dc565b60208201526106128860a085016104d9565b604082015261062360c084016103c5565b6060820152945061063991505060208501610524565b915061064760408501610524565b90509250925092565b600181811c9082168061066457607f821691505b60208210810361068457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156106d457806000526020600020601f840160051c810160208510156106b15750805b601f840160051c820191505b818110156106d157600081556001016106bd565b50505b505050565b81516001600160401b038111156106f2576106f261031f565b610706816107008454610650565b8461068a565b6020601f82116001811461073a57600083156107225750848201515b600019600385901b1c1916600184901b1784556106d1565b600084815260208120601f198516915b8281101561076a578785015182556020948501946001909201910161074a565b50848210156107885786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60ff81811683821602908116908181146107c157634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a051614690610825600039600081816104bf01528181610f640152818161200d0152818161257e0152818161262e015281816127bd0152818161286d0152612c97015260008181613501015261379101526146906000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80636e2b54ee116100f9578063c0cc4add11610097578063e8aa0a0711610071578063e8aa0a0714610461578063f752196b14610474578063fb1e61ca1461049d578063fc0c546a146104bd57600080fd5b8063c0cc4add14610428578063c5d433511461043b578063d02bbe331461044e57600080fd5b8063a29c29a4116100d3578063a29c29a4146103b2578063a3a0807e146103c5578063b396dc79146103e8578063be5cdc481461040857600080fd5b80636e2b54ee146103845780639777b72c1461039757806399b6da0c1461039f57600080fd5b8063329b5a0b1161016657806351a766421161014057806351a76642146103035780635da73835146103165780636b00c8cf1461032b5780636c70bee91461036f57600080fd5b8063329b5a0b14610298578063458d2bf1146102cb5780634641dce6146102de57600080fd5b806312827602116101a2578063128276021461022e5780631d873c1b14610241578063237d84821461025457806326d6f8341461026757600080fd5b806302fa8e65146101c957806305b90773146101f95780630aefaabe14610219575b600080fd5b6101dc6101d736600461385e565b6104e3565b6040516001600160401b0390911681526020015b60405180910390f35b61020c61020736600461385e565b6105c1565b6040516101f0919061388d565b61022c6102273660046138bc565b6106e4565b005b61022c61023c366004613923565b610877565b61022c61024f366004613966565b610948565b61022c610262366004613923565b610dee565b61028a61027536600461385e565b60009081526012602052604090206003015490565b6040519081526020016101f0565b6101dc6102a636600461385e565b600090815260116020526040902060020154600160c01b90046001600160401b031690565b61028a6102d936600461385e565b61103a565b6102f16102ec36600461385e565b611053565b60405160ff90911681526020016101f0565b61028a61031136600461385e565b611066565b61031e6110c5565b6040516101f091906139a6565b61035761033936600461385e565b6000908152601260205260409020600401546001600160a01b031690565b6040516001600160a01b0390911681526020016101f0565b6103776110ec565b6040516101f09190613a84565b61022c61039236600461385e565b611263565b61031e611270565b61022c6103ad366004613b0c565b61128f565b61022c6103c036600461385e565b6117d5565b6103d86103d336600461385e565b611827565b60405190151581526020016101f0565b6103fb6103f636600461385e565b611863565b6040516101f09190613c3b565b61041b61041636600461385e565b611b45565b6040516101f09190613c76565b6103d861043636600461385e565b611c13565b61022c610449366004613c8a565b611c26565b6103d861045c366004613923565b6120a7565b61022c61046f366004613caf565b612113565b6101dc61048236600461385e565b6000908152600660205260409020546001600160401b031690565b6104b06104ab36600461385e565b612243565b6040516101f09190613cdd565b7f0000000000000000000000000000000000000000000000000000000000000000610357565b6000806104ef836105c1565b9050600081600481111561050557610505613877565b14806105225750600181600481111561052057610520613877565b145b1561054e575050600090815260116020526040902060020154600160801b90046001600160401b031690565b600281600481111561056257610562613877565b0361058e575050600090815260116020526040902060020154600160c01b90046001600160401b031690565b6000838152601160205260409020600201546105ba90600160801b90046001600160401b031642612459565b9392505050565b60008181526010602052604081205482906001600160a01b03166105f857604051635eeb253d60e11b815260040160405180910390fd5b600083815260116020526040812090815460ff16600481111561061d5761061d613877565b14801561065c5750600084815260116020526040902060020154600160c01b90046001600160401b03166001600160401b0316426001600160401b0316115b1561066b5760029250506106de565b6001815460ff16600481111561068357610683613877565b14806106a457506000815460ff1660048111156106a2576106a2613877565b145b80156106c8575060028101546001600160401b03600160801b909104811642909116115b156106d75760039250506106de565b5460ff1691505b50919050565b826000808281526012602052604090205460ff16600681111561070957610709613877565b0361072757604051638b41ec7f60e01b815260040160405180910390fd5b600084815260126020526040902060048101546001600160a01b0316331461077b576040517f57a6f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061078686611b45565b9050600481600681111561079c5761079c613877565b036107d3576040517fc2cbf77700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028160068111156107e7576107e7613877565b03610801576107fc826001015487878761246f565b61086f565b600581600681111561081557610815613877565b0361082a576107fc82600101548787876126b8565b600381600681111561083e5761083e613877565b0361084d576107fc3387612901565b600181600681111561086157610861613877565b0361086f5761086f86612923565b505050505050565b61088182826120a7565b6108b7576040517f424a04ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108c38383612b7b565b60008181526020819052604090209091506108de9033612bc0565b50600154600082815260208190526040902060ff909116906108ff90612bd5565b03610943576040516001600160401b038316815283907fc8e6c955744189a19222ec226b72ac1435d88d5745252dac56e6f679f64c037a9060200160405180910390a25b505050565b60008381526010602052604090205483906001600160a01b031661097f57604051635eeb253d60e11b815260040160405180910390fd5b600084815260106020526040902060048101546001600160401b03908116908516106109d7576040517f3b920b8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006109e38686612b7b565b60008181526020819052604090209091506109fe9033612bdf565b610a34576040517fd651ce1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601260209081526040808320600181018a90556002810180546fffffffffffffffff00000000000000001916600160401b6001600160401b038c1602179055898452601190925282209091610a8d84611b45565b6006811115610a9e57610a9e613877565b14158015610ac657506006610ab284611b45565b6006811115610ac357610ac3613877565b14155b15610afd576040517fff556acf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409020805467ffffffffffffffff1916426001600160401b0316179055610b2f8387612113565b60048201805473ffffffffffffffffffffffffffffffffffffffff191633179055600280830180546001600160401b0342811667ffffffffffffffff19909216919091179091559082018054600192600091610b8d91859116613d06565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550610bd2888360020160009054906101000a90046001600160401b0316612c01565b816001016000828254610be59190613d25565b90915550506040805160e081018252600186015481526002860154602082015260038601549181019190915260048501546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c08201526000908190610c5e90612c30565b90506006610c6b86611b45565b6006811115610c7c57610c7c613877565b03610caf57600b54606490610c949060ff1683613d38565b610c9e9190613d65565b610ca89082613d25565b9150610cb3565b8091505b610cbd3383612c4f565b8160136000016000828254610cd29190613d79565b9091555050600384018190556004840154610cf6906001600160a01b031686612d23565b835460ff191660011784556040516001600160401b038a1681528a907f8f301470a994578b52323d625dfbf827ca5208c81747d3459be7b8867baec3ec9060200160405180910390a2600486015460028401546001600160401b039081169116148015610d7857506000835460ff166004811115610d7657610d76613877565b145b15610de257825460ff191660011783556002830180546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040518a907f85e1543bf2f84fe80c6badbce3648c8539ad1df4d2b3d822938ca0538be727e690600090a25b50505050505050505050565b6001610df983611b45565b6006811115610e0a57610e0a613877565b14610e41576040517fae9dcffd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4b8282612d45565b6000828152601260209081526040808320600180820154855260108452828520600b54845160e08101865292820154835260028201549583019590955260038101549382019390935260048301546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0820152909391926064916201000090910460ff1690610eee90612c30565b610ef89190613d38565b610f029190613d65565b600b54909150600090606490610f22906301000000900460ff1684613d38565b610f2c9190613d65565b90508060136001016000828254610f439190613d79565b909155505060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd99190613d8c565b610fe557610fe5613dae565b81846003016000828254610ff99190613d25565b9091555050600b5460008781526006602052604090205461010090910460ff16906001600160401b03166001600160401b03161061086f5761086f86612923565b600061104d82611048612f5c565b612f67565b92915050565b600061104d82611061612f5c565b612f7b565b60008181526012602090815260408083206001810154845260109092528220600c54610100906110a090600160801b900460ff1682613dc4565b60018301546110b39161ffff1690613d38565b6110bd9190613d65565b949350505050565b336000908152600a602052604090206060906110e7906110e49061300d565b90565b905090565b6110f46137b6565b604080516101008082018352600b805460ff8082166080808701918252948304821660a080880191909152620100008404831660c08801526301000000909304821660e0870152855285519182018652600c80546001600160401b038082168552600160401b820416602085810191909152600160801b82048416988501989098527101000000000000000000000000000000000090049091166060830152600d80549596939593870194929391928401916111af90613dde565b80601f01602080910402602001604051908101604052809291908181526020018280546111db90613dde565b80156112285780601f106111fd57610100808354040283529160200191611228565b820191906000526020600020905b81548152906001019060200180831161120b57829003601f168201915b5050509190925250505081526040805160208181018352600385015460ff1682528301526004909201546001600160401b0316910152919050565b61126d8133611c26565b50565b3360009081526009602052604090206060906110e7906110e49061300d565b60006112a261129d83613f6f565b61301a565b9050336112b26020840184614078565b6001600160a01b0316146112d9576040516334c69e3160e11b815260040160405180910390fd5b6000818152601060205260409020546001600160a01b031615611328576040517ffc7d069000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61133a61014083016101208401614095565b6001600160401b03161580611381575061135a60e0830160c08401614095565b6001600160401b031661137561014084016101208501614095565b6001600160401b031610155b156113b8576040517fdf63f61a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113c860a0830160808401614095565b6001600160401b031660000361140a576040517f535ed2be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61141a60a0830160808401614095565b6001600160401b0316611434610100840160e08501614095565b6001600160401b03161115611475576040517fb9551ab100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148560e0830160c08401614095565b6001600160401b03166000036114c7576040517f090a5ecd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020820135600003611505576040517f6aba7aae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060820135600003611543576040517ffb7df0c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040820135600003611581576040517f47ba51c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61158f6101008301836140b2565b61159990806140d2565b90506000036115d4576040517f86f8cf9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f546001600160401b03166115f060e0840160c08501614095565b6001600160401b03161115611631576040517f1267b3f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601060205260409020829061164b8282614272565b5061165e905060e0830160c08401614095565b6116689042613d06565b600082815260116020526040902060020180546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556116b561014083016101208401614095565b6116bf9042613d06565b600082815260116020908152604090912060020180546001600160401b0393909316600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909316929092179091556117209061171a90840184614078565b8261304a565b600061173361172e84613f6f565b61306c565b600083815260116020526040812060010182905560138054929350839290919061175e908490613d79565b9091555061176e90503382612c4f565b6000828152601160209081526040918290206002015491517f1bf9c457accf8703dbf7cdf1b58c2f74ddf2e525f98155c70b3d318d74609bd8926117c892869290880191600160c01b90046001600160401b031690614426565b60405180910390a1505050565b806000808281526012602052604090205460ff1660068111156117fa576117fa613877565b0361181857604051638b41ec7f60e01b815260040160405180910390fd5b6118238233336106e4565b5050565b600080600061183d84611838612f5c565b6130a8565b90925090508180156110bd5750600254600160801b900460ff9081169116109392505050565b6118e6604051806040016040528061381f6040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b816000808281526012602052604090205460ff16600681111561190b5761190b613877565b0361192957604051638b41ec7f60e01b815260040160405180910390fd5b60008381526012602052604090206119ba604051806040016040528061381f6040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b600180830154600090815260106020908152604091829020825160a0808201855282546001600160a01b03168252845160e08101865295830154865260028301548685015260038301548686015260048301546001600160401b038082166060890152600160401b820481166080890152600160801b8204811692880192909252600160c01b90041660c0860152918201939093528151808301835260058401805492949385019282908290611a6f90613dde565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9b90613dde565b8015611ae85780601f10611abd57610100808354040283529160200191611ae8565b820191906000526020600020905b815481529060010190602001808311611acb57829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b0390811683830152600890930154604090920191909152918352600290930154600160401b900490921691810191909152915050919050565b600081815260126020526040812060018101548203611b675750600092915050565b6000611b7682600101546105c1565b90506004825460ff166006811115611b9057611b90613877565b03611b9f575060049392505050565b6002816004811115611bb357611bb3613877565b03611bc2575060059392505050565b6003816004811115611bd657611bd6613877565b03611be5575060029392505050565b6004816004811115611bf957611bf9613877565b03611c08575060039392505050565b505460ff1692915050565b600061104d82611c21612f5c565b613160565b60008281526010602052604090205482906001600160a01b0316611c5d57604051635eeb253d60e11b815260040160405180910390fd5b6000838152601060209081526040808320601190925290912081546001600160a01b03163314611ca0576040516334c69e3160e11b815260040160405180910390fd5b6000611cab866105c1565b90506002816004811115611cc157611cc1613877565b14158015611ce157506004816004811115611cde57611cde613877565b14155b8015611cff57506003816004811115611cfc57611cfc613877565b14155b15611d36576040517fc00b5b5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160010154600003611d74576040517fbd8bdd9400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816004811115611d8857611d88613877565b03611e2657815460ff1916600217825560405186907ff903f4774c7bd27355f9d7fcbc382b079b164a697a44ac5d95267a4c3cb3bb2290600090a2600086815260116020526040902060020154611df0908790600160c01b90046001600160401b0316612c01565b6002830154611e0891906001600160401b0316613d38565b826001016000828254611e1b9190613d79565b90915550611fb39050565b6004816004811115611e3a57611e3a613877565b03611fa7576040805160a0808201835285546001600160a01b03168252825160e08101845260018701548152600287015460208281019190915260038801548286015260048801546001600160401b038082166060850152600160401b820481166080850152600160801b8204811694840194909452600160c01b900490921660c08201529082015281518083018352600586018054611f9d94889390850192909182908290611ee990613dde565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1590613dde565b8015611f625780601f10611f3757610100808354040283529160200191611f62565b820191906000526020600020905b815481529060010190602001808311611f4557829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b03169082015260089091015460409091015261306c565b6001830155611fb3565b815460ff191660031782555b8254611fc8906001600160a01b031687613197565b600182015460148054829190600090611fe2908490613d79565b909155505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612056573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207a9190613d8c565b61209757604051637c2ccffd60e11b815260040160405180910390fd5b5050600060019091015550505050565b600033816120b58585612b7b565b90506120c0816131b9565b80156120e95750600154600082815260208190526040902060ff909116906120e790612bd5565b105b801561210a575060008181526020819052604090206121089083612bdf565b155b95945050505050565b6000828152601260209081526040808320600101548084526010909252909120546001600160a01b031661215a57604051635eeb253d60e11b815260040160405180910390fd5b6000838152601260209081526040808320600181015484526010835281842082516003808252608082019094529194909390929082016060803683370190505090506121ad6121a88761103a565b6131e6565b816000815181106121c0576121c06144d3565b602090810291909101015260068201546121d9906131f7565b816001815181106121ec576121ec6144d3565b6020026020010181815250508260020160089054906101000a90046001600160401b03166001600160401b03168160028151811061222c5761222c6144d3565b60200260200101818152505061086f868683613203565b6122b86040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b60008281526010602052604090205482906001600160a01b03166122ef57604051635eeb253d60e11b815260040160405180910390fd5b600083815260106020908152604091829020825160a0808201855282546001600160a01b03168252845160e0810186526001840154815260028401548186015260038401548187015260048401546001600160401b038082166060840152600160401b820481166080840152600160801b8204811693830193909352600160c01b900490911660c082015292810192909252825180840184526005820180549394929392850192829082906123a390613dde565b80601f01602080910402602001604051908101604052809291908181526020018280546123cf90613dde565b801561241c5780601f106123f15761010080835404028352916020019161241c565b820191906000526020600020905b8154815290600101906020018083116123ff57829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b0316908201526008909101546040909101529392505050565b600081831061246857816105ba565b5090919050565b60008481526010602052604090205484906001600160a01b03166124a657604051635eeb253d60e11b815260040160405180910390fd5b600085815260116020908152604080832060108352818420815460ff191660031782558885526012909352922081546124e8906001600160a01b031689613197565b6004810154612500906001600160a01b031688612901565b600281015460009061251c908a906001600160401b0316612c01565b600383015490915061252e8183613d79565b60148054600090612540908490613d79565b90915550508254600490849060ff1916600183021790555060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156125c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125eb9190613d8c565b61260857604051637c2ccffd60e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038881166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269b9190613d8c565b610de257604051637c2ccffd60e11b815260040160405180910390fd5b60008481526010602052604090205484906001600160a01b03166126ef57604051635eeb253d60e11b815260040160405180910390fd5b60008481526012602052604090206004810154612715906001600160a01b031686612901565b600281015460009061275b9088906001600160401b0316612756826000908152601160205260409020600201546001600160401b03600160c01b9091041690565b6133a1565b600383015490915061276d8183613d79565b6014805460009061277f908490613d79565b90915550508254600490849060ff1916600183021790555060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282a9190613d8c565b61284757604051637c2ccffd60e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156128b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128da9190613d8c565b6128f757604051637c2ccffd60e11b815260040160405180910390fd5b5050505050505050565b6001600160a01b0382166000908152600a602052604090206109439082613480565b6000818152601260209081526040808320600181015480855260119093529220600283015461295c9083906001600160401b0316612c01565b81600101600082825461296f9190613d79565b9091555050600483015461298c906001600160a01b031685612901565b60008481526020819052604081209081816129a7828261382c565b5050845460ff1916600617855550506002808401805467ffffffffffffffff1916905560006003850181905560048501805473ffffffffffffffffffffffffffffffffffffffff19169055908201805460019290612a0f9084906001600160401b03166144e9565b82546101009290920a6001600160401b038181021990931691831602179091556002850154604051600160401b90910490911681528391507f33ba8f7627565d89f7ada2a6b81ea532b7aa9b11e91a78312d6e1fca0bfcd1dc9060200160405180910390a26000848152600660205260409020805467ffffffffffffffff19169055600082815260106020526040812060028301546004820154919291612ac2916001600160401b0390811691166144e9565b60048301546001600160401b039182169250600160c01b90041681118015612aff57506001835460ff166004811115612afd57612afd613877565b145b1561086f57825460ff19166004178355612b1a6001426144e9565b6002840180546001600160401b0392909216600160801b0267ffffffffffffffff60801b1990921691909117905560405184907f4769361a442504ecaf038f35e119bcccdd5e42096b24c09e3c17fd17c6684c0290600090a2505050505050565b60008282604051602001612ba29291909182526001600160401b0316602082015260400190565b60405160208183030381529060405280519060200120905092915050565b60006105ba836001600160a01b03841661348c565b600061104d825490565b6001600160a01b038116600090815260018301602052604081205415156105ba565b6000828152601160205260408120600201546105ba9084908490600160801b90046001600160401b03166133a1565b600081608001516001600160401b0316826040015161104d9190613d38565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152306024830181905260448301849052917f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af1158015612ce2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d069190613d8c565b61094357604051637c2ccffd60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040902061094390826134db565b6000612d50826134e7565b6001600160401b03169050428110612d94576040517f6b4b1a4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254612db190600160401b90046001600160401b031682613d79565b4210612de9576040517fde55698e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602090815260408083206001600160401b038616845290915290205460ff1615612e45576040517efab7d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e4f8383613160565b612e85576040517fd3ffa66b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526008602090815260408083206001600160401b038616845290915290205460ff1615612ee2576040517f98e7e55100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526008602090815260408083206001600160401b038087168552908352818420805460ff1916600190811790915587855260069093529083208054929390929091612f3391859116613d06565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b60006110e7426134fa565b60006105ba612f768484612f7b565b613526565b600080612f8a61010043614508565b60025490915060009061010090612fb99071010000000000000000000000000000000000900460ff168661451c565b612fc3919061453e565b6001600160401b031690506000612fdc61010087614508565b9050600061010082612fee8587613d79565b612ff89190613d79565b6130029190614508565b979650505050505050565b606060006105ba83613580565b60008160405160200161302d9190613cdd565b604051602081830303815290604052805190602001209050919050565b6001600160a01b038216600090815260096020526040902061094390826134db565b600061307b82602001516135dc565b602083015160a0810151606090910151613095919061451c565b6001600160401b031661104d9190613d38565b60008060006130b685611b45565b600086815260056020526040812054919250906130db906001600160401b03166134fa565b905060018260068111156130f1576130f1613877565b141580613105575061310385826135fb565b155b1561311857600080935093505050613159565b6131228686612f7b565b9250600061312f84613526565b9050600061313c88611066565b905080158061315257506131508183614508565b155b9550505050505b9250929050565b600080600061316f85856130a8565b909250905081801561210a5750600254600160801b900460ff90811691161015949350505050565b6001600160a01b03821660009081526009602052604090206109439082613480565b60008060008381526012602052604090205460ff1660068111156131df576131df613877565b1492915050565b600060ff198216816110bd82613611565b6000806105ba83613611565b60008381526007602052604081209061321a612f5c565b6001600160401b0316815260208101919091526040016000205460ff161561326e576040517f3edef7db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480546040517f94c8919d0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116916394c8919d916132b891869186910161456c565b602060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f99190613d8c565b61332f576040517ffcd03a4700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260408120600191613348612f5c565b6001600160401b031681526020808201929092526040908101600020805460ff19169315159390931790925590518481527f3b989d183b84b02259d7c14b34a9c9eb0fccb4c355a920d25e581e25aef4993d91016117c8565b60008381526010602052604081206001600160401b03808416908516106133f4576040517f56607cb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600183015481526002830154602082015260038301549181019190915260048201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0820152613463906135dc565b61346d85856144e9565b6001600160401b031661210a9190613d38565b60006105ba8383613683565b60008181526001830160205260408120546134d35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561104d565b50600061104d565b60006105ba838361348c565b600061104d6134f58361377d565b61378a565b600061104d7f000000000000000000000000000000000000000000000000000000000000000083614616565b60008060ff8316613538600143613d25565b6135429190613d25565b409050600081900361355657613556613dae565b60408051602081018390520160405160208183030381529060405280519060200120915050919050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156135d057602002820191906000526020600020905b8154815260200190600101908083116135bc575b50505050509050919050565b600081608001516001600160401b0316826020015161104d9190613d38565b60006001600160401b03808416908316106105ba565b7fff00000000000000000000000000000000000000000000000000000000000000811660015b60208110156106de57600891821c91613651908290613d38565b83901b7fff00000000000000000000000000000000000000000000000000000000000000169190911790600101613637565b6000818152600183016020526040812054801561376c5760006136a7600183613d25565b85549091506000906136bb90600190613d25565b90508181146137205760008660000182815481106136db576136db6144d3565b90600052602060002001549050808760000184815481106136fe576136fe6144d3565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061373157613731614644565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061104d565b600091505061104d565b5092915050565b600061104d826001613d06565b600061104d7f00000000000000000000000000000000000000000000000000000000000000008361451c565b60408051610100810182526000608080830182815260a080850184905260c0850184905260e08501849052908452845190810185528281526020808201849052818601849052606080830185905292820192909252818401528351908101845290815290918201905b8152600060209091015290565b508054600082559060005260206000209081019061126d91905b8082111561385a5760008155600101613846565b5090565b60006020828403121561387057600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60208101600583106138a1576138a1613877565b91905290565b6001600160a01b038116811461126d57600080fd5b6000806000606084860312156138d157600080fd5b8335925060208401356138e3816138a7565b915060408401356138f3816138a7565b809150509250925092565b6001600160401b038116811461126d57600080fd5b803561391e816138fe565b919050565b6000806040838503121561393657600080fd5b823591506020830135613948816138fe565b809150509250929050565b600061010082840312156106de57600080fd5b6000806000610140848603121561397c57600080fd5b83359250602084013561398e816138fe565b915061399d8560408601613953565b90509250925092565b602080825282518282018190526000918401906040840190835b818110156139de5783518352602093840193909201916001016139c0565b509095945050505050565b6000815180845260005b81811015613a0f576020818501810151868301820152016139f3565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160401b0381511682526001600160401b03602082015116602083015260ff604082015116604083015260ff60608201511660608301526000608082015160a060808501526110bd60a08501826139e9565b602081526000825160ff815116602084015260ff602082015116604084015260ff604082015116606084015260ff606082015116608084015250602083015160e060a0840152613ad8610100840182613a2f565b90506040840151613aef60c08501825160ff169052565b5060608401516001600160401b03811660e0850152509392505050565b600060208284031215613b1e57600080fd5b81356001600160401b03811115613b3457600080fd5b820161016081850312156105ba57600080fd5b6000815160408452613b5c60408501826139e9565b602093840151949093019390935250919050565b6001600160a01b038151168252600060208201518051602085015260208101516040850152604081015160608501526001600160401b0360608201511660808501526001600160401b0360808201511660a08501526001600160401b0360a08201511660c08501526001600160401b0360c08201511660e0850152506040820151610160610100850152613c08610160850182613b47565b90506060830151613c256101208601826001600160401b03169052565b5060808301516101408501528091505092915050565b602081526000825160406020840152613c576060840182613b70565b90506001600160401b0360208501511660408401528091505092915050565b60208101600783106138a1576138a1613877565b60008060408385031215613c9d57600080fd5b823591506020830135613948816138a7565b6000806101208385031215613cc357600080fd5b82359150613cd48460208501613953565b90509250929050565b6020815260006105ba6020830184613b70565b634e487b7160e01b600052601160045260246000fd5b6001600160401b03818116838216019081111561104d5761104d613cf0565b8181038181111561104d5761104d613cf0565b808202811582820484141761104d5761104d613cf0565b634e487b7160e01b600052601260045260246000fd5b600082613d7457613d74613d4f565b500490565b8082018082111561104d5761104d613cf0565b600060208284031215613d9e57600080fd5b815180151581146105ba57600080fd5b634e487b7160e01b600052600160045260246000fd5b61ffff828116828216039081111561104d5761104d613cf0565b600181811c90821680613df257607f821691505b6020821081036106de57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613e4a57613e4a613e12565b60405290565b60405160a081016001600160401b0381118282101715613e4a57613e4a613e12565b60405160e081016001600160401b0381118282101715613e4a57613e4a613e12565b604051601f8201601f191681016001600160401b0381118282101715613ebc57613ebc613e12565b604052919050565b600060408284031215613ed657600080fd5b613ede613e28565b905081356001600160401b03811115613ef657600080fd5b8201601f81018413613f0757600080fd5b80356001600160401b03811115613f2057613f20613e12565b613f33601f8201601f1916602001613e94565b818152856020838501011115613f4857600080fd5b81602084016020830137600060209282018301528352928301359282019290925292915050565b6000813603610160811215613f8357600080fd5b613f8b613e50565b8335613f96816138a7565b815260e0601f1983011215613faa57600080fd5b613fb2613e72565b60208581013582526040808701359183019190915260608601359082015291506080840135613fe0816138fe565b606083015260a0840135613ff3816138fe565b608083015260c0840135614006816138fe565b60a083015260e0840135614019816138fe565b60c08301526020810191909152610100830135906001600160401b0382111561404157600080fd5b61404d36838601613ec4565b604082015261405f6101208501613913565b6060820152610140939093013560808401525090919050565b60006020828403121561408a57600080fd5b81356105ba816138a7565b6000602082840312156140a757600080fd5b81356105ba816138fe565b60008235603e198336030181126140c857600080fd5b9190910192915050565b6000808335601e198436030181126140e957600080fd5b8301803591506001600160401b0382111561410357600080fd5b60200191503681900382131561315957600080fd5b6000813561104d816138fe565b601f82111561094357806000526020600020601f840160051c8101602085101561414c5750805b601f840160051c820191505b8181101561416c5760008155600101614158565b5050505050565b8135601e1983360301811261418757600080fd5b820180356001600160401b03811180156141a057600080fd5b8136036020840113156141b257600080fd5b600090506141ca826141c48654613dde565b86614125565b80601f8311600181146141ff578284156141e75750848201602001355b600019600386901b1c1916600185901b17865561425e565b600086815260209020601f19851690845b8281101561423257602085890181013583559485019460019092019101614210565b50858210156142525760001960f88760031b161c19602085890101351681555b505060018460011b0186555b505050505060209190910135600190910155565b813561427d816138a7565b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03919091161781556020820135600182015560408201356002820155606082013560038201556004810160808301356142d5816138fe565b815467ffffffffffffffff19166001600160401b0382161782555060a08301356142fe816138fe565b81546fffffffffffffffff0000000000000000191660409190911b6fffffffffffffffff00000000000000001617815561437261433d60c08501614118565b825467ffffffffffffffff60801b191660809190911b77ffffffffffffffff0000000000000000000000000000000016178255565b6143ca61438160e08501614118565b825477ffffffffffffffffffffffffffffffffffffffffffffffff1660c09190911b7fffffffffffffffff00000000000000000000000000000000000000000000000016178255565b506143e56143dc6101008401846140b2565b60058301614173565b6144166143f56101208401614118565b600783016001600160401b0382166001600160401b03198254161781555050565b6101409190910135600890910155565b838152823560208083019190915283013560408083019190915283013560608083019190915261012082019084013561445e816138fe565b6001600160401b038116608084015250608084013561447c816138fe565b6001600160401b03811660a08401525060a084013561449a816138fe565b6001600160401b03811660c0840152506144b660c08501613913565b6001600160401b0390811660e084015283166101008301526110bd565b634e487b7160e01b600052603260045260246000fd5b6001600160401b03828116828216039081111561104d5761104d613cf0565b60008261451757614517613d4f565b500690565b6001600160401b03818116838216029081169081811461377657613776613cf0565b60006001600160401b0383168061455757614557613d4f565b806001600160401b0384160691505092915050565b82358152602080840135908201526000610120820161459b604084016040870180358252602090810135910152565b6145b5608084016080870180358252602090810135910152565b6145cf60c0840160c0870180358252602090810135910152565b610120610100840152835190819052602084019061014084019060005b8181101561460a5783518352602093840193909201916001016145ec565b50909695505050505050565b60006001600160401b0383168061462f5761462f613d4f565b806001600160401b0384160491505092915050565b634e487b7160e01b600052603160045260246000fdfea264697066735822122022d1585d4a2549e539759684fb5042b4c2cc27b217dc5dff9d79f66b7f62b36964736f6c634300081c0033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636e2b54ee116100f9578063c0cc4add11610097578063e8aa0a0711610071578063e8aa0a0714610461578063f752196b14610474578063fb1e61ca1461049d578063fc0c546a146104bd57600080fd5b8063c0cc4add14610428578063c5d433511461043b578063d02bbe331461044e57600080fd5b8063a29c29a4116100d3578063a29c29a4146103b2578063a3a0807e146103c5578063b396dc79146103e8578063be5cdc481461040857600080fd5b80636e2b54ee146103845780639777b72c1461039757806399b6da0c1461039f57600080fd5b8063329b5a0b1161016657806351a766421161014057806351a76642146103035780635da73835146103165780636b00c8cf1461032b5780636c70bee91461036f57600080fd5b8063329b5a0b14610298578063458d2bf1146102cb5780634641dce6146102de57600080fd5b806312827602116101a2578063128276021461022e5780631d873c1b14610241578063237d84821461025457806326d6f8341461026757600080fd5b806302fa8e65146101c957806305b90773146101f95780630aefaabe14610219575b600080fd5b6101dc6101d736600461385e565b6104e3565b6040516001600160401b0390911681526020015b60405180910390f35b61020c61020736600461385e565b6105c1565b6040516101f0919061388d565b61022c6102273660046138bc565b6106e4565b005b61022c61023c366004613923565b610877565b61022c61024f366004613966565b610948565b61022c610262366004613923565b610dee565b61028a61027536600461385e565b60009081526012602052604090206003015490565b6040519081526020016101f0565b6101dc6102a636600461385e565b600090815260116020526040902060020154600160c01b90046001600160401b031690565b61028a6102d936600461385e565b61103a565b6102f16102ec36600461385e565b611053565b60405160ff90911681526020016101f0565b61028a61031136600461385e565b611066565b61031e6110c5565b6040516101f091906139a6565b61035761033936600461385e565b6000908152601260205260409020600401546001600160a01b031690565b6040516001600160a01b0390911681526020016101f0565b6103776110ec565b6040516101f09190613a84565b61022c61039236600461385e565b611263565b61031e611270565b61022c6103ad366004613b0c565b61128f565b61022c6103c036600461385e565b6117d5565b6103d86103d336600461385e565b611827565b60405190151581526020016101f0565b6103fb6103f636600461385e565b611863565b6040516101f09190613c3b565b61041b61041636600461385e565b611b45565b6040516101f09190613c76565b6103d861043636600461385e565b611c13565b61022c610449366004613c8a565b611c26565b6103d861045c366004613923565b6120a7565b61022c61046f366004613caf565b612113565b6101dc61048236600461385e565b6000908152600660205260409020546001600160401b031690565b6104b06104ab36600461385e565b612243565b6040516101f09190613cdd565b7f0000000000000000000000000000000000000000000000000000000000000000610357565b6000806104ef836105c1565b9050600081600481111561050557610505613877565b14806105225750600181600481111561052057610520613877565b145b1561054e575050600090815260116020526040902060020154600160801b90046001600160401b031690565b600281600481111561056257610562613877565b0361058e575050600090815260116020526040902060020154600160c01b90046001600160401b031690565b6000838152601160205260409020600201546105ba90600160801b90046001600160401b031642612459565b9392505050565b60008181526010602052604081205482906001600160a01b03166105f857604051635eeb253d60e11b815260040160405180910390fd5b600083815260116020526040812090815460ff16600481111561061d5761061d613877565b14801561065c5750600084815260116020526040902060020154600160c01b90046001600160401b03166001600160401b0316426001600160401b0316115b1561066b5760029250506106de565b6001815460ff16600481111561068357610683613877565b14806106a457506000815460ff1660048111156106a2576106a2613877565b145b80156106c8575060028101546001600160401b03600160801b909104811642909116115b156106d75760039250506106de565b5460ff1691505b50919050565b826000808281526012602052604090205460ff16600681111561070957610709613877565b0361072757604051638b41ec7f60e01b815260040160405180910390fd5b600084815260126020526040902060048101546001600160a01b0316331461077b576040517f57a6f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061078686611b45565b9050600481600681111561079c5761079c613877565b036107d3576040517fc2cbf77700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028160068111156107e7576107e7613877565b03610801576107fc826001015487878761246f565b61086f565b600581600681111561081557610815613877565b0361082a576107fc82600101548787876126b8565b600381600681111561083e5761083e613877565b0361084d576107fc3387612901565b600181600681111561086157610861613877565b0361086f5761086f86612923565b505050505050565b61088182826120a7565b6108b7576040517f424a04ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108c38383612b7b565b60008181526020819052604090209091506108de9033612bc0565b50600154600082815260208190526040902060ff909116906108ff90612bd5565b03610943576040516001600160401b038316815283907fc8e6c955744189a19222ec226b72ac1435d88d5745252dac56e6f679f64c037a9060200160405180910390a25b505050565b60008381526010602052604090205483906001600160a01b031661097f57604051635eeb253d60e11b815260040160405180910390fd5b600084815260106020526040902060048101546001600160401b03908116908516106109d7576040517f3b920b8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006109e38686612b7b565b60008181526020819052604090209091506109fe9033612bdf565b610a34576040517fd651ce1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601260209081526040808320600181018a90556002810180546fffffffffffffffff00000000000000001916600160401b6001600160401b038c1602179055898452601190925282209091610a8d84611b45565b6006811115610a9e57610a9e613877565b14158015610ac657506006610ab284611b45565b6006811115610ac357610ac3613877565b14155b15610afd576040517fff556acf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409020805467ffffffffffffffff1916426001600160401b0316179055610b2f8387612113565b60048201805473ffffffffffffffffffffffffffffffffffffffff191633179055600280830180546001600160401b0342811667ffffffffffffffff19909216919091179091559082018054600192600091610b8d91859116613d06565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550610bd2888360020160009054906101000a90046001600160401b0316612c01565b816001016000828254610be59190613d25565b90915550506040805160e081018252600186015481526002860154602082015260038601549181019190915260048501546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c08201526000908190610c5e90612c30565b90506006610c6b86611b45565b6006811115610c7c57610c7c613877565b03610caf57600b54606490610c949060ff1683613d38565b610c9e9190613d65565b610ca89082613d25565b9150610cb3565b8091505b610cbd3383612c4f565b8160136000016000828254610cd29190613d79565b9091555050600384018190556004840154610cf6906001600160a01b031686612d23565b835460ff191660011784556040516001600160401b038a1681528a907f8f301470a994578b52323d625dfbf827ca5208c81747d3459be7b8867baec3ec9060200160405180910390a2600486015460028401546001600160401b039081169116148015610d7857506000835460ff166004811115610d7657610d76613877565b145b15610de257825460ff191660011783556002830180546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040518a907f85e1543bf2f84fe80c6badbce3648c8539ad1df4d2b3d822938ca0538be727e690600090a25b50505050505050505050565b6001610df983611b45565b6006811115610e0a57610e0a613877565b14610e41576040517fae9dcffd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4b8282612d45565b6000828152601260209081526040808320600180820154855260108452828520600b54845160e08101865292820154835260028201549583019590955260038101549382019390935260048301546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0820152909391926064916201000090910460ff1690610eee90612c30565b610ef89190613d38565b610f029190613d65565b600b54909150600090606490610f22906301000000900460ff1684613d38565b610f2c9190613d65565b90508060136001016000828254610f439190613d79565b909155505060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd99190613d8c565b610fe557610fe5613dae565b81846003016000828254610ff99190613d25565b9091555050600b5460008781526006602052604090205461010090910460ff16906001600160401b03166001600160401b03161061086f5761086f86612923565b600061104d82611048612f5c565b612f67565b92915050565b600061104d82611061612f5c565b612f7b565b60008181526012602090815260408083206001810154845260109092528220600c54610100906110a090600160801b900460ff1682613dc4565b60018301546110b39161ffff1690613d38565b6110bd9190613d65565b949350505050565b336000908152600a602052604090206060906110e7906110e49061300d565b90565b905090565b6110f46137b6565b604080516101008082018352600b805460ff8082166080808701918252948304821660a080880191909152620100008404831660c08801526301000000909304821660e0870152855285519182018652600c80546001600160401b038082168552600160401b820416602085810191909152600160801b82048416988501989098527101000000000000000000000000000000000090049091166060830152600d80549596939593870194929391928401916111af90613dde565b80601f01602080910402602001604051908101604052809291908181526020018280546111db90613dde565b80156112285780601f106111fd57610100808354040283529160200191611228565b820191906000526020600020905b81548152906001019060200180831161120b57829003601f168201915b5050509190925250505081526040805160208181018352600385015460ff1682528301526004909201546001600160401b0316910152919050565b61126d8133611c26565b50565b3360009081526009602052604090206060906110e7906110e49061300d565b60006112a261129d83613f6f565b61301a565b9050336112b26020840184614078565b6001600160a01b0316146112d9576040516334c69e3160e11b815260040160405180910390fd5b6000818152601060205260409020546001600160a01b031615611328576040517ffc7d069000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61133a61014083016101208401614095565b6001600160401b03161580611381575061135a60e0830160c08401614095565b6001600160401b031661137561014084016101208501614095565b6001600160401b031610155b156113b8576040517fdf63f61a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113c860a0830160808401614095565b6001600160401b031660000361140a576040517f535ed2be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61141a60a0830160808401614095565b6001600160401b0316611434610100840160e08501614095565b6001600160401b03161115611475576040517fb9551ab100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148560e0830160c08401614095565b6001600160401b03166000036114c7576040517f090a5ecd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020820135600003611505576040517f6aba7aae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060820135600003611543576040517ffb7df0c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040820135600003611581576040517f47ba51c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61158f6101008301836140b2565b61159990806140d2565b90506000036115d4576040517f86f8cf9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f546001600160401b03166115f060e0840160c08501614095565b6001600160401b03161115611631576040517f1267b3f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601060205260409020829061164b8282614272565b5061165e905060e0830160c08401614095565b6116689042613d06565b600082815260116020526040902060020180546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556116b561014083016101208401614095565b6116bf9042613d06565b600082815260116020908152604090912060020180546001600160401b0393909316600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909316929092179091556117209061171a90840184614078565b8261304a565b600061173361172e84613f6f565b61306c565b600083815260116020526040812060010182905560138054929350839290919061175e908490613d79565b9091555061176e90503382612c4f565b6000828152601160209081526040918290206002015491517f1bf9c457accf8703dbf7cdf1b58c2f74ddf2e525f98155c70b3d318d74609bd8926117c892869290880191600160c01b90046001600160401b031690614426565b60405180910390a1505050565b806000808281526012602052604090205460ff1660068111156117fa576117fa613877565b0361181857604051638b41ec7f60e01b815260040160405180910390fd5b6118238233336106e4565b5050565b600080600061183d84611838612f5c565b6130a8565b90925090508180156110bd5750600254600160801b900460ff9081169116109392505050565b6118e6604051806040016040528061381f6040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b816000808281526012602052604090205460ff16600681111561190b5761190b613877565b0361192957604051638b41ec7f60e01b815260040160405180910390fd5b60008381526012602052604090206119ba604051806040016040528061381f6040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b600180830154600090815260106020908152604091829020825160a0808201855282546001600160a01b03168252845160e08101865295830154865260028301548685015260038301548686015260048301546001600160401b038082166060890152600160401b820481166080890152600160801b8204811692880192909252600160c01b90041660c0860152918201939093528151808301835260058401805492949385019282908290611a6f90613dde565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9b90613dde565b8015611ae85780601f10611abd57610100808354040283529160200191611ae8565b820191906000526020600020905b815481529060010190602001808311611acb57829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b0390811683830152600890930154604090920191909152918352600290930154600160401b900490921691810191909152915050919050565b600081815260126020526040812060018101548203611b675750600092915050565b6000611b7682600101546105c1565b90506004825460ff166006811115611b9057611b90613877565b03611b9f575060049392505050565b6002816004811115611bb357611bb3613877565b03611bc2575060059392505050565b6003816004811115611bd657611bd6613877565b03611be5575060029392505050565b6004816004811115611bf957611bf9613877565b03611c08575060039392505050565b505460ff1692915050565b600061104d82611c21612f5c565b613160565b60008281526010602052604090205482906001600160a01b0316611c5d57604051635eeb253d60e11b815260040160405180910390fd5b6000838152601060209081526040808320601190925290912081546001600160a01b03163314611ca0576040516334c69e3160e11b815260040160405180910390fd5b6000611cab866105c1565b90506002816004811115611cc157611cc1613877565b14158015611ce157506004816004811115611cde57611cde613877565b14155b8015611cff57506003816004811115611cfc57611cfc613877565b14155b15611d36576040517fc00b5b5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160010154600003611d74576040517fbd8bdd9400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816004811115611d8857611d88613877565b03611e2657815460ff1916600217825560405186907ff903f4774c7bd27355f9d7fcbc382b079b164a697a44ac5d95267a4c3cb3bb2290600090a2600086815260116020526040902060020154611df0908790600160c01b90046001600160401b0316612c01565b6002830154611e0891906001600160401b0316613d38565b826001016000828254611e1b9190613d79565b90915550611fb39050565b6004816004811115611e3a57611e3a613877565b03611fa7576040805160a0808201835285546001600160a01b03168252825160e08101845260018701548152600287015460208281019190915260038801548286015260048801546001600160401b038082166060850152600160401b820481166080850152600160801b8204811694840194909452600160c01b900490921660c08201529082015281518083018352600586018054611f9d94889390850192909182908290611ee990613dde565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1590613dde565b8015611f625780601f10611f3757610100808354040283529160200191611f62565b820191906000526020600020905b815481529060010190602001808311611f4557829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b03169082015260089091015460409091015261306c565b6001830155611fb3565b815460ff191660031782555b8254611fc8906001600160a01b031687613197565b600182015460148054829190600090611fe2908490613d79565b909155505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612056573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207a9190613d8c565b61209757604051637c2ccffd60e11b815260040160405180910390fd5b5050600060019091015550505050565b600033816120b58585612b7b565b90506120c0816131b9565b80156120e95750600154600082815260208190526040902060ff909116906120e790612bd5565b105b801561210a575060008181526020819052604090206121089083612bdf565b155b95945050505050565b6000828152601260209081526040808320600101548084526010909252909120546001600160a01b031661215a57604051635eeb253d60e11b815260040160405180910390fd5b6000838152601260209081526040808320600181015484526010835281842082516003808252608082019094529194909390929082016060803683370190505090506121ad6121a88761103a565b6131e6565b816000815181106121c0576121c06144d3565b602090810291909101015260068201546121d9906131f7565b816001815181106121ec576121ec6144d3565b6020026020010181815250508260020160089054906101000a90046001600160401b03166001600160401b03168160028151811061222c5761222c6144d3565b60200260200101818152505061086f868683613203565b6122b86040805160a080820183526000808352835160e081018552818152602080820183905281860183905260608083018490526080830184905293820183905260c0820183905280850191909152845180860186529283528201529091820190815260006020820181905260409091015290565b60008281526010602052604090205482906001600160a01b03166122ef57604051635eeb253d60e11b815260040160405180910390fd5b600083815260106020908152604091829020825160a0808201855282546001600160a01b03168252845160e0810186526001840154815260028401548186015260038401548187015260048401546001600160401b038082166060840152600160401b820481166080840152600160801b8204811693830193909352600160c01b900490911660c082015292810192909252825180840184526005820180549394929392850192829082906123a390613dde565b80601f01602080910402602001604051908101604052809291908181526020018280546123cf90613dde565b801561241c5780601f106123f15761010080835404028352916020019161241c565b820191906000526020600020905b8154815290600101906020018083116123ff57829003601f168201915b50505091835250506001919091015460209182015290825260078301546001600160401b0316908201526008909101546040909101529392505050565b600081831061246857816105ba565b5090919050565b60008481526010602052604090205484906001600160a01b03166124a657604051635eeb253d60e11b815260040160405180910390fd5b600085815260116020908152604080832060108352818420815460ff191660031782558885526012909352922081546124e8906001600160a01b031689613197565b6004810154612500906001600160a01b031688612901565b600281015460009061251c908a906001600160401b0316612c01565b600383015490915061252e8183613d79565b60148054600090612540908490613d79565b90915550508254600490849060ff1916600183021790555060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156125c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125eb9190613d8c565b61260857604051637c2ccffd60e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038881166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269b9190613d8c565b610de257604051637c2ccffd60e11b815260040160405180910390fd5b60008481526010602052604090205484906001600160a01b03166126ef57604051635eeb253d60e11b815260040160405180910390fd5b60008481526012602052604090206004810154612715906001600160a01b031686612901565b600281015460009061275b9088906001600160401b0316612756826000908152601160205260409020600201546001600160401b03600160c01b9091041690565b6133a1565b600383015490915061276d8183613d79565b6014805460009061277f908490613d79565b90915550508254600490849060ff1916600183021790555060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282a9190613d8c565b61284757604051637c2ccffd60e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156128b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128da9190613d8c565b6128f757604051637c2ccffd60e11b815260040160405180910390fd5b5050505050505050565b6001600160a01b0382166000908152600a602052604090206109439082613480565b6000818152601260209081526040808320600181015480855260119093529220600283015461295c9083906001600160401b0316612c01565b81600101600082825461296f9190613d79565b9091555050600483015461298c906001600160a01b031685612901565b60008481526020819052604081209081816129a7828261382c565b5050845460ff1916600617855550506002808401805467ffffffffffffffff1916905560006003850181905560048501805473ffffffffffffffffffffffffffffffffffffffff19169055908201805460019290612a0f9084906001600160401b03166144e9565b82546101009290920a6001600160401b038181021990931691831602179091556002850154604051600160401b90910490911681528391507f33ba8f7627565d89f7ada2a6b81ea532b7aa9b11e91a78312d6e1fca0bfcd1dc9060200160405180910390a26000848152600660205260409020805467ffffffffffffffff19169055600082815260106020526040812060028301546004820154919291612ac2916001600160401b0390811691166144e9565b60048301546001600160401b039182169250600160c01b90041681118015612aff57506001835460ff166004811115612afd57612afd613877565b145b1561086f57825460ff19166004178355612b1a6001426144e9565b6002840180546001600160401b0392909216600160801b0267ffffffffffffffff60801b1990921691909117905560405184907f4769361a442504ecaf038f35e119bcccdd5e42096b24c09e3c17fd17c6684c0290600090a2505050505050565b60008282604051602001612ba29291909182526001600160401b0316602082015260400190565b60405160208183030381529060405280519060200120905092915050565b60006105ba836001600160a01b03841661348c565b600061104d825490565b6001600160a01b038116600090815260018301602052604081205415156105ba565b6000828152601160205260408120600201546105ba9084908490600160801b90046001600160401b03166133a1565b600081608001516001600160401b0316826040015161104d9190613d38565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152306024830181905260448301849052917f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af1158015612ce2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d069190613d8c565b61094357604051637c2ccffd60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040902061094390826134db565b6000612d50826134e7565b6001600160401b03169050428110612d94576040517f6b4b1a4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254612db190600160401b90046001600160401b031682613d79565b4210612de9576040517fde55698e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602090815260408083206001600160401b038616845290915290205460ff1615612e45576040517efab7d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e4f8383613160565b612e85576040517fd3ffa66b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526008602090815260408083206001600160401b038616845290915290205460ff1615612ee2576040517f98e7e55100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526008602090815260408083206001600160401b038087168552908352818420805460ff1916600190811790915587855260069093529083208054929390929091612f3391859116613d06565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b60006110e7426134fa565b60006105ba612f768484612f7b565b613526565b600080612f8a61010043614508565b60025490915060009061010090612fb99071010000000000000000000000000000000000900460ff168661451c565b612fc3919061453e565b6001600160401b031690506000612fdc61010087614508565b9050600061010082612fee8587613d79565b612ff89190613d79565b6130029190614508565b979650505050505050565b606060006105ba83613580565b60008160405160200161302d9190613cdd565b604051602081830303815290604052805190602001209050919050565b6001600160a01b038216600090815260096020526040902061094390826134db565b600061307b82602001516135dc565b602083015160a0810151606090910151613095919061451c565b6001600160401b031661104d9190613d38565b60008060006130b685611b45565b600086815260056020526040812054919250906130db906001600160401b03166134fa565b905060018260068111156130f1576130f1613877565b141580613105575061310385826135fb565b155b1561311857600080935093505050613159565b6131228686612f7b565b9250600061312f84613526565b9050600061313c88611066565b905080158061315257506131508183614508565b155b9550505050505b9250929050565b600080600061316f85856130a8565b909250905081801561210a5750600254600160801b900460ff90811691161015949350505050565b6001600160a01b03821660009081526009602052604090206109439082613480565b60008060008381526012602052604090205460ff1660068111156131df576131df613877565b1492915050565b600060ff198216816110bd82613611565b6000806105ba83613611565b60008381526007602052604081209061321a612f5c565b6001600160401b0316815260208101919091526040016000205460ff161561326e576040517f3edef7db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480546040517f94c8919d0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116916394c8919d916132b891869186910161456c565b602060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f99190613d8c565b61332f576040517ffcd03a4700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260408120600191613348612f5c565b6001600160401b031681526020808201929092526040908101600020805460ff19169315159390931790925590518481527f3b989d183b84b02259d7c14b34a9c9eb0fccb4c355a920d25e581e25aef4993d91016117c8565b60008381526010602052604081206001600160401b03808416908516106133f4576040517f56607cb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600183015481526002830154602082015260038301549181019190915260048201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0820152613463906135dc565b61346d85856144e9565b6001600160401b031661210a9190613d38565b60006105ba8383613683565b60008181526001830160205260408120546134d35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561104d565b50600061104d565b60006105ba838361348c565b600061104d6134f58361377d565b61378a565b600061104d7f000000000000000000000000000000000000000000000000000000000000000083614616565b60008060ff8316613538600143613d25565b6135429190613d25565b409050600081900361355657613556613dae565b60408051602081018390520160405160208183030381529060405280519060200120915050919050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156135d057602002820191906000526020600020905b8154815260200190600101908083116135bc575b50505050509050919050565b600081608001516001600160401b0316826020015161104d9190613d38565b60006001600160401b03808416908316106105ba565b7fff00000000000000000000000000000000000000000000000000000000000000811660015b60208110156106de57600891821c91613651908290613d38565b83901b7fff00000000000000000000000000000000000000000000000000000000000000169190911790600101613637565b6000818152600183016020526040812054801561376c5760006136a7600183613d25565b85549091506000906136bb90600190613d25565b90508181146137205760008660000182815481106136db576136db6144d3565b90600052602060002001549050808760000184815481106136fe576136fe6144d3565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061373157613731614644565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061104d565b600091505061104d565b5092915050565b600061104d826001613d06565b600061104d7f00000000000000000000000000000000000000000000000000000000000000008361451c565b60408051610100810182526000608080830182815260a080850184905260c0850184905260e08501849052908452845190810185528281526020808201849052818601849052606080830185905292820192909252818401528351908101845290815290918201905b8152600060209091015290565b508054600082559060005260206000209081019061126d91905b8082111561385a5760008155600101613846565b5090565b60006020828403121561387057600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60208101600583106138a1576138a1613877565b91905290565b6001600160a01b038116811461126d57600080fd5b6000806000606084860312156138d157600080fd5b8335925060208401356138e3816138a7565b915060408401356138f3816138a7565b809150509250925092565b6001600160401b038116811461126d57600080fd5b803561391e816138fe565b919050565b6000806040838503121561393657600080fd5b823591506020830135613948816138fe565b809150509250929050565b600061010082840312156106de57600080fd5b6000806000610140848603121561397c57600080fd5b83359250602084013561398e816138fe565b915061399d8560408601613953565b90509250925092565b602080825282518282018190526000918401906040840190835b818110156139de5783518352602093840193909201916001016139c0565b509095945050505050565b6000815180845260005b81811015613a0f576020818501810151868301820152016139f3565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160401b0381511682526001600160401b03602082015116602083015260ff604082015116604083015260ff60608201511660608301526000608082015160a060808501526110bd60a08501826139e9565b602081526000825160ff815116602084015260ff602082015116604084015260ff604082015116606084015260ff606082015116608084015250602083015160e060a0840152613ad8610100840182613a2f565b90506040840151613aef60c08501825160ff169052565b5060608401516001600160401b03811660e0850152509392505050565b600060208284031215613b1e57600080fd5b81356001600160401b03811115613b3457600080fd5b820161016081850312156105ba57600080fd5b6000815160408452613b5c60408501826139e9565b602093840151949093019390935250919050565b6001600160a01b038151168252600060208201518051602085015260208101516040850152604081015160608501526001600160401b0360608201511660808501526001600160401b0360808201511660a08501526001600160401b0360a08201511660c08501526001600160401b0360c08201511660e0850152506040820151610160610100850152613c08610160850182613b47565b90506060830151613c256101208601826001600160401b03169052565b5060808301516101408501528091505092915050565b602081526000825160406020840152613c576060840182613b70565b90506001600160401b0360208501511660408401528091505092915050565b60208101600783106138a1576138a1613877565b60008060408385031215613c9d57600080fd5b823591506020830135613948816138a7565b6000806101208385031215613cc357600080fd5b82359150613cd48460208501613953565b90509250929050565b6020815260006105ba6020830184613b70565b634e487b7160e01b600052601160045260246000fd5b6001600160401b03818116838216019081111561104d5761104d613cf0565b8181038181111561104d5761104d613cf0565b808202811582820484141761104d5761104d613cf0565b634e487b7160e01b600052601260045260246000fd5b600082613d7457613d74613d4f565b500490565b8082018082111561104d5761104d613cf0565b600060208284031215613d9e57600080fd5b815180151581146105ba57600080fd5b634e487b7160e01b600052600160045260246000fd5b61ffff828116828216039081111561104d5761104d613cf0565b600181811c90821680613df257607f821691505b6020821081036106de57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613e4a57613e4a613e12565b60405290565b60405160a081016001600160401b0381118282101715613e4a57613e4a613e12565b60405160e081016001600160401b0381118282101715613e4a57613e4a613e12565b604051601f8201601f191681016001600160401b0381118282101715613ebc57613ebc613e12565b604052919050565b600060408284031215613ed657600080fd5b613ede613e28565b905081356001600160401b03811115613ef657600080fd5b8201601f81018413613f0757600080fd5b80356001600160401b03811115613f2057613f20613e12565b613f33601f8201601f1916602001613e94565b818152856020838501011115613f4857600080fd5b81602084016020830137600060209282018301528352928301359282019290925292915050565b6000813603610160811215613f8357600080fd5b613f8b613e50565b8335613f96816138a7565b815260e0601f1983011215613faa57600080fd5b613fb2613e72565b60208581013582526040808701359183019190915260608601359082015291506080840135613fe0816138fe565b606083015260a0840135613ff3816138fe565b608083015260c0840135614006816138fe565b60a083015260e0840135614019816138fe565b60c08301526020810191909152610100830135906001600160401b0382111561404157600080fd5b61404d36838601613ec4565b604082015261405f6101208501613913565b6060820152610140939093013560808401525090919050565b60006020828403121561408a57600080fd5b81356105ba816138a7565b6000602082840312156140a757600080fd5b81356105ba816138fe565b60008235603e198336030181126140c857600080fd5b9190910192915050565b6000808335601e198436030181126140e957600080fd5b8301803591506001600160401b0382111561410357600080fd5b60200191503681900382131561315957600080fd5b6000813561104d816138fe565b601f82111561094357806000526020600020601f840160051c8101602085101561414c5750805b601f840160051c820191505b8181101561416c5760008155600101614158565b5050505050565b8135601e1983360301811261418757600080fd5b820180356001600160401b03811180156141a057600080fd5b8136036020840113156141b257600080fd5b600090506141ca826141c48654613dde565b86614125565b80601f8311600181146141ff578284156141e75750848201602001355b600019600386901b1c1916600185901b17865561425e565b600086815260209020601f19851690845b8281101561423257602085890181013583559485019460019092019101614210565b50858210156142525760001960f88760031b161c19602085890101351681555b505060018460011b0186555b505050505060209190910135600190910155565b813561427d816138a7565b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03919091161781556020820135600182015560408201356002820155606082013560038201556004810160808301356142d5816138fe565b815467ffffffffffffffff19166001600160401b0382161782555060a08301356142fe816138fe565b81546fffffffffffffffff0000000000000000191660409190911b6fffffffffffffffff00000000000000001617815561437261433d60c08501614118565b825467ffffffffffffffff60801b191660809190911b77ffffffffffffffff0000000000000000000000000000000016178255565b6143ca61438160e08501614118565b825477ffffffffffffffffffffffffffffffffffffffffffffffff1660c09190911b7fffffffffffffffff00000000000000000000000000000000000000000000000016178255565b506143e56143dc6101008401846140b2565b60058301614173565b6144166143f56101208401614118565b600783016001600160401b0382166001600160401b03198254161781555050565b6101409190910135600890910155565b838152823560208083019190915283013560408083019190915283013560608083019190915261012082019084013561445e816138fe565b6001600160401b038116608084015250608084013561447c816138fe565b6001600160401b03811660a08401525060a084013561449a816138fe565b6001600160401b03811660c0840152506144b660c08501613913565b6001600160401b0390811660e084015283166101008301526110bd565b634e487b7160e01b600052603260045260246000fd5b6001600160401b03828116828216039081111561104d5761104d613cf0565b60008261451757614517613d4f565b500690565b6001600160401b03818116838216029081169081811461377657613776613cf0565b60006001600160401b0383168061455757614557613d4f565b806001600160401b0384160691505092915050565b82358152602080840135908201526000610120820161459b604084016040870180358252602090810135910152565b6145b5608084016080870180358252602090810135910152565b6145cf60c0840160c0870180358252602090810135910152565b610120610100840152835190819052602084019061014084019060005b8181101561460a5783518352602093840193909201916001016145ec565b50909695505050505050565b60006001600160401b0383168061462f5761462f613d4f565b806001600160401b0384160491505092915050565b634e487b7160e01b600052603160045260246000fdfea264697066735822122022d1585d4a2549e539759684fb5042b4c2cc27b217dc5dff9d79f66b7f62b36964736f6c634300081c0033",
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {
|
|
"fillSlot(bytes32,uint64,((uint256,uint256),((uint256,uint256),(uint256,uint256)),(uint256,uint256)))": {
|
|
"params": {
|
|
"proof": "Groth16 proof procing possession of the slot data.",
|
|
"requestId": "RequestId identifying the request containing the slot to fill.",
|
|
"slotIndex": "Index of the slot in the request."
|
|
}
|
|
},
|
|
"freeSlot(bytes32)": {
|
|
"details": "The host that filled the slot must have initiated the transaction (msg.sender). This overload allows `rewardRecipient` and `collateralRecipient` to be optional.",
|
|
"params": {
|
|
"slotId": "id of the slot to free"
|
|
}
|
|
},
|
|
"freeSlot(bytes32,address,address)": {
|
|
"params": {
|
|
"collateralRecipient": "address to refund collateral to",
|
|
"rewardRecipient": "address to send rewards to",
|
|
"slotId": "id of the slot to free"
|
|
}
|
|
},
|
|
"getChallenge(bytes32)": {
|
|
"params": {
|
|
"id": "Slot's ID for which the challenge should be calculated"
|
|
},
|
|
"returns": {
|
|
"_0": "Challenge for current Period that should be used for generation of proofs"
|
|
}
|
|
},
|
|
"getPointer(bytes32)": {
|
|
"details": "For more information see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md)",
|
|
"params": {
|
|
"id": "Slot's ID for which the pointer should be calculated"
|
|
},
|
|
"returns": {
|
|
"_0": "Uint8 pointer that is stable over current Period, ie an integer offset [0-255] of the last 256 blocks, pointing to a block that remains constant for the entire Period's duration."
|
|
}
|
|
},
|
|
"isProofRequired(bytes32)": {
|
|
"params": {
|
|
"id": "Slot's ID for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned."
|
|
},
|
|
"returns": {
|
|
"_0": "bool indicating if proof is required for current period"
|
|
}
|
|
},
|
|
"missingProofs(bytes32)": {
|
|
"returns": {
|
|
"_0": "Number of missed proofs since Slot was Filled"
|
|
}
|
|
},
|
|
"willProofBeRequired(bytes32)": {
|
|
"details": "for more info about downtime see [timing of storage proofs](https://github.com/codex-storage/codex-research/blob/41c4b4409d2092d0a5475aca0f28995034e58d14/design/storage-proof-timing.md#pointer-downtime)",
|
|
"params": {
|
|
"id": "SlotId for which the proof requirements should be checked. If the Slot's state is other than Filled, `false` is always returned."
|
|
},
|
|
"returns": {
|
|
"_0": "bool"
|
|
}
|
|
},
|
|
"withdrawFunds(bytes32)": {
|
|
"details": "Request must be cancelled, failed or finished, and the transaction must originate from the depositor address.",
|
|
"params": {
|
|
"requestId": "the id of the request"
|
|
}
|
|
},
|
|
"withdrawFunds(bytes32,address)": {
|
|
"details": "Request must be expired, must be in RequestState.New, and the transaction must originate from the depositer address.",
|
|
"params": {
|
|
"requestId": "the id of the request",
|
|
"withdrawRecipient": "address to return the remaining funds to"
|
|
}
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {
|
|
"fillSlot(bytes32,uint64,((uint256,uint256),((uint256,uint256),(uint256,uint256)),(uint256,uint256)))": {
|
|
"notice": "Fills a slot. Reverts if an invalid proof of the slot data is provided."
|
|
},
|
|
"freeSlot(bytes32)": {
|
|
"notice": "Frees a slot, paying out rewards and returning collateral for finished or cancelled requests to the host that has filled the slot."
|
|
},
|
|
"freeSlot(bytes32,address,address)": {
|
|
"notice": "Frees a slot, paying out rewards and returning collateral for finished or cancelled requests."
|
|
},
|
|
"willProofBeRequired(bytes32)": {
|
|
"notice": "Proof Downtime specifies part of the Period when the proof is not required even if the proof should be required. This function returns true if the pointer is in downtime (hence no proof required now) and at the same time the proof will be required later on in the Period."
|
|
},
|
|
"withdrawFunds(bytes32)": {
|
|
"notice": "Withdraws remaining storage request funds back to the client that deposited them."
|
|
},
|
|
"withdrawFunds(bytes32,address)": {
|
|
"notice": "Withdraws storage request funds to the provided address."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 6021,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_reservations",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_struct(AddressSet)1902_storage)"
|
|
},
|
|
{
|
|
"astId": 6024,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_config",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_struct(SlotReservationsConfig)2228_storage"
|
|
},
|
|
{
|
|
"astId": 5256,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_config",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_struct(ProofConfig)2225_storage"
|
|
},
|
|
{
|
|
"astId": 5259,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_verifier",
|
|
"offset": 0,
|
|
"slot": "4",
|
|
"type": "t_contract(IGroth16Verifier)2421"
|
|
},
|
|
{
|
|
"astId": 5296,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_slotStarts",
|
|
"offset": 0,
|
|
"slot": "5",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_uint64)"
|
|
},
|
|
{
|
|
"astId": 5301,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_missed",
|
|
"offset": 0,
|
|
"slot": "6",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_uint64)"
|
|
},
|
|
{
|
|
"astId": 5309,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_received",
|
|
"offset": 0,
|
|
"slot": "7",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_mapping(t_userDefinedValueType(Period)5086,t_bool))"
|
|
},
|
|
{
|
|
"astId": 5317,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_missing",
|
|
"offset": 0,
|
|
"slot": "8",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_mapping(t_userDefinedValueType(Period)5086,t_bool))"
|
|
},
|
|
{
|
|
"astId": 6166,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_requestsPerClient",
|
|
"offset": 0,
|
|
"slot": "9",
|
|
"type": "t_mapping(t_address,t_struct(Bytes32Set)1781_storage)"
|
|
},
|
|
{
|
|
"astId": 6171,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_slotsPerHost",
|
|
"offset": 0,
|
|
"slot": "10",
|
|
"type": "t_mapping(t_address,t_struct(Bytes32Set)1781_storage)"
|
|
},
|
|
{
|
|
"astId": 3104,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_config",
|
|
"offset": 0,
|
|
"slot": "11",
|
|
"type": "t_struct(MarketplaceConfig)2204_storage"
|
|
},
|
|
{
|
|
"astId": 3110,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_requests",
|
|
"offset": 0,
|
|
"slot": "16",
|
|
"type": "t_mapping(t_userDefinedValueType(RequestId)5830,t_struct(Request)5845_storage)"
|
|
},
|
|
{
|
|
"astId": 3116,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_requestContexts",
|
|
"offset": 0,
|
|
"slot": "17",
|
|
"type": "t_mapping(t_userDefinedValueType(RequestId)5830,t_struct(RequestContext)3140_storage)"
|
|
},
|
|
{
|
|
"astId": 3122,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_slots",
|
|
"offset": 0,
|
|
"slot": "18",
|
|
"type": "t_mapping(t_userDefinedValueType(SlotId)5832,t_struct(Slot)3158_storage)"
|
|
},
|
|
{
|
|
"astId": 3125,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_marketplaceTotals",
|
|
"offset": 0,
|
|
"slot": "19",
|
|
"type": "t_struct(MarketplaceTotals)5079_storage"
|
|
}
|
|
],
|
|
"types": {
|
|
"t_address": {
|
|
"encoding": "inplace",
|
|
"label": "address",
|
|
"numberOfBytes": "20"
|
|
},
|
|
"t_array(t_bytes32)dyn_storage": {
|
|
"base": "t_bytes32",
|
|
"encoding": "dynamic_array",
|
|
"label": "bytes32[]",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_bool": {
|
|
"encoding": "inplace",
|
|
"label": "bool",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_bytes32": {
|
|
"encoding": "inplace",
|
|
"label": "bytes32",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_bytes_storage": {
|
|
"encoding": "bytes",
|
|
"label": "bytes",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_contract(IGroth16Verifier)2421": {
|
|
"encoding": "inplace",
|
|
"label": "contract IGroth16Verifier",
|
|
"numberOfBytes": "20"
|
|
},
|
|
"t_enum(RequestState)5871": {
|
|
"encoding": "inplace",
|
|
"label": "enum RequestState",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_enum(SlotState)5879": {
|
|
"encoding": "inplace",
|
|
"label": "enum SlotState",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_mapping(t_address,t_struct(Bytes32Set)1781_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_address",
|
|
"label": "mapping(address => struct EnumerableSet.Bytes32Set)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(Bytes32Set)1781_storage"
|
|
},
|
|
"t_mapping(t_bytes32,t_uint256)": {
|
|
"encoding": "mapping",
|
|
"key": "t_bytes32",
|
|
"label": "mapping(bytes32 => uint256)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_uint256"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(Period)5086,t_bool)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(Period)5086",
|
|
"label": "mapping(Periods.Period => bool)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_bool"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(RequestId)5830,t_struct(Request)5845_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(RequestId)5830",
|
|
"label": "mapping(RequestId => struct Request)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(Request)5845_storage"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(RequestId)5830,t_struct(RequestContext)3140_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(RequestId)5830",
|
|
"label": "mapping(RequestId => struct Marketplace.RequestContext)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(RequestContext)3140_storage"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(SlotId)5832,t_mapping(t_userDefinedValueType(Period)5086,t_bool))": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(SlotId)5832",
|
|
"label": "mapping(SlotId => mapping(Periods.Period => bool))",
|
|
"numberOfBytes": "32",
|
|
"value": "t_mapping(t_userDefinedValueType(Period)5086,t_bool)"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(SlotId)5832,t_struct(AddressSet)1902_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(SlotId)5832",
|
|
"label": "mapping(SlotId => struct EnumerableSet.AddressSet)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(AddressSet)1902_storage"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(SlotId)5832,t_struct(Slot)3158_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(SlotId)5832",
|
|
"label": "mapping(SlotId => struct Marketplace.Slot)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(Slot)3158_storage"
|
|
},
|
|
"t_mapping(t_userDefinedValueType(SlotId)5832,t_uint64)": {
|
|
"encoding": "mapping",
|
|
"key": "t_userDefinedValueType(SlotId)5832",
|
|
"label": "mapping(SlotId => uint64)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_uint64"
|
|
},
|
|
"t_string_storage": {
|
|
"encoding": "bytes",
|
|
"label": "string",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_struct(AddressSet)1902_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct EnumerableSet.AddressSet",
|
|
"members": [
|
|
{
|
|
"astId": 1901,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_inner",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_struct(Set)1587_storage"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(Ask)5860_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Ask",
|
|
"members": [
|
|
{
|
|
"astId": 5847,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "proofProbability",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 5849,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "pricePerBytePerSecond",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 5851,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "collateralPerByte",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 5853,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "slots",
|
|
"offset": 0,
|
|
"slot": "3",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 5855,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "slotSize",
|
|
"offset": 8,
|
|
"slot": "3",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 5857,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "duration",
|
|
"offset": 16,
|
|
"slot": "3",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 5859,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "maxSlotLoss",
|
|
"offset": 24,
|
|
"slot": "3",
|
|
"type": "t_uint64"
|
|
}
|
|
],
|
|
"numberOfBytes": "128"
|
|
},
|
|
"t_struct(Bytes32Set)1781_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct EnumerableSet.Bytes32Set",
|
|
"members": [
|
|
{
|
|
"astId": 1780,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_inner",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_struct(Set)1587_storage"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(CollateralConfig)2214_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct CollateralConfig",
|
|
"members": [
|
|
{
|
|
"astId": 2207,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "repairRewardPercentage",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
},
|
|
{
|
|
"astId": 2209,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "maxNumberOfSlashes",
|
|
"offset": 1,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
},
|
|
{
|
|
"astId": 2211,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "slashPercentage",
|
|
"offset": 2,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
},
|
|
{
|
|
"astId": 2213,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "validatorRewardPercentage",
|
|
"offset": 3,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
}
|
|
],
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_struct(Content)5865_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Content",
|
|
"members": [
|
|
{
|
|
"astId": 5862,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "cid",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_bytes_storage"
|
|
},
|
|
{
|
|
"astId": 5864,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "merkleRoot",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_bytes32"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(MarketplaceConfig)2204_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct MarketplaceConfig",
|
|
"members": [
|
|
{
|
|
"astId": 2195,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "collateral",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_struct(CollateralConfig)2214_storage"
|
|
},
|
|
{
|
|
"astId": 2198,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "proofs",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_struct(ProofConfig)2225_storage"
|
|
},
|
|
{
|
|
"astId": 2201,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "reservations",
|
|
"offset": 0,
|
|
"slot": "3",
|
|
"type": "t_struct(SlotReservationsConfig)2228_storage"
|
|
},
|
|
{
|
|
"astId": 2203,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "requestDurationLimit",
|
|
"offset": 0,
|
|
"slot": "4",
|
|
"type": "t_uint64"
|
|
}
|
|
],
|
|
"numberOfBytes": "160"
|
|
},
|
|
"t_struct(MarketplaceTotals)5079_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Marketplace.MarketplaceTotals",
|
|
"members": [
|
|
{
|
|
"astId": 5076,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "received",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 5078,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "sent",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_uint256"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(ProofConfig)2225_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct ProofConfig",
|
|
"members": [
|
|
{
|
|
"astId": 2216,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "period",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 2218,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "timeout",
|
|
"offset": 8,
|
|
"slot": "0",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 2220,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "downtime",
|
|
"offset": 16,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
},
|
|
{
|
|
"astId": 2222,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "downtimeProduct",
|
|
"offset": 17,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
},
|
|
{
|
|
"astId": 2224,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "zkeyHash",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_string_storage"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(Request)5845_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Request",
|
|
"members": [
|
|
{
|
|
"astId": 5834,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "client",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_address"
|
|
},
|
|
{
|
|
"astId": 5837,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "ask",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_struct(Ask)5860_storage"
|
|
},
|
|
{
|
|
"astId": 5840,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "content",
|
|
"offset": 0,
|
|
"slot": "5",
|
|
"type": "t_struct(Content)5865_storage"
|
|
},
|
|
{
|
|
"astId": 5842,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "expiry",
|
|
"offset": 0,
|
|
"slot": "7",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 5844,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "nonce",
|
|
"offset": 0,
|
|
"slot": "8",
|
|
"type": "t_bytes32"
|
|
}
|
|
],
|
|
"numberOfBytes": "288"
|
|
},
|
|
"t_struct(RequestContext)3140_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Marketplace.RequestContext",
|
|
"members": [
|
|
{
|
|
"astId": 3128,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "state",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_enum(RequestState)5871"
|
|
},
|
|
{
|
|
"astId": 3131,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "fundsToReturnToClient",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 3133,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "slotsFilled",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 3135,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "startedAt",
|
|
"offset": 8,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 3137,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "endsAt",
|
|
"offset": 16,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 3139,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "expiresAt",
|
|
"offset": 24,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
}
|
|
],
|
|
"numberOfBytes": "96"
|
|
},
|
|
"t_struct(Set)1587_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct EnumerableSet.Set",
|
|
"members": [
|
|
{
|
|
"astId": 1582,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_values",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_array(t_bytes32)dyn_storage"
|
|
},
|
|
{
|
|
"astId": 1586,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "_indexes",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_mapping(t_bytes32,t_uint256)"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(Slot)3158_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct Marketplace.Slot",
|
|
"members": [
|
|
{
|
|
"astId": 3143,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "state",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_enum(SlotState)5879"
|
|
},
|
|
{
|
|
"astId": 3146,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "requestId",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_userDefinedValueType(RequestId)5830"
|
|
},
|
|
{
|
|
"astId": 3149,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "filledAt",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 3151,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "slotIndex",
|
|
"offset": 8,
|
|
"slot": "2",
|
|
"type": "t_uint64"
|
|
},
|
|
{
|
|
"astId": 3154,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "currentCollateral",
|
|
"offset": 0,
|
|
"slot": "3",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 3157,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "host",
|
|
"offset": 0,
|
|
"slot": "4",
|
|
"type": "t_address"
|
|
}
|
|
],
|
|
"numberOfBytes": "160"
|
|
},
|
|
"t_struct(SlotReservationsConfig)2228_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct SlotReservationsConfig",
|
|
"members": [
|
|
{
|
|
"astId": 2227,
|
|
"contract": "contracts/Marketplace.sol:Marketplace",
|
|
"label": "maxReservations",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint8"
|
|
}
|
|
],
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_uint256": {
|
|
"encoding": "inplace",
|
|
"label": "uint256",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_uint64": {
|
|
"encoding": "inplace",
|
|
"label": "uint64",
|
|
"numberOfBytes": "8"
|
|
},
|
|
"t_uint8": {
|
|
"encoding": "inplace",
|
|
"label": "uint8",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_userDefinedValueType(Period)5086": {
|
|
"encoding": "inplace",
|
|
"label": "Periods.Period",
|
|
"numberOfBytes": "8"
|
|
},
|
|
"t_userDefinedValueType(RequestId)5830": {
|
|
"encoding": "inplace",
|
|
"label": "RequestId",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_userDefinedValueType(SlotId)5832": {
|
|
"encoding": "inplace",
|
|
"label": "SlotId",
|
|
"numberOfBytes": "32"
|
|
}
|
|
}
|
|
}
|
|
} |