UNPKG

@wttp/site

Version:

Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools

1,100 lines (1,099 loc) 228 kB
{ "_format": "hh-sol-artifact-1", "contractName": "Web3Site", "sourceName": "contracts/Web3Site.sol", "abi": [ { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "address", "name": "_dpr", "type": "address" }, { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "_defaultHeader", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } ], "name": "AccessControlUnauthorizedAccount", "type": "error" }, { "inputs": [ { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "header", "type": "tuple" } ], "name": "InvalidHeader", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "InvalidRole", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "reason", "type": "string" }, { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "_403", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "reason", "type": "string" }, { "internalType": "bool", "name": "isImmutable", "type": "bool" } ], "name": "_404", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "reason", "type": "string" }, { "internalType": "uint16", "name": "methodsAllowed", "type": "uint16" }, { "internalType": "bool", "name": "isImmutable", "type": "bool" } ], "name": "_405", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "reason", "type": "string" }, { "components": [ { "internalType": "int256", "name": "start", "type": "int256" }, { "internalType": "int256", "name": "end", "type": "int256" } ], "internalType": "struct Range", "name": "range", "type": "tuple" }, { "internalType": "int256", "name": "outOfBounds", "type": "int256" } ], "name": "_416", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "components": [ { "components": [ { "internalType": "uint16", "name": "status", "type": "uint16" }, { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "headerInfo", "type": "tuple" }, { "components": [ { "components": [ { "internalType": "bytes2", "name": "mimeType", "type": "bytes2" }, { "internalType": "bytes2", "name": "charset", "type": "bytes2" }, { "internalType": "bytes2", "name": "encoding", "type": "bytes2" }, { "internalType": "bytes2", "name": "language", "type": "bytes2" } ], "internalType": "struct ResourceProperties", "name": "properties", "type": "tuple" }, { "internalType": "uint256", "name": "size", "type": "uint256" }, { "internalType": "uint256", "name": "version", "type": "uint256" }, { "internalType": "uint256", "name": "lastModified", "type": "uint256" }, { "internalType": "bytes32", "name": "header", "type": "bytes32" } ], "internalType": "struct ResourceMetadata", "name": "metadata", "type": "tuple" }, { "internalType": "bytes32", "name": "etag", "type": "bytes32" } ], "internalType": "struct HEADResponse", "name": "head", "type": "tuple" }, { "internalType": "bytes32", "name": "headerAddress", "type": "bytes32" } ], "indexed": false, "internalType": "struct DEFINEResponse", "name": "response", "type": "tuple" } ], "name": "DEFINESuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "components": [ { "internalType": "uint16", "name": "status", "type": "uint16" }, { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "headerInfo", "type": "tuple" }, { "components": [ { "components": [ { "internalType": "bytes2", "name": "mimeType", "type": "bytes2" }, { "internalType": "bytes2", "name": "charset", "type": "bytes2" }, { "internalType": "bytes2", "name": "encoding", "type": "bytes2" }, { "internalType": "bytes2", "name": "language", "type": "bytes2" } ], "internalType": "struct ResourceProperties", "name": "properties", "type": "tuple" }, { "internalType": "uint256", "name": "size", "type": "uint256" }, { "internalType": "uint256", "name": "version", "type": "uint256" }, { "internalType": "uint256", "name": "lastModified", "type": "uint256" }, { "internalType": "bytes32", "name": "header", "type": "bytes32" } ], "internalType": "struct ResourceMetadata", "name": "metadata", "type": "tuple" }, { "internalType": "bytes32", "name": "etag", "type": "bytes32" } ], "indexed": false, "internalType": "struct HEADResponse", "name": "response", "type": "tuple" } ], "name": "DELETESuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "headerAddress", "type": "bytes32" } ], "name": "HeaderCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "headerAddress", "type": "bytes32" } ], "name": "HeaderUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "path", "type": "string" } ], "name": "MetadataDeleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "path", "type": "string" } ], "name": "MetadataUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "components": [ { "components": [ { "internalType": "uint16", "name": "status", "type": "uint16" }, { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "headerInfo", "type": "tuple" }, { "components": [ { "components": [ { "internalType": "bytes2", "name": "mimeType", "type": "bytes2" }, { "internalType": "bytes2", "name": "charset", "type": "bytes2" }, { "internalType": "bytes2", "name": "encoding", "type": "bytes2" }, { "internalType": "bytes2", "name": "language", "type": "bytes2" } ], "internalType": "struct ResourceProperties", "name": "properties", "type": "tuple" }, { "internalType": "uint256", "name": "size", "type": "uint256" }, { "internalType": "uint256", "name": "version", "type": "uint256" }, { "internalType": "uint256", "name": "lastModified", "type": "uint256" }, { "internalType": "bytes32", "name": "header", "type": "bytes32" } ], "internalType": "struct ResourceMetadata", "name": "metadata", "type": "tuple" }, { "internalType": "bytes32", "name": "etag", "type": "bytes32" } ], "internalType": "struct HEADResponse", "name": "head", "type": "tuple" }, { "components": [ { "internalType": "bytes32[]", "name": "dataPoints", "type": "bytes32[]" }, { "internalType": "uint256", "name": "totalChunks", "type": "uint256" } ], "internalType": "struct ResourceResponse", "name": "resource", "type": "tuple" } ], "indexed": false, "internalType": "struct LOCATEResponse", "name": "response", "type": "tuple" } ], "name": "PATCHSuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "components": [ { "components": [ { "internalType": "uint16", "name": "status", "type": "uint16" }, { "components": [ { "components": [ { "internalType": "bool", "name": "immutableFlag", "type": "bool" }, { "internalType": "enum CachePreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CacheControl", "name": "cache", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "methods", "type": "uint16" }, { "internalType": "bytes32[]", "name": "origins", "type": "bytes32[]" }, { "internalType": "enum CORSPreset", "name": "preset", "type": "uint8" }, { "internalType": "string", "name": "custom", "type": "string" } ], "internalType": "struct CORSPolicy", "name": "cors", "type": "tuple" }, { "components": [ { "internalType": "uint16", "name": "code", "type": "uint16" }, { "internalType": "string", "name": "location", "type": "string" } ], "internalType": "struct Redirect", "name": "redirect", "type": "tuple" } ], "internalType": "struct HeaderInfo", "name": "headerInfo", "type": "tuple" }, { "components": [ { "components": [ { "internalType": "bytes2", "name": "mimeType", "type": "bytes2" }, { "internalType": "bytes2", "name": "charset", "type": "bytes2" }, { "internalType": "bytes2", "name": "encoding", "type": "bytes2" }, { "internalType": "bytes2", "name": "language", "type": "bytes2" } ], "internalType": "struct ResourceProperties", "name": "properties", "type": "tuple" }, { "internalType": "uint256", "name": "size", "type": "uint256" }, { "internalType": "uint256", "name": "version", "type": "uint256" }, { "internalType": "uint256", "name": "lastModified", "type": "uint256" }, { "internalType": "bytes32", "name": "header", "type": "bytes32" } ], "internalType": "struct ResourceMetadata", "name": "metadata", "type": "tuple" }, { "internalType": "bytes32", "name": "etag", "type": "bytes32" } ], "internalType": "struct HEADResponse", "name": "head", "type": "tuple" }, { "components": [ { "internalType": "bytes32[]", "name": "dataPoints", "type": "bytes32[]" }, { "internalType": "uint256", "name": "totalChunks", "type": "uint256" } ], "internalType": "struct ResourceResponse", "name": "resource", "type": "tuple" } ], "indexed": false, "internalType": "struct LOCATEResponse", "name": "response", "type": "tuple" } ], "name": "PUTSuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "path", "type": "string" } ], "name": "ResourceCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "path", "type": "string" } ], "name": "ResourceDeleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "ResourceRoleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "path", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "chunkIndex", "type": "uint256" } ], "name": "ResourceUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32",