codex-contracts-eth/deployments/taiko_test/Marketplace.json

1703 lines
178 KiB
JSON
Raw Normal View History

2023-06-19 12:11:09 +00:00
{
"address": "0xDB2a8A1c8Df776F1C544a56a7734a865ad1C05e8",
"abi": [
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token_",
"type": "address"
},
{
"components": [
{
"components": [
{
"internalType": "uint8",
"name": "repairRewardPercentage",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "maxNumberOfSlashes",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "slashCriterion",
"type": "uint16"
},
{
"internalType": "uint8",
"name": "slashPercentage",
"type": "uint8"
}
],
"internalType": "struct CollateralConfig",
"name": "collateral",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "period",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timeout",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "downtime",
"type": "uint8"
}
],
"internalType": "struct ProofConfig",
"name": "proofs",
"type": "tuple"
}
],
"internalType": "struct MarketplaceConfig",
"name": "configuration",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "SlotId",
"name": "id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "proof",
"type": "bytes"
}
],
"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": true,
"internalType": "uint256",
"name": "slotIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "SlotId",
"name": "slotId",
"type": "bytes32"
}
],
"name": "SlotFilled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "RequestId",
"name": "requestId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "SlotId",
"name": "slotId",
"type": "bytes32"
}
],
"name": "SlotFreed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "RequestId",
"name": "requestId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint64",
"name": "slots",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "slotSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proofProbability",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "maxSlotLoss",
"type": "uint64"
}
],
"indexed": false,
"internalType": "struct Ask",
"name": "ask",
"type": "tuple"
}
],
"name": "StorageRequested",
"type": "event"
},
{
"inputs": [],
"name": "config",
"outputs": [
{
"components": [
{
"internalType": "uint8",
"name": "repairRewardPercentage",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "maxNumberOfSlashes",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "slashCriterion",
"type": "uint16"
},
{
"internalType": "uint8",
"name": "slashPercentage",
"type": "uint8"
}
],
"internalType": "struct CollateralConfig",
"name": "collateral",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "period",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timeout",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "downtime",
"type": "uint8"
}
],
"internalType": "struct ProofConfig",
"name": "proofs",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "RequestId",
"name": "requestId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "slotIndex",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "proof",
"type": "bytes"
}
],
"name": "fillSlot",
"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": "uint64",
"name": "slots",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "slotSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proofProbability",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "maxSlotLoss",
"type": "uint64"
}
],
"internalType": "struct Ask",
"name": "ask",
"type": "tuple"
},
{
"components": [
{
"internalType": "string",
"name": "cid",
"type": "string"
},
{
"components": [
{
"internalType": "uint64",
"name": "totalChunks",
"type": "uint64"
}
],
"internalType": "struct Erasure",
"name": "erasure",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes",
"name": "u",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
}
],
"internalType": "struct PoR",
"name": "por",
"type": "tuple"
}
],
"internalType": "struct Content",
"name": "content",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
}
],
"internalType": "struct Request",
"name": "request",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "slotIndex",
"type": "uint256"
}
],
"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": "uint64",
"name": "slots",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "slotSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proofProbability",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "maxSlotLoss",
"type": "uint64"
}
],
"internalType": "struct Ask",
"name": "ask",
"type": "tuple"
},
{
"components": [
{
"internalType": "string",
"name": "cid",
"type": "string"
},
{
"components": [
{
"internalType": "uint64",
"name": "totalChunks",
"type": "uint64"
}
],
"internalType": "struct Erasure",
"name": "erasure",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes",
"name": "u",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
}
],
"internalType": "struct PoR",
"name": "por",
"type": "tuple"
}
],
"internalType": "struct Content",
"name": "content",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"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": "uint256"
}
],
"name": "markProofAsMissing",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "SlotId",
"name": "slotId",
"type": "bytes32"
}
],
"name": "missingProofs",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"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": "uint256",
"name": "",
"type": "uint256"
}
],
"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": "uint64",
"name": "slots",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "slotSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proofProbability",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "maxSlotLoss",
"type": "uint64"
}
],
"internalType": "struct Ask",
"name": "ask",
"type": "tuple"
},
{
"components": [
{
"internalType": "string",
"name": "cid",
"type": "string"
},
{
"components": [
{
"internalType": "uint64",
"name": "totalChunks",
"type": "uint64"
}
],
"internalType": "struct Erasure",
"name": "erasure",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes",
"name": "u",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
}
],
"internalType": "struct PoR",
"name": "por",
"type": "tuple"
}
],
"internalType": "struct Content",
"name": "content",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
}
],
"internalType": "struct Request",
"name": "request",
"type": "tuple"
}
],
"name": "requestStorage",
"outputs": [],
"stateMutability": "nonpayable",
"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"
},
{
"internalType": "bytes",
"name": "proof",
"type": "bytes"
}
],
"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"
}
],
"transactionHash": "0x50307964c50857e9563ae3cc7922e34770763a2eb79c5defc9d396de7c5384e0",
"receipt": {
"to": null,
"from": "0xD40C3aED27Cb03CC671b66Fd52d81AE9d8702BE4",
"contractAddress": "0xDB2a8A1c8Df776F1C544a56a7734a865ad1C05e8",
"transactionIndex": 6,
"gasUsed": "3673077",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x153ceefffd4c38d0400a8f0e3e80c81e4b4a6bac2731134a60d8fedfe46de85b",
"transactionHash": "0x50307964c50857e9563ae3cc7922e34770763a2eb79c5defc9d396de7c5384e0",
"logs": [],
"blockNumber": 262545,
"cumulativeGasUsed": "5545143",
"status": 1,
"byzantium": true
},
"args": [
"0x95658FdA29e3b547107c95c11dD5e4a1A034C4AB",
{
"collateral": {
"repairRewardPercentage": 10,
"maxNumberOfSlashes": 5,
"slashCriterion": 3,
"slashPercentage": 10
},
"proofs": {
"period": 10,
"timeout": 5,
"downtime": 64
}
}
],
"numDeployments": 1,
"solcInputHash": "9671d4e1820229dcd69b349a99feb65b",
"metadata": "{\"compiler\":{\"version\":\"0.8.8+commit.dddeac2f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token_\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"repairRewardPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"maxNumberOfSlashes\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"slashCriterion\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"slashPercentage\",\"type\":\"uint8\"}],\"internalType\":\"struct CollateralConfig\",\"name\":\"collateral\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"downtime\",\"type\":\"uint8\"}],\"internalType\":\"struct ProofConfig\",\"name\":\"proofs\",\"type\":\"tuple\"}],\"internalType\":\"struct MarketplaceConfig\",\"name\":\"configuration\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"SlotId\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"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\":true,\"internalType\":\"uint256\",\"name\":\"slotIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"SlotFilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"SlotId\",\"name\":\"slotId\",\"type\":\"bytes32\"}],\"name\":\"SlotFreed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"RequestId\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slots\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"slotSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofProbability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"maxSlotLoss\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Ask\",\"name\":\"ask\",\"type\":\"tuple\"}],\"name\":\"StorageRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"config\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"repairRewardPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"maxNumberOfSlashes\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"slashCriterion\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"slashPercentage\",\"type\":\"uint8\"}],\"internalType\":\"struct CollateralConfig\",\"name\":\"collateral\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"downtime\",\"type\":\"uint8\"}],\"internalType\":\"struct ProofConfig\",\"name\":\"proofs\",\"typ
"bytecode": "0x60c06040523480156200001157600080fd5b50604051620043ee380380620043ee833981016040819052620000349162000439565b602081015180516080526101004311620000955760405162461bcd60e51b815260206004820152601960248201527f496e73756666696369656e7420626c6f636b206865696768740000000000000060448201526064015b60405180910390fd5b80516000556020808201516001556040918201516002805460ff191660ff9283161790558251608081018452600e548152600f54928101929092526010549282019290925260115460608083019190915284901b6001600160601b03191660a05282515190916064911611156200014f5760405162461bcd60e51b815260206004820152601560248201527f4d757374206265206c657373207468616e20313030000000000000000000000060448201526064016200008c565b606482600001516060015160ff161115620001ad5760405162461bcd60e51b815260206004820152601560248201527f4d757374206265206c657373207468616e20313030000000000000000000000060448201526064016200008c565b81516060810151602090910151606491620001c8916200052b565b60ff161115620002305760405162461bcd60e51b815260206004820152602c60248201527f546f74616c20736c6173682070657263656e74616765206d757374206265206c60448201526b0657373207468656e203130360a41b60648201526084016200008c565b81518051600a805460208085015160408087015160609097015160ff9081166401000000000260ff60201b1961ffff90991662010000029890981664ffffff0000199382166101000261ffff199096169782169790971794909417919091169490941794909417909155828501518051600b5580840151600c5590910151600d80549190921660ff1991909116179055810151600f541015620002d757620002d762000557565b60408101516010541015620002f057620002f062000557565b6060810151601154101562000309576200030962000557565b601154601054600e546200031e91906200056d565b6200032a91906200056d565b600f54146200033d576200033d62000557565b50505062000588565b604080519081016001600160401b03811182821017156200037757634e487b7160e01b600052604160045260246000fd5b60405290565b604051608081016001600160401b03811182821017156200037757634e487b7160e01b600052604160045260246000fd5b805160ff81168114620003c057600080fd5b919050565b600060608284031215620003d857600080fd5b604051606081016001600160401b03811182821017156200040957634e487b7160e01b600052604160045260246000fd5b806040525080915082518152602083015160208201526200042d60408401620003ae565b60408201525092915050565b6000808284036101008112156200044f57600080fd5b83516001600160a01b03811681146200046757600080fd5b9250601f190160e08112156200047c57600080fd5b6200048662000346565b60808212156200049557600080fd5b6200049f6200037d565b9150620004af60208601620003ae565b8252620004bf60408601620003ae565b6020830152606085015161ffff81168114620004da57600080fd5b6040830152620004ed60808601620003ae565b6060830152818152620005048660a08701620003c5565b602082015280925050509250929050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168160ff04811182151516156200054f576200054f62000515565b029392505050565b634e487b7160e01b600052600160045260246000fd5b6000821982111562000583576200058362000515565b500190565b60805160a05160601c613e21620005cd60003960008181610442015281816113730152818161238c01526129c2015260008181612c770152612d780152613e216000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80636e2b54ee116100d8578063b396dc791161008c578063f752196b11610066578063f752196b146103fd578063fb1e61ca1461041d578063fc0c546a1461043d57600080fd5b8063b396dc79146103b7578063be5cdc48146103d7578063c0cc4add146103ea57600080fd5b80639777b72c116100bd5780639777b72c14610379578063a29c29a414610381578063a3a0807e1461039457600080fd5b80636e2b54ee146102a157806379502c55146102b457600080fd5b80634641dce61161012f5780636368a471116101145780636368a47114610237578063645116d81461024a5780636b00c8cf1461025d57600080fd5b80634641dce6146101fd5780635da738351461022257600080fd5b806308695fcd1161016057806308695fcd146101c25780630eb6c86f146101d7578063458d2bf1146101ea57600080fd5b806302fa8e651461017c57806305b90773146101a2575b600080fd5b61018f61018a366004612fef565b610464565b6040519081526020015b60405180910390f35b6101b56101b0366004612fef565b6104db565b604051610199919061303f565b6101d56101d0366004613052565b6105cd565b005b6101d56101e5366004613074565b610754565b61018f6101f8366004612fef565b6109bf565b61021061020b366004612fef565b6109d8565b60405160ff9091168152602001610199565b61022a6109eb56
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101775760003560e01c80636e2b54ee116100d8578063b396dc791161008c578063f752196b11610066578063f752196b146103fd578063fb1e61ca1461041d578063fc0c546a1461043d57600080fd5b8063b396dc79146103b7578063be5cdc48146103d7578063c0cc4add146103ea57600080fd5b80639777b72c116100bd5780639777b72c14610379578063a29c29a414610381578063a3a0807e1461039457600080fd5b80636e2b54ee146102a157806379502c55146102b457600080fd5b80634641dce61161012f5780636368a471116101145780636368a47114610237578063645116d81461024a5780636b00c8cf1461025d57600080fd5b80634641dce6146101fd5780635da738351461022257600080fd5b806308695fcd1161016057806308695fcd146101c25780630eb6c86f146101d7578063458d2bf1146101ea57600080fd5b806302fa8e651461017c57806305b90773146101a2575b600080fd5b61018f61018a366004612fef565b610464565b6040519081526020015b60405180910390f35b6101b56101b0366004612fef565b6104db565b604051610199919061303f565b6101d56101d0366004613052565b6105cd565b005b6101d56101e5366004613074565b610754565b61018f6101f8366004612fef565b6109bf565b61021061020b366004612fef565b6109d8565b60405160ff9091168152602001610199565b61022a6109eb565b60405161019991906130b0565b6101d5610245366004613136565b610a12565b6101d5610258366004613189565b610d0b565b61028961026b366004612fef565b6000908152601460205260409020600401546001600160a01b031690565b6040516001600160a01b039091168152602001610199565b6101d56102af366004612fef565b610e4e565b60408051608081018252600a5460ff80821683526101008204811660208085019190915261ffff6201000084041684860152640100000000909204811660608085019190915284519081018552600b548152600c5492810192909252600d5416928101929092526103229182565b60408051835160ff90811682526020808601518216818401528584015161ffff1683850152606095860151821695830195909552835160808301529383015160a082015291015190911660c082015260e001610199565b61022a61145c565b6101d561038f366004612fef565b61147b565b6103a76103a2366004612fef565b61162a565b6040519015158152602001610199565b6103ca6103c5366004612fef565b61165f565b6040516101999190613351565b6101b56103e5366004612fef565b611a2f565b6103a76103f8366004612fef565b611aff565b61018f61040b366004612fef565b60009081526005602052604090205490565b61043061042b366004612fef565b611b12565b6040516101999190613383565b6102897f000000000000000000000000000000000000000000000000000000000000000081565b60008181526013602052604081206003015481610480846104db565b9050600081600481111561049657610496613008565b14806104b3575060018160048111156104b1576104b1613008565b145b156104bf575092915050565b6104d3826104ce6001426133ac565b611eab565b949350505050565b60008181526012602052604081205482906001600160a01b03166105385760405162461bcd60e51b815260206004820152600f60248201526e155b9adb9bdddb881c995c5d595cdd608a1b60448201526064015b60405180910390fd5b600083815260136020526040812090815460ff16600481111561055d5761055d613008565b14801561057a57506000848152601260205260409020600d015442115b156105895760029250506105c7565b6001815460ff1660048111156105a1576105a1613008565b1480156105b15750806003015442115b156105c05760039250506105c7565b5460ff1691505b50919050565b60016105d883611a2f565b60048111156105e9576105e9613008565b146106365760405162461bcd60e51b815260206004820152601960248201527f536c6f74206e6f7420616363657074696e672070726f6f667300000000000000604482015260640161052f565b6106408282611ec3565b6000828152601460209081526040808320600181015484526012909252909120600a5461ffff62010000909104166106848560009081526005602052604090205490565b61068e91906133d9565b61074e57600a5460068201546000916064916106b591640100000000900460ff16906133ed565b6106bf919061340c565b9050808360030160008282546106d591906133ac565b9091555050601180548291906000906106ef908490613420565b9091555050600e80548291906000906107099084906133ac565b9091555050600a54600086815260056020526040902054610100820460ff169162010000900461ffff169061073e919061340c565b1061074c5761074c856120f0565b505b50505050565b60408051608081018252600e548152600f546020808301919091526010549282019290925260115460608201529033906107909084018461344d565b6001600160a01b0316146107e65760405162461bcd60e51b815260206004820152601660248201527f496e76616c696420636c69656e74206164647265737300000000000000000000604482015260640161052f565b60006107f96107f484613703
"devdoc": {
"kind": "dev",
"methods": {
"withdrawFunds(bytes32)": {
"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"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"withdrawFunds(bytes32)": {
"notice": "Withdraws storage request funds back to the client that deposited them."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 3012,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_config",
"offset": 0,
"slot": "0",
"type": "t_struct(ProofConfig)1582_storage"
},
{
"astId": 3040,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_slotStarts",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_uint256)"
},
{
"astId": 3045,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_probabilities",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_uint256)"
},
{
"astId": 3050,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_missed",
"offset": 0,
"slot": "5",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_uint256)"
},
{
"astId": 3058,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_received",
"offset": 0,
"slot": "6",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_mapping(t_userDefinedValueType(Period)2871,t_bool))"
},
{
"astId": 3066,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_missing",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_mapping(t_userDefinedValueType(Period)2871,t_bool))"
},
{
"astId": 3744,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_requestsPerClient",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_address,t_struct(Bytes32Set)1147_storage)"
},
{
"astId": 3749,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_slotsPerHost",
"offset": 0,
"slot": "9",
"type": "t_mapping(t_address,t_struct(Bytes32Set)1147_storage)"
},
{
"astId": 1609,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "config",
"offset": 0,
"slot": "10",
"type": "t_struct(MarketplaceConfig)1565_storage"
},
{
"astId": 1612,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_funds",
"offset": 0,
"slot": "14",
"type": "t_struct(MarketplaceFunds)2866_storage"
},
{
"astId": 1618,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_requests",
"offset": 0,
"slot": "18",
"type": "t_mapping(t_userDefinedValueType(RequestId)3564,t_struct(Request)3579_storage)"
},
{
"astId": 1624,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_requestContexts",
"offset": 0,
"slot": "19",
"type": "t_mapping(t_userDefinedValueType(RequestId)3564,t_struct(RequestContext)1640_storage)"
},
{
"astId": 1630,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_slots",
"offset": 0,
"slot": "20",
"type": "t_mapping(t_userDefinedValueType(SlotId)3566,t_struct(Slot)1654_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_enum(RequestState)3619": {
"encoding": "inplace",
"label": "enum RequestState",
"numberOfBytes": "1"
},
"t_enum(SlotState)3625": {
"encoding": "inplace",
"label": "enum SlotState",
"numberOfBytes": "1"
},
"t_mapping(t_address,t_struct(Bytes32Set)1147_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => struct EnumerableSet.Bytes32Set)",
"numberOfBytes": "32",
"value": "t_struct(Bytes32Set)1147_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)2871,t_bool)": {
"encoding": "mapping",
"key": "t_userDefinedValueType(Period)2871",
"label": "mapping(Periods.Period => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_userDefinedValueType(RequestId)3564,t_struct(Request)3579_storage)": {
"encoding": "mapping",
"key": "t_userDefinedValueType(RequestId)3564",
"label": "mapping(RequestId => struct Request)",
"numberOfBytes": "32",
"value": "t_struct(Request)3579_storage"
},
"t_mapping(t_userDefinedValueType(RequestId)3564,t_struct(RequestContext)1640_storage)": {
"encoding": "mapping",
"key": "t_userDefinedValueType(RequestId)3564",
"label": "mapping(RequestId => struct Marketplace.RequestContext)",
"numberOfBytes": "32",
"value": "t_struct(RequestContext)1640_storage"
},
"t_mapping(t_userDefinedValueType(SlotId)3566,t_mapping(t_userDefinedValueType(Period)2871,t_bool))": {
"encoding": "mapping",
"key": "t_userDefinedValueType(SlotId)3566",
"label": "mapping(SlotId => mapping(Periods.Period => bool))",
"numberOfBytes": "32",
"value": "t_mapping(t_userDefinedValueType(Period)2871,t_bool)"
},
"t_mapping(t_userDefinedValueType(SlotId)3566,t_struct(Slot)1654_storage)": {
"encoding": "mapping",
"key": "t_userDefinedValueType(SlotId)3566",
"label": "mapping(SlotId => struct Marketplace.Slot)",
"numberOfBytes": "32",
"value": "t_struct(Slot)1654_storage"
},
"t_mapping(t_userDefinedValueType(SlotId)3566,t_uint256)": {
"encoding": "mapping",
"key": "t_userDefinedValueType(SlotId)3566",
"label": "mapping(SlotId => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Ask)3594_storage": {
"encoding": "inplace",
"label": "struct Ask",
"members": [
{
"astId": 3581,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slots",
"offset": 0,
"slot": "0",
"type": "t_uint64"
},
{
"astId": 3583,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slotSize",
"offset": 0,
"slot": "1",
"type": "t_uint256"
},
{
"astId": 3585,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "duration",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 3587,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "proofProbability",
"offset": 0,
"slot": "3",
"type": "t_uint256"
},
{
"astId": 3589,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "reward",
"offset": 0,
"slot": "4",
"type": "t_uint256"
},
{
"astId": 3591,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "collateral",
"offset": 0,
"slot": "5",
"type": "t_uint256"
},
{
"astId": 3593,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "maxSlotLoss",
"offset": 0,
"slot": "6",
"type": "t_uint64"
}
],
"numberOfBytes": "224"
},
"t_struct(Bytes32Set)1147_storage": {
"encoding": "inplace",
"label": "struct EnumerableSet.Bytes32Set",
"members": [
{
"astId": 1146,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_inner",
"offset": 0,
"slot": "0",
"type": "t_struct(Set)953_storage"
}
],
"numberOfBytes": "64"
},
"t_struct(CollateralConfig)1575_storage": {
"encoding": "inplace",
"label": "struct CollateralConfig",
"members": [
{
"astId": 1568,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "repairRewardPercentage",
"offset": 0,
"slot": "0",
"type": "t_uint8"
},
{
"astId": 1570,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "maxNumberOfSlashes",
"offset": 1,
"slot": "0",
"type": "t_uint8"
},
{
"astId": 1572,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slashCriterion",
"offset": 2,
"slot": "0",
"type": "t_uint16"
},
{
"astId": 1574,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slashPercentage",
"offset": 4,
"slot": "0",
"type": "t_uint8"
}
],
"numberOfBytes": "32"
},
"t_struct(Content)3603_storage": {
"encoding": "inplace",
"label": "struct Content",
"members": [
{
"astId": 3596,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "cid",
"offset": 0,
"slot": "0",
"type": "t_string_storage"
},
{
"astId": 3599,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "erasure",
"offset": 0,
"slot": "1",
"type": "t_struct(Erasure)3606_storage"
},
{
"astId": 3602,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "por",
"offset": 0,
"slot": "2",
"type": "t_struct(PoR)3613_storage"
}
],
"numberOfBytes": "160"
},
"t_struct(Erasure)3606_storage": {
"encoding": "inplace",
"label": "struct Erasure",
"members": [
{
"astId": 3605,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "totalChunks",
"offset": 0,
"slot": "0",
"type": "t_uint64"
}
],
"numberOfBytes": "32"
},
"t_struct(MarketplaceConfig)1565_storage": {
"encoding": "inplace",
"label": "struct MarketplaceConfig",
"members": [
{
"astId": 1561,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "collateral",
"offset": 0,
"slot": "0",
"type": "t_struct(CollateralConfig)1575_storage"
},
{
"astId": 1564,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "proofs",
"offset": 0,
"slot": "1",
"type": "t_struct(ProofConfig)1582_storage"
}
],
"numberOfBytes": "128"
},
"t_struct(MarketplaceFunds)2866_storage": {
"encoding": "inplace",
"label": "struct Marketplace.MarketplaceFunds",
"members": [
{
"astId": 2859,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "balance",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 2861,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "received",
"offset": 0,
"slot": "1",
"type": "t_uint256"
},
{
"astId": 2863,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "sent",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 2865,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slashed",
"offset": 0,
"slot": "3",
"type": "t_uint256"
}
],
"numberOfBytes": "128"
},
"t_struct(PoR)3613_storage": {
"encoding": "inplace",
"label": "struct PoR",
"members": [
{
"astId": 3608,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "u",
"offset": 0,
"slot": "0",
"type": "t_bytes_storage"
},
{
"astId": 3610,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "publicKey",
"offset": 0,
"slot": "1",
"type": "t_bytes_storage"
},
{
"astId": 3612,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "name",
"offset": 0,
"slot": "2",
"type": "t_bytes_storage"
}
],
"numberOfBytes": "96"
},
"t_struct(ProofConfig)1582_storage": {
"encoding": "inplace",
"label": "struct ProofConfig",
"members": [
{
"astId": 1577,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "period",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 1579,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "timeout",
"offset": 0,
"slot": "1",
"type": "t_uint256"
},
{
"astId": 1581,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "downtime",
"offset": 0,
"slot": "2",
"type": "t_uint8"
}
],
"numberOfBytes": "96"
},
"t_struct(Request)3579_storage": {
"encoding": "inplace",
"label": "struct Request",
"members": [
{
"astId": 3568,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "client",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 3571,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "ask",
"offset": 0,
"slot": "1",
"type": "t_struct(Ask)3594_storage"
},
{
"astId": 3574,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "content",
"offset": 0,
"slot": "8",
"type": "t_struct(Content)3603_storage"
},
{
"astId": 3576,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "expiry",
"offset": 0,
"slot": "13",
"type": "t_uint256"
},
{
"astId": 3578,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "nonce",
"offset": 0,
"slot": "14",
"type": "t_bytes32"
}
],
"numberOfBytes": "480"
},
"t_struct(RequestContext)1640_storage": {
"encoding": "inplace",
"label": "struct Marketplace.RequestContext",
"members": [
{
"astId": 1633,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "state",
"offset": 0,
"slot": "0",
"type": "t_enum(RequestState)3619"
},
{
"astId": 1635,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slotsFilled",
"offset": 0,
"slot": "1",
"type": "t_uint256"
},
{
"astId": 1637,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "startedAt",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 1639,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "endsAt",
"offset": 0,
"slot": "3",
"type": "t_uint256"
}
],
"numberOfBytes": "128"
},
"t_struct(Set)953_storage": {
"encoding": "inplace",
"label": "struct EnumerableSet.Set",
"members": [
{
"astId": 948,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_values",
"offset": 0,
"slot": "0",
"type": "t_array(t_bytes32)dyn_storage"
},
{
"astId": 952,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "_indexes",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_uint256)"
}
],
"numberOfBytes": "64"
},
"t_struct(Slot)1654_storage": {
"encoding": "inplace",
"label": "struct Marketplace.Slot",
"members": [
{
"astId": 1643,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "state",
"offset": 0,
"slot": "0",
"type": "t_enum(SlotState)3625"
},
{
"astId": 1646,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "requestId",
"offset": 0,
"slot": "1",
"type": "t_userDefinedValueType(RequestId)3564"
},
{
"astId": 1648,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "slotIndex",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 1651,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "currentCollateral",
"offset": 0,
"slot": "3",
"type": "t_uint256"
},
{
"astId": 1653,
"contract": "contracts/Marketplace.sol:Marketplace",
"label": "host",
"offset": 0,
"slot": "4",
"type": "t_address"
}
],
"numberOfBytes": "160"
},
"t_uint16": {
"encoding": "inplace",
"label": "uint16",
"numberOfBytes": "2"
},
"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)2871": {
"encoding": "inplace",
"label": "Periods.Period",
"numberOfBytes": "32"
},
"t_userDefinedValueType(RequestId)3564": {
"encoding": "inplace",
"label": "RequestId",
"numberOfBytes": "32"
},
"t_userDefinedValueType(SlotId)3566": {
"encoding": "inplace",
"label": "SlotId",
"numberOfBytes": "32"
}
}
}
}