From 27bb3b30d61cad848002293f39dfa56189c6342e Mon Sep 17 00:00:00 2001 From: samepant Date: Tue, 1 Oct 2024 15:25:39 -0400 Subject: [PATCH 1/3] fresh sepolia deployment --- .../sepolia/CiphernodeRegistryOwnable.json | 961 +++++++++++++++++ .../sepolia/CyphernodeRegistryOwnable.json | 726 ------------- packages/evm/deployments/sepolia/Enclave.json | 985 +++++++++++------- .../sepolia/MockComputeProvider.json | 75 ++ .../sepolia/MockDecryptionVerifier.json | 70 ++ .../deployments/sepolia/MockE3Program.json | 179 ++++ .../sepolia/MockInputValidator.json | 70 ++ .../sepolia/NaiveRegistryFilter.json | 138 +-- .../21fe30cc06e4cb96958a78cd2e5aab1b.json | 104 ++ .../d0e6e4f19028714f394c36db62dff2be.json | 93 -- 10 files changed, 2152 insertions(+), 1249 deletions(-) create mode 100644 packages/evm/deployments/sepolia/CiphernodeRegistryOwnable.json delete mode 100644 packages/evm/deployments/sepolia/CyphernodeRegistryOwnable.json create mode 100644 packages/evm/deployments/sepolia/MockComputeProvider.json create mode 100644 packages/evm/deployments/sepolia/MockDecryptionVerifier.json create mode 100644 packages/evm/deployments/sepolia/MockE3Program.json create mode 100644 packages/evm/deployments/sepolia/MockInputValidator.json create mode 100644 packages/evm/deployments/sepolia/solcInputs/21fe30cc06e4cb96958a78cd2e5aab1b.json delete mode 100644 packages/evm/deployments/sepolia/solcInputs/d0e6e4f19028714f394c36db62dff2be.json diff --git a/packages/evm/deployments/sepolia/CiphernodeRegistryOwnable.json b/packages/evm/deployments/sepolia/CiphernodeRegistryOwnable.json new file mode 100644 index 00000000..9eaa9862 --- /dev/null +++ b/packages/evm/deployments/sepolia/CiphernodeRegistryOwnable.json @@ -0,0 +1,961 @@ +{ + "address": "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_enclave", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "node", + "type": "address" + } + ], + "name": "CiphernodeNotEnabled", + "type": "error" + }, + { + "inputs": [], + "name": "CommitteeAlreadyPublished", + "type": "error" + }, + { + "inputs": [], + "name": "CommitteeAlreadyRequested", + "type": "error" + }, + { + "inputs": [], + "name": "CommitteeNotPublished", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "LeafAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "LeafCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "LeafDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "LeafGreaterThanSnarkScalarField", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyEnclave", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyFilter", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "WrongSiblingNodes", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "node", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numNodes", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "CiphernodeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "node", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numNodes", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "CiphernodeRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "publicKey", + "type": "bytes" + } + ], + "name": "CommitteePublished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "filter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32[2]", + "name": "threshold", + "type": "uint32[2]" + } + ], + "name": "CommitteeRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "enclave", + "type": "address" + } + ], + "name": "EnclaveSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "node", + "type": "address" + } + ], + "name": "addCiphernode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ciphernodes", + "outputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depth", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "committeePublicKey", + "outputs": [ + { + "internalType": "bytes32", + "name": "publicKeyHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "enclave", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "filters", + "outputs": [ + { + "internalType": "contract IRegistryFilter", + "name": "filter", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "getFilter", + "outputs": [ + { + "internalType": "contract IRegistryFilter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_enclave", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "node", + "type": "address" + } + ], + "name": "isCiphernodeEligible", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "node", + "type": "address" + } + ], + "name": "isEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numCiphernodes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "publicKeyHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "publicKeyHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "publicKey", + "type": "bytes" + } + ], + "name": "publishCommittee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "node", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "siblingNodes", + "type": "uint256[]" + } + ], + "name": "removeCiphernode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "filter", + "type": "address" + }, + { + "internalType": "uint32[2]", + "name": "threshold", + "type": "uint32[2]" + } + ], + "name": "requestCommittee", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "root", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "rootAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "roots", + "outputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_enclave", + "type": "address" + } + ], + "name": "setEnclave", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treeSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xcd1275e5fd0385dbca2c7e1cb41f3d3877787965e554e8f898bcadf7e1204df4", + "receipt": { + "to": null, + "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "contractAddress": "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35", + "transactionIndex": 30, + "gasUsed": "1212915", + "logsBloom": "0x00000000000000000001000000000100000000000000000000800000000000080000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000001001000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000800000000000000000000000280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000020000000000000000000020000000001800000000000000000000000000000800000", + "blockHash": "0x7fcf4d9b796ae85be575e4562e5112504b651253df6eb372511dfe51d410c85f", + "transactionHash": "0xcd1275e5fd0385dbca2c7e1cb41f3d3877787965e554e8f898bcadf7e1204df4", + "logs": [ + { + "transactionIndex": 30, + "blockNumber": 6795923, + "transactionHash": "0xcd1275e5fd0385dbca2c7e1cb41f3d3877787965e554e8f898bcadf7e1204df4", + "address": "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x7fcf4d9b796ae85be575e4562e5112504b651253df6eb372511dfe51d410c85f" + }, + { + "transactionIndex": 30, + "blockNumber": 6795923, + "transactionHash": "0xcd1275e5fd0385dbca2c7e1cb41f3d3877787965e554e8f898bcadf7e1204df4", + "address": "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35", + "topics": [ + "0x2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9", + "0x00000000000000000000000034f3f0793aa95c62aa02fac859d6bcb7711ddb3a" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x7fcf4d9b796ae85be575e4562e5112504b651253df6eb372511dfe51d410c85f" + }, + { + "transactionIndex": 30, + "blockNumber": 6795923, + "transactionHash": "0xcd1275e5fd0385dbca2c7e1cb41f3d3877787965e554e8f898bcadf7e1204df4", + "address": "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 17, + "blockHash": "0x7fcf4d9b796ae85be575e4562e5112504b651253df6eb372511dfe51d410c85f" + } + ], + "blockNumber": 6795923, + "cumulativeGasUsed": "4584350", + "status": 1, + "byzantium": true + }, + "args": [ + "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A" + ], + "numDeployments": 1, + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"CiphernodeNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyRequested\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeNotPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafGreaterThanSnarkScalarField\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEnclave\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyFilter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongSiblingNodes\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numNodes\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"CiphernodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numNodes\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"CiphernodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"CommitteePublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"CommitteeRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"enclave\",\"type\":\"address\"}],\"name\":\"EnclaveSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"addCiphernode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ciphernodes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depth\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"committeePublicKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"publicKeyHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enclave\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"filters\",\"outputs\":[{\"internalType\":\"contract IRegistryFilter\",\"name\":\"filter\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"getFilter\",\"outputs\":[{\"internalType\":\"contract IRegistryFilter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"isCiphernodeEligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"isEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numCiphernodes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"publicKeyHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"publicKeyHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"publishCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"siblingNodes\",\"type\":\"uint256[]\"}],\"name\":\"removeCiphernode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"requestCommittee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"root\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"rootAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"name\":\"setEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treeSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"CiphernodeAdded(address,uint256,uint256,uint256)\":{\"params\":{\"index\":\"Index of the ciphernode in the registry.\",\"node\":\"Address of the ciphernode.\",\"numNodes\":\"Number of ciphernodes in the registry.\",\"size\":\"Size of the registry.\"}},\"CiphernodeRemoved(address,uint256,uint256,uint256)\":{\"params\":{\"index\":\"Index of the ciphernode in the registry.\",\"node\":\"Address of the ciphernode.\",\"numNodes\":\"Number of ciphernodes in the registry.\",\"size\":\"Size of the registry.\"}},\"CommitteePublished(uint256,bytes)\":{\"params\":{\"e3Id\":\"ID of the E3 for which the committee was selected.\",\"publicKey\":\"Public key of the committee.\"}},\"CommitteeRequested(uint256,address,uint32[2])\":{\"params\":{\"e3Id\":\"ID of the E3 for which the committee was selected.\",\"filter\":\"Address of the contract that will coordinate committee selection.\",\"threshold\":\"The M/N threshold for the committee.\"}},\"EnclaveSet(address)\":{\"params\":{\"enclave\":\"Address of the enclave contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"committeePublicKey(uint256)\":{\"details\":\"This function MUST revert if no committee has been requested for the given E3.This function MUST revert if the committee has not yet published a public key.\",\"params\":{\"e3Id\":\"ID of the E3 for which to get the committee public key.\"},\"returns\":{\"publicKeyHash\":\"The hash of the public key of the given committee.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"requestCommittee(uint256,address,uint32[2])\":{\"details\":\"This function MUST revert when not called by the Enclave contract.\",\"params\":{\"e3Id\":\"ID of the E3 for which to select the committee.\",\"filter\":\"The address of the filter responsible for the committee selection process.\",\"threshold\":\"The M/N threshold for the committee.\"},\"returns\":{\"success\":\"True if committee selection was successfully initiated.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"CiphernodeAdded(address,uint256,uint256,uint256)\":{\"notice\":\"This event MUST be emitted when a ciphernode is added to the registry.\"},\"CiphernodeRemoved(address,uint256,uint256,uint256)\":{\"notice\":\"This event MUST be emitted when a ciphernode is removed from the registry.\"},\"CommitteePublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when a committee is selected for an E3.\"},\"CommitteeRequested(uint256,address,uint32[2])\":{\"notice\":\"This event MUST be emitted when a committee is selected for an E3.\"},\"EnclaveSet(address)\":{\"notice\":\"This event MUST be emitted when `enclave` is set.\"}},\"kind\":\"user\",\"methods\":{\"committeePublicKey(uint256)\":{\"notice\":\"This function should be called by the Enclave contract to get the public key of a committee.\"},\"requestCommittee(uint256,address,uint32[2])\":{\"notice\":\"Initiates the committee selection process for a specified E3.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/registry/CiphernodeRegistryOwnable.sol\":\"CiphernodeRegistryOwnable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"@zk-kit/lean-imt.sol/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.4;\\n\\nuint256 constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\",\"keccak256\":\"0xb1944a1d9f63069b2f22260935adb2d11546f82fbb7d12d853a90134a92f4b5b\",\"license\":\"UNLICENSED\"},\"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {PoseidonT3} from \\\"poseidon-solidity/PoseidonT3.sol\\\";\\nimport {SNARK_SCALAR_FIELD} from \\\"./Constants.sol\\\";\\n\\nstruct LeanIMTData {\\n // Tracks the current number of leaves in the tree.\\n uint256 size;\\n // Represents the current depth of the tree, which can increase as new leaves are inserted.\\n uint256 depth;\\n // A mapping from each level of the tree to the node value of the last even position at that level.\\n // Used for efficient inserts, updates and root calculations.\\n mapping(uint256 => uint256) sideNodes;\\n // A mapping from leaf values to their respective indices in the tree.\\n // This facilitates checks for leaf existence and retrieval of leaf positions.\\n mapping(uint256 => uint256) leaves;\\n}\\n\\nerror WrongSiblingNodes();\\nerror LeafGreaterThanSnarkScalarField();\\nerror LeafCannotBeZero();\\nerror LeafAlreadyExists();\\nerror LeafDoesNotExist();\\n\\n/// @title Lean Incremental binary Merkle tree.\\n/// @dev The LeanIMT is an optimized version of the BinaryIMT.\\n/// This implementation eliminates the use of zeroes, and make the tree depth dynamic.\\n/// When a node doesn't have the right child, instead of using a zero hash as in the BinaryIMT,\\n/// the node's value becomes that of its left child. Furthermore, rather than utilizing a static tree depth,\\n/// it is updated based on the number of leaves in the tree. This approach\\n/// results in the calculation of significantly fewer hashes, making the tree more efficient.\\nlibrary InternalLeanIMT {\\n /// @dev Inserts a new leaf into the incremental merkle tree.\\n /// The function ensures that the leaf is valid according to the\\n /// constraints of the tree and then updates the tree's structure accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the new leaf to be inserted into the tree.\\n /// @return The new hash of the node after the leaf has been inserted.\\n function _insert(LeanIMTData storage self, uint256 leaf) internal returns (uint256) {\\n if (leaf >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (leaf == 0) {\\n revert LeafCannotBeZero();\\n } else if (_has(self, leaf)) {\\n revert LeafAlreadyExists();\\n }\\n\\n uint256 index = self.size;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n // A new insertion can increase a tree's depth by at most 1,\\n // and only if the number of leaves supported by the current\\n // depth is less than the number of leaves to be supported after insertion.\\n if (2 ** treeDepth < index + 1) {\\n ++treeDepth;\\n }\\n\\n self.depth = treeDepth;\\n\\n uint256 node = leaf;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n if ((index >> level) & 1 == 1) {\\n node = PoseidonT3.hash([self.sideNodes[level], node]);\\n } else {\\n self.sideNodes[level] = node;\\n }\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n self.size = ++index;\\n\\n self.sideNodes[treeDepth] = node;\\n self.leaves[leaf] = index;\\n\\n return node;\\n }\\n\\n /// @dev Inserts many leaves into the incremental merkle tree.\\n /// The function ensures that the leaves are valid according to the\\n /// constraints of the tree and then updates the tree's structure accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaves: The values of the new leaves to be inserted into the tree.\\n /// @return The root after the leaves have been inserted.\\n function _insertMany(LeanIMTData storage self, uint256[] calldata leaves) internal returns (uint256) {\\n // Cache tree size to optimize gas\\n uint256 treeSize = self.size;\\n\\n // Check that all the new values are correct to be added.\\n for (uint256 i = 0; i < leaves.length; ) {\\n if (leaves[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (leaves[i] == 0) {\\n revert LeafCannotBeZero();\\n } else if (_has(self, leaves[i])) {\\n revert LeafAlreadyExists();\\n }\\n\\n self.leaves[leaves[i]] = treeSize + 1 + i;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Array to save the nodes that will be used to create the next level of the tree.\\n uint256[] memory currentLevelNewNodes;\\n\\n currentLevelNewNodes = leaves;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n // Calculate the depth of the tree after adding the new values.\\n // Unlike the 'insert' function, we need a while here as\\n // N insertions can increase the tree's depth more than once.\\n while (2 ** treeDepth < treeSize + leaves.length) {\\n ++treeDepth;\\n }\\n\\n self.depth = treeDepth;\\n\\n // First index to change in every level.\\n uint256 currentLevelStartIndex = treeSize;\\n\\n // Size of the level used to create the next level.\\n uint256 currentLevelSize = treeSize + leaves.length;\\n\\n // The index where changes begin at the next level.\\n uint256 nextLevelStartIndex = currentLevelStartIndex >> 1;\\n\\n // The size of the next level.\\n uint256 nextLevelSize = ((currentLevelSize - 1) >> 1) + 1;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n // The number of nodes for the new level that will be created,\\n // only the new values, not the entire level.\\n uint256 numberOfNewNodes = nextLevelSize - nextLevelStartIndex;\\n uint256[] memory nextLevelNewNodes = new uint256[](numberOfNewNodes);\\n for (uint256 i = 0; i < numberOfNewNodes; ) {\\n uint256 leftNode;\\n\\n // Assign the left node using the saved path or the position in the array.\\n if ((i + nextLevelStartIndex) * 2 < currentLevelStartIndex) {\\n leftNode = self.sideNodes[level];\\n } else {\\n leftNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 - currentLevelStartIndex];\\n }\\n\\n uint256 rightNode;\\n\\n // Assign the right node if the value exists.\\n if ((i + nextLevelStartIndex) * 2 + 1 < currentLevelSize) {\\n rightNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 + 1 - currentLevelStartIndex];\\n }\\n\\n uint256 parentNode;\\n\\n // Assign the parent node.\\n // If it has a right child the result will be the hash(leftNode, rightNode) if not,\\n // it will be the leftNode.\\n if (rightNode != 0) {\\n parentNode = PoseidonT3.hash([leftNode, rightNode]);\\n } else {\\n parentNode = leftNode;\\n }\\n\\n nextLevelNewNodes[i] = parentNode;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Update the `sideNodes` variable.\\n // If `currentLevelSize` is odd, the saved value will be the last value of the array\\n // if it is even and there are more than 1 element in `currentLevelNewNodes`, the saved value\\n // will be the value before the last one.\\n // If it is even and there is only one element, there is no need to save anything because\\n // the correct value for this level was already saved before.\\n if (currentLevelSize & 1 == 1) {\\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 1];\\n } else if (currentLevelNewNodes.length > 1) {\\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 2];\\n }\\n\\n currentLevelStartIndex = nextLevelStartIndex;\\n\\n // Calculate the next level startIndex value.\\n // It is the position of the parent node which is pos/2.\\n nextLevelStartIndex >>= 1;\\n\\n // Update the next array that will be used to calculate the next level.\\n currentLevelNewNodes = nextLevelNewNodes;\\n\\n currentLevelSize = nextLevelSize;\\n\\n // Calculate the size of the next level.\\n // The size of the next level is (currentLevelSize - 1) / 2 + 1.\\n nextLevelSize = ((nextLevelSize - 1) >> 1) + 1;\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n // Update tree size\\n self.size = treeSize + leaves.length;\\n\\n // Update tree root\\n self.sideNodes[treeDepth] = currentLevelNewNodes[0];\\n\\n return currentLevelNewNodes[0];\\n }\\n\\n /// @dev Updates the value of an existing leaf and recalculates hashes\\n /// to maintain tree integrity.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param oldLeaf: The value of the leaf that is to be updated.\\n /// @param newLeaf: The new value that will replace the oldLeaf in the tree.\\n /// @param siblingNodes: An array of sibling nodes that are necessary to recalculate the path to the root.\\n /// @return The new hash of the updated node after the leaf has been updated.\\n function _update(\\n LeanIMTData storage self,\\n uint256 oldLeaf,\\n uint256 newLeaf,\\n uint256[] calldata siblingNodes\\n ) internal returns (uint256) {\\n if (newLeaf >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (!_has(self, oldLeaf)) {\\n revert LeafDoesNotExist();\\n } else if (_has(self, newLeaf)) {\\n revert LeafAlreadyExists();\\n }\\n\\n uint256 index = _indexOf(self, oldLeaf);\\n uint256 node = newLeaf;\\n uint256 oldRoot = oldLeaf;\\n\\n uint256 lastIndex = self.size - 1;\\n uint256 i = 0;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n if ((index >> level) & 1 == 1) {\\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n }\\n\\n node = PoseidonT3.hash([siblingNodes[i], node]);\\n oldRoot = PoseidonT3.hash([siblingNodes[i], oldRoot]);\\n\\n unchecked {\\n ++i;\\n }\\n } else {\\n if (index >> level != lastIndex >> level) {\\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n }\\n\\n node = PoseidonT3.hash([node, siblingNodes[i]]);\\n oldRoot = PoseidonT3.hash([oldRoot, siblingNodes[i]]);\\n\\n unchecked {\\n ++i;\\n }\\n } else {\\n self.sideNodes[i] = node;\\n }\\n }\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n if (oldRoot != _root(self)) {\\n revert WrongSiblingNodes();\\n }\\n\\n self.sideNodes[treeDepth] = node;\\n\\n if (newLeaf != 0) {\\n self.leaves[newLeaf] = self.leaves[oldLeaf];\\n }\\n\\n self.leaves[oldLeaf] = 0;\\n\\n return node;\\n }\\n\\n /// @dev Removes a leaf from the tree by setting its value to zero.\\n /// This function utilizes the update function to set the leaf's value\\n /// to zero and update the tree's state accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param oldLeaf: The value of the leaf to be removed.\\n /// @param siblingNodes: An array of sibling nodes required for updating the path to the root after removal.\\n /// @return The new root hash of the tree after the leaf has been removed.\\n function _remove(\\n LeanIMTData storage self,\\n uint256 oldLeaf,\\n uint256[] calldata siblingNodes\\n ) internal returns (uint256) {\\n return _update(self, oldLeaf, 0, siblingNodes);\\n }\\n\\n /// @dev Checks if a leaf exists in the tree.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the leaf to check for existence.\\n /// @return A boolean value indicating whether the leaf exists in the tree.\\n function _has(LeanIMTData storage self, uint256 leaf) internal view returns (bool) {\\n return self.leaves[leaf] != 0;\\n }\\n\\n /// @dev Retrieves the index of a given leaf in the tree.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the leaf whose index is to be found.\\n /// @return The index of the specified leaf within the tree. If the leaf is not present, the function\\n /// reverts with a custom error.\\n function _indexOf(LeanIMTData storage self, uint256 leaf) internal view returns (uint256) {\\n if (self.leaves[leaf] == 0) {\\n revert LeafDoesNotExist();\\n }\\n\\n return self.leaves[leaf] - 1;\\n }\\n\\n /// @dev Retrieves the root of the tree from the 'sideNodes' mapping using the\\n /// current tree depth.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @return The root hash of the tree.\\n function _root(LeanIMTData storage self) internal view returns (uint256) {\\n return self.sideNodes[self.depth];\\n }\\n}\\n\",\"keccak256\":\"0x6385ce9153d11d9824163464193d4ba3dd304e662dccd365ba2fc381a359762b\",\"license\":\"MIT\"},\"contracts/interfaces/ICiphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface ICiphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a ciphernode is added to the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeAdded(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n /// @notice This event MUST be emitted when a ciphernode is removed from the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeRemoved(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n function isCiphernodeEligible(address ciphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The hash of the public key generated by the given committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKeyHash The hash of the public key of the given committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes32 publicKeyHash);\\n}\\n\",\"keccak256\":\"0xe24e6322e8c6fc83461edfbdbedb409e243f1c4e79021a74585cfe875c225aa2\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IRegistryFilter {\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0x6bd13d0b188e54393b1a030a43f95042161091d49428e880c301d882c4583100\",\"license\":\"LGPL-3.0-only\"},\"contracts/registry/CiphernodeRegistryOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { ICiphernodeRegistry } from \\\"../interfaces/ICiphernodeRegistry.sol\\\";\\nimport { IRegistryFilter } from \\\"../interfaces/IRegistryFilter.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {\\n InternalLeanIMT,\\n LeanIMTData\\n} from \\\"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\\\";\\n\\ncontract CiphernodeRegistryOwnable is ICiphernodeRegistry, OwnableUpgradeable {\\n using InternalLeanIMT for LeanIMTData;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n address public enclave;\\n uint256 public numCiphernodes;\\n LeanIMTData public ciphernodes;\\n\\n mapping(uint256 e3Id => IRegistryFilter filter) public filters;\\n mapping(uint256 e3Id => uint256 root) public roots;\\n mapping(uint256 e3Id => bytes32 publicKeyHash) public publicKeyHashes;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeAlreadyRequested();\\n error CommitteeAlreadyPublished();\\n error OnlyFilter();\\n error CommitteeNotPublished();\\n error CiphernodeNotEnabled(address node);\\n error OnlyEnclave();\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Modifiers //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n modifier onlyEnclave() {\\n require(msg.sender == enclave, OnlyEnclave());\\n _;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n constructor(address _owner, address _enclave) {\\n initialize(_owner, _enclave);\\n }\\n\\n function initialize(address _owner, address _enclave) public initializer {\\n __Ownable_init(msg.sender);\\n setEnclave(_enclave);\\n if (_owner != owner()) transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external onlyEnclave returns (bool success) {\\n require(\\n filters[e3Id] == IRegistryFilter(address(0)),\\n CommitteeAlreadyRequested()\\n );\\n filters[e3Id] = IRegistryFilter(filter);\\n roots[e3Id] = root();\\n\\n IRegistryFilter(filter).requestCommittee(e3Id, threshold);\\n emit CommitteeRequested(e3Id, filter, threshold);\\n success = true;\\n }\\n\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata,\\n bytes calldata publicKey\\n ) external {\\n // only to be published by the filter\\n require(address(filters[e3Id]) == msg.sender, OnlyFilter());\\n\\n publicKeyHashes[e3Id] = keccak256(publicKey);\\n emit CommitteePublished(e3Id, publicKey);\\n }\\n\\n function addCiphernode(address node) external onlyOwner {\\n uint160 ciphernode = uint160(node);\\n ciphernodes._insert(ciphernode);\\n numCiphernodes++;\\n emit CiphernodeAdded(\\n node,\\n ciphernodes._indexOf(ciphernode),\\n numCiphernodes,\\n ciphernodes.size\\n );\\n }\\n\\n function removeCiphernode(\\n address node,\\n uint256[] calldata siblingNodes\\n ) external onlyOwner {\\n uint160 ciphernode = uint160(node);\\n uint256 index = ciphernodes._indexOf(ciphernode);\\n ciphernodes._remove(ciphernode, siblingNodes);\\n numCiphernodes--;\\n emit CiphernodeRemoved(node, index, numCiphernodes, ciphernodes.size);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setEnclave(address _enclave) public onlyOwner {\\n enclave = _enclave;\\n emit EnclaveSet(_enclave);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes32 publicKeyHash) {\\n publicKeyHash = publicKeyHashes[e3Id];\\n require(publicKeyHash != bytes32(0), CommitteeNotPublished());\\n }\\n\\n function isCiphernodeEligible(address node) external view returns (bool) {\\n return isEnabled(node);\\n }\\n\\n function isEnabled(address node) public view returns (bool) {\\n return ciphernodes._has(uint160(node));\\n }\\n\\n function root() public view returns (uint256) {\\n return (ciphernodes._root());\\n }\\n\\n function rootAt(uint256 e3Id) public view returns (uint256) {\\n return roots[e3Id];\\n }\\n\\n function getFilter(uint256 e3Id) public view returns (IRegistryFilter) {\\n return filters[e3Id];\\n }\\n\\n function treeSize() public view returns (uint256) {\\n return ciphernodes.size;\\n }\\n}\\n\",\"keccak256\":\"0xe911e14c085551d0e3c200279ebf8ce5a70076b68a08303658782b0694593f21\",\"license\":\"LGPL-3.0-only\"},\"poseidon-solidity/PoseidonT3.sol\":{\"content\":\"/// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.0;\\n\\nlibrary PoseidonT3 {\\n uint constant M00 = 0x109b7f411ba0e4c9b2b70caf5c36a7b194be7c11ad24378bfedb68592ba8118b;\\n uint constant M01 = 0x2969f27eed31a480b9c36c764379dbca2cc8fdd1415c3dded62940bcde0bd771;\\n uint constant M02 = 0x143021ec686a3f330d5f9e654638065ce6cd79e28c5b3753326244ee65a1b1a7;\\n uint constant M10 = 0x16ed41e13bb9c0c66ae119424fddbcbc9314dc9fdbdeea55d6c64543dc4903e0;\\n uint constant M11 = 0x2e2419f9ec02ec394c9871c832963dc1b89d743c8c7b964029b2311687b1fe23;\\n uint constant M12 = 0x176cc029695ad02582a70eff08a6fd99d057e12e58e7d7b6b16cdfabc8ee2911;\\n\\n // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40\\n // Inspired by: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js\\n function hash(uint[2] memory) public pure returns (uint) {\\n assembly {\\n let F := 21888242871839275222246405745257275088548364400416034343698204186575808495617\\n let M20 := 0x2b90bba00fca0589f617e7dcbfe82e0df706ab640ceb247b791a93b74e36736d\\n let M21 := 0x101071f0032379b697315876690f053d148d4e109f5fb065c8aacc55a0f89bfa\\n let M22 := 0x19a3fc0a56702bf417ba7fee3802593fa644470307043f7773279cd71d25d5e0\\n\\n // load the inputs from memory\\n let state1 := add(mod(mload(0x80), F), 0x00f1445235f2148c5986587169fc1bcd887b08d4d00868df5696fff40956e864)\\n let state2 := add(mod(mload(0xa0), F), 0x08dff3487e8ac99e1f29a058d0fa80b930c728730b7ab36ce879f3890ecf73f5)\\n let scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(\\n 0x2f27be690fdaee46c3ce28f7532b13c856c35342c84bda6e20966310fadc01d0,\\n add(add(15452833169820924772166449970675545095234312153403844297388521437673434406763, mulmod(state1, M10, F)), mulmod(state2, M20, F))\\n )\\n let scratch1 := add(\\n 0x2b2ae1acf68b7b8d2416bebf3d4f6234b763fe04b8043ee48b8327bebca16cf2,\\n add(add(18674271267752038776579386132900109523609358935013267566297499497165104279117, mulmod(state1, M11, F)), mulmod(state2, M21, F))\\n )\\n let scratch2 := add(\\n 0x0319d062072bef7ecca5eac06f97d4d55952c175ab6b03eae64b44c7dbf11cfa,\\n add(add(14817777843080276494683266178512808687156649753153012854386334860566696099579, mulmod(state1, M12, F)), mulmod(state2, M22, F))\\n )\\n let state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x28813dcaebaeaa828a376df87af4a63bc8b7bf27ad49c6298ef7b387bf28526d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2727673b2ccbc903f181bf38e1c1d40d2033865200c352bc150928adddf9cb78, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x234ec45ca27727c2e74abd2b2a1494cd6efbd43e340587d6b8fb9e31e65cc632, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(0x15b52534031ae18f7f862cb2cf7cf760ab10a8150a337b1ccd99ff6e8797d428, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0dc8fad6d9e4b35f5ed9a3d186b79ce38e0e8a8d1b58b132d701d4eecf68d1f6, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1bcd95ffc211fbca600f705fad3fb567ea4eb378f62e1fec97805518a47e4d9c, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x10520b0ab721cadfe9eff81b016fc34dc76da36c2578937817cb978d069de559, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1f6d48149b8e7f7d9b257d8ed5fbbaf42932498075fed0ace88a9eb81f5627f6, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1d9655f652309014d29e00ef35a2089bfff8dc1c816f0dc9ca34bdb5460c8705, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x04df5a56ff95bcafb051f7b1cd43a99ba731ff67e47032058fe3d4185697cc7d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0672d995f8fff640151b3d290cedaf148690a10a8c8424a7f6ec282b6e4be828, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x099952b414884454b21200d7ffafdd5f0c9a9dcc06f2708e9fc1d8209b5c75b9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x052cba2255dfd00c7c483143ba8d469448e43586a9b4cd9183fd0e843a6b9fa6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0b8badee690adb8eb0bd74712b7999af82de55707251ad7716077cb93c464ddc, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x119b1590f13307af5a1ee651020c07c749c15d60683a8050b963d0a8e4b2bdd1, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x03150b7cd6d5d17b2529d36be0f67b832c4acfc884ef4ee5ce15be0bfb4a8d09, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2cc6182c5e14546e3cf1951f173912355374efb83d80898abe69cb317c9ea565, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x005032551e6378c450cfe129a404b3764218cadedac14e2b92d2cd73111bf0f9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x233237e3289baa34bb147e972ebcb9516469c399fcc069fb88f9da2cc28276b5, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x05c8f4f4ebd4a6e3c980d31674bfbe6323037f21b34ae5a4e80c2d4c24d60280, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0a7b1db13042d396ba05d818a319f25252bcf35ef3aeed91ee1f09b2590fc65b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2a73b71f9b210cf5b14296572c9d32dbf156e2b086ff47dc5df542365a404ec0, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1ac9b0417abcc9a1935107e9ffc91dc3ec18f2c4dbe7f22976a760bb5c50c460, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x12c0339ae08374823fabb076707ef479269f3e4d6cb104349015ee046dc93fc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0b7475b102a165ad7f5b18db4e1e704f52900aa3253baac68246682e56e9a28e, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x037c2849e191ca3edb1c5e49f6e8b8917c843e379366f2ea32ab3aa88d7f8448, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x05a6811f8556f014e92674661e217e9bd5206c5c93a07dc145fdb176a716346f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x29a795e7d98028946e947b75d54e9f044076e87a7b2883b47b675ef5f38bd66e, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x20439a0c84b322eb45a3857afc18f5826e8c7382c8a1585c507be199981fd22f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2e0ba8d94d9ecf4a94ec2050c7371ff1bb50f27799a84b6d4a2a6f2a0982c887, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x143fd115ce08fb27ca38eb7cce822b4517822cd2109048d2e6d0ddcca17d71c8, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0c64cbecb1c734b857968dbbdcf813cdf8611659323dbcbfc84323623be9caf1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x028a305847c683f646fca925c163ff5ae74f348d62c2b670f1426cef9403da53, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2e4ef510ff0b6fda5fa940ab4c4380f26a6bcb64d89427b824d6755b5db9e30c, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0081c95bc43384e663d79270c956ce3b8925b4f6d033b078b96384f50579400e, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2ed5f0c91cbd9749187e2fade687e05ee2491b349c039a0bba8a9f4023a0bb38, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x30509991f88da3504bbf374ed5aae2f03448a22c76234c8c990f01f33a735206, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1c3f20fd55409a53221b7c4d49a356b9f0a1119fb2067b41a7529094424ec6ad, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x10b4e7f3ab5df003049514459b6e18eec46bb2213e8e131e170887b47ddcb96c, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2a1982979c3ff7f43ddd543d891c2abddd80f804c077d775039aa3502e43adef, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1c74ee64f15e1db6feddbead56d6d55dba431ebc396c9af95cad0f1315bd5c91, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x07533ec850ba7f98eab9303cace01b4b9e4f2e8b82708cfa9c2fe45a0ae146a0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x21576b438e500449a151e4eeaf17b154285c68f42d42c1808a11abf3764c0750, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2f17c0559b8fe79608ad5ca193d62f10bce8384c815f0906743d6930836d4a9e, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x2d477e3862d07708a79e8aae946170bc9775a4201318474ae665b0b1b7e2730e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x162f5243967064c390e095577984f291afba2266c38f5abcd89be0f5b2747eab, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2b4cb233ede9ba48264ecd2c8ae50d1ad7a8596a87f29f8a7777a70092393311, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2c8fbcb2dd8573dc1dbaf8f4622854776db2eece6d85c4cf4254e7c35e03b07a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1d6f347725e4816af2ff453f0cd56b199e1b61e9f601e9ade5e88db870949da9, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x204b0c397f4ebe71ebc2d8b3df5b913df9e6ac02b68d31324cd49af5c4565529, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0c4cb9dc3c4fd8174f1149b3c63c3c2f9ecb827cd7dc25534ff8fb75bc79c502, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x174ad61a1448c899a25416474f4930301e5c49475279e0639a616ddc45bc7b54, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1a96177bcf4d8d89f759df4ec2f3cde2eaaa28c177cc0fa13a9816d49a38d2ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x066d04b24331d71cd0ef8054bc60c4ff05202c126a233c1a8242ace360b8a30a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2a4c4fc6ec0b0cf52195782871c6dd3b381cc65f72e02ad527037a62aa1bd804, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x13ab2d136ccf37d447e9f2e14a7cedc95e727f8446f6d9d7e55afc01219fd649, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1121552fca26061619d24d843dc82769c1b04fcec26f55194c2e3e869acc6a9a, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x00ef653322b13d6c889bc81715c37d77a6cd267d595c4a8909a5546c7c97cff1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0e25483e45a665208b261d8ba74051e6400c776d652595d9845aca35d8a397d3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x29f536dcb9dd7682245264659e15d88e395ac3d4dde92d8c46448db979eeba89, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2a56ef9f2c53febadfda33575dbdbd885a124e2780bbea170e456baace0fa5be, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1c8361c78eb5cf5decfb7a2d17b5c409f2ae2999a46762e8ee416240a8cb9af1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x151aff5f38b20a0fc0473089aaf0206b83e8e68a764507bfd3d0ab4be74319c5, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x04c6187e41ed881dc1b239c88f7f9d43a9f52fc8c8b6cdd1e76e47615b51f100, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x13b37bd80f4d27fb10d84331f6fb6d534b81c61ed15776449e801b7ddc9c2967, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x01a5c536273c2d9df578bfbd32c17b7a2ce3664c2a52032c9321ceb1c4e8a8e4, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2ab3561834ca73835ad05f5d7acb950b4a9a2c666b9726da832239065b7c3b02, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1d4d8ec291e720db200fe6d686c0d613acaf6af4e95d3bf69f7ed516a597b646, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x041294d2cc484d228f5784fe7919fd2bb925351240a04b711514c9c80b65af1d, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x154ac98e01708c611c4fa715991f004898f57939d126e392042971dd90e81fc6, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0b339d8acca7d4f83eedd84093aef51050b3684c88f8b0b04524563bc6ea4da4, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0955e49e6610c94254a4f84cfbab344598f0e71eaff4a7dd81ed95b50839c82e, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x06746a6156eba54426b9e22206f15abca9a6f41e6f535c6f3525401ea0654626, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0f18f5a0ecd1423c496f3820c549c27838e5790e2bd0a196ac917c7ff32077fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x04f6eeca1751f7308ac59eff5beb261e4bb563583ede7bc92a738223d6f76e13, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2b56973364c4c4f5c1a3ec4da3cdce038811eb116fb3e45bc1768d26fc0b3758, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x123769dd49d5b054dcd76b89804b1bcb8e1392b385716a5d83feb65d437f29ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2147b424fc48c80a88ee52b91169aacea989f6446471150994257b2fb01c63e9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0fdc1f58548b85701a6c5505ea332a29647e6f34ad4243c2ea54ad897cebe54d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x12373a8251fea004df68abcf0f7786d4bceff28c5dbbe0c3944f685cc0a0b1f2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x21e4f4ea5f35f85bad7ea52ff742c9e8a642756b6af44203dd8a1f35c1a90035, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x16243916d69d2ca3dfb4722224d4c462b57366492f45e90d8a81934f1bc3b147, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1efbe46dd7a578b4f66f9adbc88b4378abc21566e1a0453ca13a4159cac04ac2, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x07ea5e8537cf5dd08886020e23a7f387d468d5525be66f853b672cc96a88969a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x05a8c4f9968b8aa3b7b478a30f9a5b63650f19a75e7ce11ca9fe16c0b76c00bc, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x20f057712cc21654fbfe59bd345e8dac3f7818c701b9c7882d9d57b72a32e83f, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x04a12ededa9dfd689672f8c67fee31636dcd8e88d01d49019bd90b33eb33db69, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x27e88d8c15f37dcee44f1e5425a51decbd136ce5091a6767e49ec9544ccd101a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2feed17b84285ed9b8a5c8c5e95a41f66e096619a7703223176c41ee433de4d1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1ed7cc76edf45c7c404241420f729cf394e5942911312a0d6972b8bd53aff2b8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x15742e99b9bfa323157ff8c586f5660eac6783476144cdcadf2874be45466b1a, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1aac285387f65e82c895fc6887ddf40577107454c6ec0317284f033f27d0c785, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x25851c3c845d4790f9ddadbdb6057357832e2e7a49775f71ec75a96554d67c77, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x15a5821565cc2ec2ce78457db197edf353b7ebba2c5523370ddccc3d9f146a67, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2411d57a4813b9980efa7e31a1db5966dcf64f36044277502f15485f28c71727, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x002e6f8d6520cd4713e335b8c0b6d2e647e9a98e12f4cd2558828b5ef6cb4c9b, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2ff7bc8f4380cde997da00b616b0fcd1af8f0e91e2fe1ed7398834609e0315d2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x00b9831b948525595ee02724471bcd182e9521f6b7bb68f1e93be4febb0d3cbe, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0a2f53768b8ebf6a86913b0e57c04e011ca408648a4743a87d77adbf0c9c3512, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x00248156142fd0373a479f91ff239e960f599ff7e94be69b7f2a290305e1198d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x171d5620b87bfb1328cf8c02ab3f0c9a397196aa6a542c2350eb512a2b2bcda9, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x170a4f55536f7dc970087c7c10d6fad760c952172dd54dd99d1045e4ec34a808, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x29aba33f799fe66c2ef3134aea04336ecc37e38c1cd211ba482eca17e2dbfae1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1e9bc179a4fdd758fdd1bb1945088d47e70d114a03f6a0e8b5ba650369e64973, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1dd269799b660fad58f7f4892dfb0b5afeaad869a9c4b44f9c9e1c43bdaf8f09, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x22cdbc8b70117ad1401181d02e15459e7ccd426fe869c7c95d1dd2cb0f24af38, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0ef042e454771c533a9f57a55c503fcefd3150f52ed94a7cd5ba93b9c7dacefd, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x11609e06ad6c8fe2f287f3036037e8851318e8b08a0359a03b304ffca62e8284, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1166d9e554616dba9e753eea427c17b7fecd58c076dfe42708b08f5b783aa9af, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2de52989431a859593413026354413db177fbf4cd2ac0b56f855a888357ee466, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x3006eb4ffc7a85819a6da492f3a8ac1df51aee5b17b8e89d74bf01cf5f71e9ad, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2af41fbb61ba8a80fdcf6fff9e3f6f422993fe8f0a4639f962344c8225145086, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x119e684de476155fe5a6b41a8ebc85db8718ab27889e85e781b214bace4827c3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1835b786e2e8925e188bea59ae363537b51248c23828f047cff784b97b3fd800, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x28201a34c594dfa34d794996c6433a20d152bac2a7905c926c40e285ab32eeb6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x083efd7a27d1751094e80fefaf78b000864c82eb571187724a761f88c22cc4e7, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0b6f88a3577199526158e61ceea27be811c16df7774dd8519e079564f61fd13b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0ec868e6d15e51d9644f66e1d6471a94589511ca00d29e1014390e6ee4254f5b, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2af33e3f866771271ac0c9b3ed2e1142ecd3e74b939cd40d00d937ab84c98591, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0b520211f904b5e7d09b5d961c6ace7734568c547dd6858b364ce5e47951f178, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0b2d722d0919a1aad8db58f10062a92ea0c56ac4270e822cca228620188a1d40, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1f790d4d7f8cf094d980ceb37c2453e957b54a9991ca38bbe0061d1ed6e562d4, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0171eb95dfbf7d1eaea97cd385f780150885c16235a2a6a8da92ceb01e504233, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0c2d0e3b5fd57549329bf6885da66b9b790b40defd2c8650762305381b168873, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1162fb28689c27154e5a8228b4e72b377cbcafa589e283c35d3803054407a18d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2f1459b65dee441b64ad386a91e8310f282c5a92a89e19921623ef8249711bc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1e6ff3216b688c3d996d74367d5cd4c1bc489d46754eb712c243f70d1b53cfbb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x01ca8be73832b8d0681487d27d157802d741a6f36cdc2a0576881f9326478875, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1f7735706ffe9fc586f976d5bdf223dc680286080b10cea00b9b5de315f9650e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2522b60f4ea3307640a0c2dce041fba921ac10a3d5f096ef4745ca838285f019, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x23f0bee001b1029d5255075ddc957f833418cad4f52b6c3f8ce16c235572575b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2bc1ae8b8ddbb81fcaac2d44555ed5685d142633e9df905f66d9401093082d59, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0f9406b8296564a37304507b8dba3ed162371273a07b1fc98011fcd6ad72205f, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2360a8eb0cc7defa67b72998de90714e17e75b174a52ee4acb126c8cd995f0a8, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x15871a5cddead976804c803cbaef255eb4815a5e96df8b006dcbbc2767f88948, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x193a56766998ee9e0a8652dd2f3b1da0362f4f54f72379544f957ccdeefb420f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2a394a43934f86982f9be56ff4fab1703b2e63c8ad334834e4309805e777ae0f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1859954cfeb8695f3e8b635dcb345192892cd11223443ba7b4166e8876c0d142, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x04e1181763050e58013444dbcb99f1902b11bc25d90bbdca408d3819f4fed32b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0fdb253dee83869d40c335ea64de8c5bb10eb82db08b5e8b1f5e5552bfd05f23, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x058cbe8a9a5027bdaa4efb623adead6275f08686f1c08984a9d7c5bae9b4f1c0, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x1382edce9971e186497eadb1aeb1f52b23b4b83bef023ab0d15228b4cceca59a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x03464990f045c6ee0819ca51fd11b0be7f61b8eb99f14b77e1e6634601d9e8b5, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x23f7bfc8720dc296fff33b41f98ff83c6fcab4605db2eb5aaa5bc137aeb70a58, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0a59a158e3eec2117e6e94e7f0e9decf18c3ffd5e1531a9219636158bbaf62f2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x06ec54c80381c052b58bf23b312ffd3ce2c4eba065420af8f4c23ed0075fd07b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x118872dc832e0eb5476b56648e867ec8b09340f7a7bcb1b4962f0ff9ed1f9d01, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x13d69fa127d834165ad5c7cba7ad59ed52e0b0f0e42d7fea95e1906b520921b1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x169a177f63ea681270b1c6877a73d21bde143942fb71dc55fd8a49f19f10c77b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x04ef51591c6ead97ef42f287adce40d93abeb032b922f66ffb7e9a5a7450544d, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x256e175a1dc079390ecd7ca703fb2e3b19ec61805d4f03ced5f45ee6dd0f69ec, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x30102d28636abd5fe5f2af412ff6004f75cc360d3205dd2da002813d3e2ceeb2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x10998e42dfcd3bbf1c0714bc73eb1bf40443a3fa99bef4a31fd31be182fcc792, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x193edd8e9fcf3d7625fa7d24b598a1d89f3362eaf4d582efecad76f879e36860, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x18168afd34f2d915d0368ce80b7b3347d1c7a561ce611425f2664d7aa51f0b5d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x29383c01ebd3b6ab0c017656ebe658b6a328ec77bc33626e29e2e95b33ea6111, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x10646d2f2603de39a1f4ae5e7771a64a702db6e86fb76ab600bf573f9010c711, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0beb5e07d1b27145f575f1395a55bf132f90c25b40da7b3864d0242dcb1117fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x16d685252078c133dc0d3ecad62b5c8830f95bb2e54b59abdffbf018d96fa336, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0a6abd1d833938f33c74154e0404b4b40a555bbbec21ddfafd672dd62047f01a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1a679f5d36eb7b5c8ea12a4c2dedc8feb12dffeec450317270a6f19b34cf1860, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0980fb233bd456c23974d50e0ebfde4726a423eada4e8f6ffbc7592e3f1b93d6, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x161b42232e61b84cbf1810af93a38fc0cece3d5628c9282003ebacb5c312c72b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0ada10a90c7f0520950f7d47a60d5e6a493f09787f1564e5d09203db47de1a0b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1a730d372310ba82320345a29ac4238ed3f07a8a2b4e121bb50ddb9af407f451, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2c8120f268ef054f817064c369dda7ea908377feaba5c4dffbda10ef58e8c556, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1c7c8824f758753fa57c00789c684217b930e95313bcb73e6e7b8649a4968f70, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2cd9ed31f5f8691c8e39e4077a74faa0f400ad8b491eb3f7b47b27fa3fd1cf77, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x23ff4f9d46813457cf60d92f57618399a5e022ac321ca550854ae23918a22eea, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x09945a5d147a4f66ceece6405dddd9d0af5a2c5103529407dff1ea58f180426d, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x188d9c528025d4c2b67660c6b771b90f7c7da6eaa29d3f268a6dd223ec6fc630, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x3050e37996596b7f81f68311431d8734dba7d926d3633595e0c0d8ddf4f0f47f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x15af1169396830a91600ca8102c35c426ceae5461e3f95d89d829518d30afd78, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1da6d09885432ea9a06d9f37f873d985dae933e351466b2904284da3320d8acc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2796ea90d269af29f5f8acf33921124e4e4fad3dbe658945e546ee411ddaa9cb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x202d7dd1da0f6b4b0325c8b3307742f01e15612ec8e9304a7cb0319e01d32d60, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x096d6790d05bb759156a952ba263d672a2d7f9c788f4c831a29dace4c0f8be5f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x054efa1f65b0fce283808965275d877b438da23ce5b13e1963798cb1447d25a4, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1b162f83d917e93edb3308c29802deb9d8aa690113b2e14864ccf6e18e4165f1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x21e5241e12564dd6fd9f1cdd2a0de39eedfefc1466cc568ec5ceb745a0506edc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x1cfb5662e8cf5ac9226a80ee17b36abecb73ab5f87e161927b4349e10e4bdf08, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0f21177e302a771bbae6d8d1ecb373b62c99af346220ac0129c53f666eb24100, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1671522374606992affb0dd7f71b12bec4236aede6290546bcef7e1f515c2320, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(0x0fa3ec5b9488259c2eb4cf24501bfad9be2ec9e42c5cc8ccd419d2a692cad870, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x193c0e04e0bd298357cb266c1506080ed36edce85c648cc085e8c57b1ab54bba, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x102adf8ef74735a27e9128306dcbc3c99f6f7291cd406578ce14ea2adaba68f8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x0fe0af7858e49859e2a54d6f1ad945b1316aa24bfbdd23ae40a6d0cb70c3eab1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x216f6717bbc7dedb08536a2220843f4e2da5f1daa9ebdefde8a5ea7344798d22, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1da55cc900f0d21f4a3e694391918a1b3c23b2ac773c6b3ef88e2e4228325161, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n\\n mstore(0x0, mod(add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)), F))\\n\\n return(0, 0x20)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0102caa303bbc6690508f3615604f7730789ed990058c9513a87ccb30e4835be\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60803461022457601f6116dc38819003918201601f19168301916001600160401b0383118484101761022957808492604094855283398101031261022457610052602061004b8361023f565b920161023f565b6000805160206116bc83398151915254604081901c60ff16159291906001600160401b0381168015908161021c575b6001149081610212575b159081610209575b506101f8576001600160401b031981166001176000805160206116bc83398151915255836101cd575b506100c56102c9565b6100cd6102c9565b6100d633610253565b6100de6102f7565b600080546001600160a01b0319166001600160a01b039290921691821781557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c99080a260008051602061169c833981519152546001600160a01b03908116908216036101b6575b5061015a575b60405161136e908161032e8239f35b68ff0000000000000000196000805160206116bc83398151915254166000805160206116bc833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a161014b565b6101c7906101c26102f7565b610253565b38610145565b6001600160481b03191668010000000000000001176000805160206116bc83398151915255386100bc565b63f92ee8a960e01b60005260046000fd5b90501538610093565b303b15915061008b565b859150610081565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361022457565b6001600160a01b031680156102b35760008051602061169c83398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff6000805160206116bc8339815191525460401c16156102e657565b631afcd79f60e31b60005260046000fd5b60008051602061169c833981519152546001600160a01b0316330361031857565b63118cdaa760e01b6000523360045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c90816306e341501461108c575080632c92fb99146110575780632e7b716d14610a0b578063485cc95514610e0957806370e36bbe14610da6578063715018a614610d0d5780638a78bb1514610adf5780638cb89ecb14610ab35780638d1ddfb114610a955780638da5cb5b14610a4f5780639015d37114610a0b5780639ccb58d514610897578063a04e606514610387578063c2b40ae41461035b578063ca2869a01461035b578063d9bbec9514610221578063dbb06c93146101fa578063e82f3b70146101b6578063ebf0c71714610184578063f2fde38b14610159578063f379b0df146101345763f6fc05d51461011157600080fd5b3461012f57600036600319011261012f576020600154604051908152f35b600080fd5b3461012f57600036600319011261012f57604060025460035482519182526020820152f35b3461012f57602036600319011261012f576101826101756110bd565b61017d611243565b61119d565b005b3461012f57600036600319011261012f5760206101ae600354600052600460205260406000205490565b604051908152f35b3461012f57602036600319011261012f57600435600052600860205260406000205480156101e957602090604051908152f35b6322e679e360e11b60005260046000fd5b3461012f57600036600319011261012f5760206001600160a01b0360005416604051908152f35b3461012f57606036600319011261012f5760043560243567ffffffffffffffff811161012f576102559036906004016110e9565b505060443567ffffffffffffffff811161012f576102779036906004016110e9565b8260005260066020526001600160a01b0360406000205416330361034a5767ffffffffffffffff811161033457604051601f8201601f1916926102bd6020850183611142565b8282526020820193368483011161012f578460409385847f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc01983760006020878301015251902086600052600860205283600020556000838581519687956020875281602088015283870137840101528101030190a2005b634e487b7160e01b600052604160045260246000fd5b63be19562360e01b60005260046000fd5b3461012f57602036600319011261012f5760043560005260076020526020604060002054604051908152f35b3461012f57604036600319011261012f576103a06110bd565b60243567ffffffffffffffff811161012f573660238201121561012f5780600401359167ffffffffffffffff831161012f576024820191602436918560051b01011161012f576001600160a01b03906103f7611243565b1691610402836112b9565b9161041a846000526005602052604060002054151590565b61042f57631c811d5b60e21b60005260046000fd5b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5461088657610467846112b9565b600092859160025493600019850194851161087257600354948693849392915b87851061054d575050505050506104ab600354600052600460205260406000205490565b0361053c57600052600460205260406000205581600052600560205260006040812055600154908115610526576000199091016001819055600254604080519384526020840192909252908201527f8c008e3835f6c79bfcdb89f0f6ca8705e0b01049ee84a90b0e4da1c7ba9405d59080606081015b0390a2005b634e487b7160e01b600052601160045260246000fd5b631fd4986360e11b60005260046000fd5b90919293949584861c6001808216146000146106ed57507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161059088858761133b565b3510156106dc576105eb6020733333333C0A88F9BE4fd23ed0536F9B6c427e3B939a604051906105bf82611126565b6105ca8b888a61133b565b3582528282015260405180938192632b0aac7f60e11b83526004830161128b565b03818d5af490811561069d576000916106a9575b50610642916020919a6040519161061583611126565b6106208b888a61133b565b358352838301526040518080958194632b0aac7f60e11b83526004830161128b565b03915af490811561069d57600091610668575b50600180919701955b0193929190610487565b906020823d8211610695575b8161068160209383611142565b810103126106925750516001610655565b80fd5b3d9150610674565b6040513d6000823e3d90fd5b906020823d82116106d4575b816106c260209383611142565b810103126106925750516106426105ff565b3d91506106b5565b6361c0541760e11b60005260046000fd5b82871c14610858577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161072188858761133b565b3510156106dc5761077c6020733333333C0A88F9BE4fd23ed0536F9B6c427e3B939a6040519061075082611126565b815261075d8a878961133b565b358282015260405180938192632b0aac7f60e11b83526004830161128b565b03818d5af490811561069d57600091610825575b506107d3916020919a604051916107a683611126565b82526107b38a878961133b565b35838301526040518080958194632b0aac7f60e11b83526004830161128b565b03915af490811561069d576000916107f3575b506001809197019561065e565b906020823d821161081d575b8161080c60209383611142565b8101031261069257505160016107e6565b3d91506107ff565b906020823d8211610850575b8161083e60209383611142565b810103126106925750516107d3610790565b3d9150610831565b95946001908660005260046020528960406000205561065e565b634e487b7160e01b86526011600452602486fd5b6312c50cad60e11b60005260046000fd5b3461012f57608036600319011261012f576004356108b36110d3565b3660841161012f576001600160a01b036000541633036109fa578160005260066020526001600160a01b03604060002054166109e9576001600160a01b03168160005260066020526040600020816001600160a01b0319825416179055610927600354600052600460205260406000205490565b826000526007602052604060002055604051631590527b60e11b815282600482015261095560248201611164565b6020816064816000865af1801561069d576109ae575b5060607fa17377d4a5c0ff5c67888a6b08d9bf3a8505b47e922b6186b259471ebf12738e916040519081526109a260208201611164565ba2602060405160018152f35b6020813d6020116109e1575b816109c760209383611142565b8101031261012f5751801515810361012f5750606061096b565b3d91506109ba565b6374ff462560e11b60005260046000fd5b63e4c2a7eb60e01b60005260046000fd5b3461012f57602036600319011261012f576020610a45610a296110bd565b6001600160a01b03166000526005602052604060002054151590565b6040519015158152f35b3461012f57600036600319011261012f5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b3461012f57600036600319011261012f576020600254604051908152f35b3461012f57602036600319011261012f5760043560005260086020526020604060002054604051908152f35b3461012f57602036600319011261012f576001600160a01b03610b006110bd565b610b08611243565b167f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018110610b41576361c0541760e11b60005260046000fd5b80610b57576314b48df160e11b60005260046000fd5b610b6e816000526005602052604060002054151590565b610886576002546003549060ff82116105265760018101808211610526576001831b10610cfd575b81600355829060005b838110610c2e5750610bb090611117565b918260025560005260046020526040600020558160005260056020526040600020557f3318d261fe14a5761d2d1e21555652f623d2134c430a9883c9ad6e958bb0db53610bfe600154611117565b80600155610c0b836112b9565b610521600254604051938493846040919493926060820195825260208201520152565b9160018083851c1614600014610ce4576020610c7f9160405190610c5182611126565b856000526004835260406000205482528282015260405180938192632b0aac7f60e11b83526004830161128b565b0381733333333C0A88F9BE4fd23ed0536F9B6c427e3B935af4801561069d57600090610cb2575b60019150925b01610b9f565b6020823d8211610cdc575b81610cca60209383611142565b81010312610692575060019051610ca6565b3d9150610cbd565b9180600191600052600460205283604060002055610cac565b90610d0790611117565b90610b96565b3461012f57600036600319011261012f57610d26611243565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461012f57602036600319011261012f576001600160a01b03610dc76110bd565b610dcf611243565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a2005b3461012f57604036600319011261012f57610e226110bd565b610e2a6110d3565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff82168015908161104f575b6001149081611045575b15908161103c575b5061102b5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039184610fec575b50610eca6112fb565b610ed26112fb565b610edb3361119d565b610ee3611243565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a26001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b03821603610fda575b50610f5d57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b610fe69061017d611243565b81610f56565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005584610ec1565b63f92ee8a960e01b60005260046000fd5b90501585610e7c565b303b159150610e74565b859150610e6a565b3461012f57602036600319011261012f57600435600052600660205260206001600160a01b0360406000205416604051908152f35b3461012f57602036600319011261012f57602090600435600052600682526001600160a01b03604060002054168152f35b600435906001600160a01b038216820361012f57565b602435906001600160a01b038216820361012f57565b9181601f8401121561012f5782359167ffffffffffffffff831161012f576020838186019501011161012f57565b60001981146105265760010190565b6040810190811067ffffffffffffffff82111761033457604052565b90601f8019910116810190811067ffffffffffffffff82111761033457604052565b60446000915b6002831061117757505050565b81359063ffffffff821680920361012f576020816001938293520192019201919061116a565b6001600160a01b0316801561122d576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361127657565b63118cdaa760e01b6000523360045260246000fd5b919060408301926000905b600282106112a357505050565b6020806001928551815201930191019091611296565b806000526005602052604060002054156112ea57600052600560205260406000205460001981019081116105265790565b631c811d5b60e21b60005260046000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561132a57565b631afcd79f60e31b60005260046000fd5b919081101561134b5760051b0190565b634e487b7160e01b600052603260045260246000fdfea164736f6c634300081b000a9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c90816306e341501461108c575080632c92fb99146110575780632e7b716d14610a0b578063485cc95514610e0957806370e36bbe14610da6578063715018a614610d0d5780638a78bb1514610adf5780638cb89ecb14610ab35780638d1ddfb114610a955780638da5cb5b14610a4f5780639015d37114610a0b5780639ccb58d514610897578063a04e606514610387578063c2b40ae41461035b578063ca2869a01461035b578063d9bbec9514610221578063dbb06c93146101fa578063e82f3b70146101b6578063ebf0c71714610184578063f2fde38b14610159578063f379b0df146101345763f6fc05d51461011157600080fd5b3461012f57600036600319011261012f576020600154604051908152f35b600080fd5b3461012f57600036600319011261012f57604060025460035482519182526020820152f35b3461012f57602036600319011261012f576101826101756110bd565b61017d611243565b61119d565b005b3461012f57600036600319011261012f5760206101ae600354600052600460205260406000205490565b604051908152f35b3461012f57602036600319011261012f57600435600052600860205260406000205480156101e957602090604051908152f35b6322e679e360e11b60005260046000fd5b3461012f57600036600319011261012f5760206001600160a01b0360005416604051908152f35b3461012f57606036600319011261012f5760043560243567ffffffffffffffff811161012f576102559036906004016110e9565b505060443567ffffffffffffffff811161012f576102779036906004016110e9565b8260005260066020526001600160a01b0360406000205416330361034a5767ffffffffffffffff811161033457604051601f8201601f1916926102bd6020850183611142565b8282526020820193368483011161012f578460409385847f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc01983760006020878301015251902086600052600860205283600020556000838581519687956020875281602088015283870137840101528101030190a2005b634e487b7160e01b600052604160045260246000fd5b63be19562360e01b60005260046000fd5b3461012f57602036600319011261012f5760043560005260076020526020604060002054604051908152f35b3461012f57604036600319011261012f576103a06110bd565b60243567ffffffffffffffff811161012f573660238201121561012f5780600401359167ffffffffffffffff831161012f576024820191602436918560051b01011161012f576001600160a01b03906103f7611243565b1691610402836112b9565b9161041a846000526005602052604060002054151590565b61042f57631c811d5b60e21b60005260046000fd5b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5461088657610467846112b9565b600092859160025493600019850194851161087257600354948693849392915b87851061054d575050505050506104ab600354600052600460205260406000205490565b0361053c57600052600460205260406000205581600052600560205260006040812055600154908115610526576000199091016001819055600254604080519384526020840192909252908201527f8c008e3835f6c79bfcdb89f0f6ca8705e0b01049ee84a90b0e4da1c7ba9405d59080606081015b0390a2005b634e487b7160e01b600052601160045260246000fd5b631fd4986360e11b60005260046000fd5b90919293949584861c6001808216146000146106ed57507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161059088858761133b565b3510156106dc576105eb602073__$75f79a42d9bcbdbb69ad79ebd80f556f39$__9a604051906105bf82611126565b6105ca8b888a61133b565b3582528282015260405180938192632b0aac7f60e11b83526004830161128b565b03818d5af490811561069d576000916106a9575b50610642916020919a6040519161061583611126565b6106208b888a61133b565b358352838301526040518080958194632b0aac7f60e11b83526004830161128b565b03915af490811561069d57600091610668575b50600180919701955b0193929190610487565b906020823d8211610695575b8161068160209383611142565b810103126106925750516001610655565b80fd5b3d9150610674565b6040513d6000823e3d90fd5b906020823d82116106d4575b816106c260209383611142565b810103126106925750516106426105ff565b3d91506106b5565b6361c0541760e11b60005260046000fd5b82871c14610858577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161072188858761133b565b3510156106dc5761077c602073__$75f79a42d9bcbdbb69ad79ebd80f556f39$__9a6040519061075082611126565b815261075d8a878961133b565b358282015260405180938192632b0aac7f60e11b83526004830161128b565b03818d5af490811561069d57600091610825575b506107d3916020919a604051916107a683611126565b82526107b38a878961133b565b35838301526040518080958194632b0aac7f60e11b83526004830161128b565b03915af490811561069d576000916107f3575b506001809197019561065e565b906020823d821161081d575b8161080c60209383611142565b8101031261069257505160016107e6565b3d91506107ff565b906020823d8211610850575b8161083e60209383611142565b810103126106925750516107d3610790565b3d9150610831565b95946001908660005260046020528960406000205561065e565b634e487b7160e01b86526011600452602486fd5b6312c50cad60e11b60005260046000fd5b3461012f57608036600319011261012f576004356108b36110d3565b3660841161012f576001600160a01b036000541633036109fa578160005260066020526001600160a01b03604060002054166109e9576001600160a01b03168160005260066020526040600020816001600160a01b0319825416179055610927600354600052600460205260406000205490565b826000526007602052604060002055604051631590527b60e11b815282600482015261095560248201611164565b6020816064816000865af1801561069d576109ae575b5060607fa17377d4a5c0ff5c67888a6b08d9bf3a8505b47e922b6186b259471ebf12738e916040519081526109a260208201611164565ba2602060405160018152f35b6020813d6020116109e1575b816109c760209383611142565b8101031261012f5751801515810361012f5750606061096b565b3d91506109ba565b6374ff462560e11b60005260046000fd5b63e4c2a7eb60e01b60005260046000fd5b3461012f57602036600319011261012f576020610a45610a296110bd565b6001600160a01b03166000526005602052604060002054151590565b6040519015158152f35b3461012f57600036600319011261012f5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b3461012f57600036600319011261012f576020600254604051908152f35b3461012f57602036600319011261012f5760043560005260086020526020604060002054604051908152f35b3461012f57602036600319011261012f576001600160a01b03610b006110bd565b610b08611243565b167f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018110610b41576361c0541760e11b60005260046000fd5b80610b57576314b48df160e11b60005260046000fd5b610b6e816000526005602052604060002054151590565b610886576002546003549060ff82116105265760018101808211610526576001831b10610cfd575b81600355829060005b838110610c2e5750610bb090611117565b918260025560005260046020526040600020558160005260056020526040600020557f3318d261fe14a5761d2d1e21555652f623d2134c430a9883c9ad6e958bb0db53610bfe600154611117565b80600155610c0b836112b9565b610521600254604051938493846040919493926060820195825260208201520152565b9160018083851c1614600014610ce4576020610c7f9160405190610c5182611126565b856000526004835260406000205482528282015260405180938192632b0aac7f60e11b83526004830161128b565b038173__$75f79a42d9bcbdbb69ad79ebd80f556f39$__5af4801561069d57600090610cb2575b60019150925b01610b9f565b6020823d8211610cdc575b81610cca60209383611142565b81010312610692575060019051610ca6565b3d9150610cbd565b9180600191600052600460205283604060002055610cac565b90610d0790611117565b90610b96565b3461012f57600036600319011261012f57610d26611243565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461012f57602036600319011261012f576001600160a01b03610dc76110bd565b610dcf611243565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a2005b3461012f57604036600319011261012f57610e226110bd565b610e2a6110d3565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff82168015908161104f575b6001149081611045575b15908161103c575b5061102b5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039184610fec575b50610eca6112fb565b610ed26112fb565b610edb3361119d565b610ee3611243565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a26001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b03821603610fda575b50610f5d57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b610fe69061017d611243565b81610f56565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005584610ec1565b63f92ee8a960e01b60005260046000fd5b90501585610e7c565b303b159150610e74565b859150610e6a565b3461012f57602036600319011261012f57600435600052600660205260206001600160a01b0360406000205416604051908152f35b3461012f57602036600319011261012f57602090600435600052600682526001600160a01b03604060002054168152f35b600435906001600160a01b038216820361012f57565b602435906001600160a01b038216820361012f57565b9181601f8401121561012f5782359167ffffffffffffffff831161012f576020838186019501011161012f57565b60001981146105265760010190565b6040810190811067ffffffffffffffff82111761033457604052565b90601f8019910116810190811067ffffffffffffffff82111761033457604052565b60446000915b6002831061117757505050565b81359063ffffffff821680920361012f576020816001938293520192019201919061116a565b6001600160a01b0316801561122d576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361127657565b63118cdaa760e01b6000523360045260246000fd5b919060408301926000905b600282106112a357505050565b6020806001928551815201930191019091611296565b806000526005602052604060002054156112ea57600052600560205260406000205460001981019081116105265790565b631c811d5b60e21b60005260046000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561132a57565b631afcd79f60e31b60005260046000fd5b919081101561134b5760051b0190565b634e487b7160e01b600052603260045260246000fdfea164736f6c634300081b000a", + "libraries": { + "PoseidonT3": "0x3333333C0A88F9BE4fd23ed0536F9B6c427e3B93" + }, + "devdoc": { + "errors": { + "InvalidInitialization()": [ + { + "details": "The contract is already initialized." + } + ], + "NotInitializing()": [ + { + "details": "The contract is not initializing." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "events": { + "CiphernodeAdded(address,uint256,uint256,uint256)": { + "params": { + "index": "Index of the ciphernode in the registry.", + "node": "Address of the ciphernode.", + "numNodes": "Number of ciphernodes in the registry.", + "size": "Size of the registry." + } + }, + "CiphernodeRemoved(address,uint256,uint256,uint256)": { + "params": { + "index": "Index of the ciphernode in the registry.", + "node": "Address of the ciphernode.", + "numNodes": "Number of ciphernodes in the registry.", + "size": "Size of the registry." + } + }, + "CommitteePublished(uint256,bytes)": { + "params": { + "e3Id": "ID of the E3 for which the committee was selected.", + "publicKey": "Public key of the committee." + } + }, + "CommitteeRequested(uint256,address,uint32[2])": { + "params": { + "e3Id": "ID of the E3 for which the committee was selected.", + "filter": "Address of the contract that will coordinate committee selection.", + "threshold": "The M/N threshold for the committee." + } + }, + "EnclaveSet(address)": { + "params": { + "enclave": "Address of the enclave contract." + } + }, + "Initialized(uint64)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "committeePublicKey(uint256)": { + "details": "This function MUST revert if no committee has been requested for the given E3.This function MUST revert if the committee has not yet published a public key.", + "params": { + "e3Id": "ID of the E3 for which to get the committee public key." + }, + "returns": { + "publicKeyHash": "The hash of the public key of the given committee." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "requestCommittee(uint256,address,uint32[2])": { + "details": "This function MUST revert when not called by the Enclave contract.", + "params": { + "e3Id": "ID of the E3 for which to select the committee.", + "filter": "The address of the filter responsible for the committee selection process.", + "threshold": "The M/N threshold for the committee." + }, + "returns": { + "success": "True if committee selection was successfully initiated." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "CiphernodeAdded(address,uint256,uint256,uint256)": { + "notice": "This event MUST be emitted when a ciphernode is added to the registry." + }, + "CiphernodeRemoved(address,uint256,uint256,uint256)": { + "notice": "This event MUST be emitted when a ciphernode is removed from the registry." + }, + "CommitteePublished(uint256,bytes)": { + "notice": "This event MUST be emitted when a committee is selected for an E3." + }, + "CommitteeRequested(uint256,address,uint32[2])": { + "notice": "This event MUST be emitted when a committee is selected for an E3." + }, + "EnclaveSet(address)": { + "notice": "This event MUST be emitted when `enclave` is set." + } + }, + "kind": "user", + "methods": { + "committeePublicKey(uint256)": { + "notice": "This function should be called by the Enclave contract to get the public key of a committee." + }, + "requestCommittee(uint256,address,uint32[2])": { + "notice": "Initiates the committee selection process for a specified E3." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2881, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "enclave", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2883, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "numCiphernodes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2886, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "ciphernodes", + "offset": 0, + "slot": "2", + "type": "t_struct(LeanIMTData)518_storage" + }, + { + "astId": 2891, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "filters", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_contract(IRegistryFilter)2860)" + }, + { + "astId": 2895, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "roots", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 2899, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "publicKeyHashes", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_bytes32)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRegistryFilter)2860": { + "encoding": "inplace", + "label": "contract IRegistryFilter", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_mapping(t_uint256,t_contract(IRegistryFilter)2860)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => contract IRegistryFilter)", + "numberOfBytes": "32", + "value": "t_contract(IRegistryFilter)2860" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(LeanIMTData)518_storage": { + "encoding": "inplace", + "label": "struct LeanIMTData", + "members": [ + { + "astId": 507, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "size", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 509, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "depth", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 513, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "sideNodes", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 517, + "contract": "contracts/registry/CiphernodeRegistryOwnable.sol:CiphernodeRegistryOwnable", + "label": "leaves", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/CyphernodeRegistryOwnable.json b/packages/evm/deployments/sepolia/CyphernodeRegistryOwnable.json deleted file mode 100644 index 47ad8adb..00000000 --- a/packages/evm/deployments/sepolia/CyphernodeRegistryOwnable.json +++ /dev/null @@ -1,726 +0,0 @@ -{ - "address": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_enclave", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CommitteeAlreadyPublished", - "type": "error" - }, - { - "inputs": [], - "name": "CommitteeAlreadyRequested", - "type": "error" - }, - { - "inputs": [], - "name": "CommitteeDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "CommitteeNotPublished", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "CyphernodeNotEnabled", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyEnclave", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "publicKey", - "type": "bytes" - } - ], - "name": "CommitteePublished", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "filter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32[2]", - "name": "threshold", - "type": "uint32[2]" - } - ], - "name": "CommitteeRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "CyphernodeAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "CyphernodeRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "enclave", - "type": "address" - } - ], - "name": "EnclaveSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "addCyphernode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - } - ], - "name": "committeePublicKey", - "outputs": [ - { - "internalType": "bytes", - "name": "publicKey", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "enclave", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_enclave", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "isCyphernodeEligible", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "cyphernode", - "type": "address" - } - ], - "name": "isEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "isEnabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - } - ], - "name": "publicKeys", - "outputs": [ - { - "internalType": "bytes", - "name": "publicKey", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "publicKey", - "type": "bytes" - } - ], - "name": "publishCommittee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "node", - "type": "address" - } - ], - "name": "removeCyphernode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "filter", - "type": "address" - }, - { - "internalType": "uint32[2]", - "name": "threshold", - "type": "uint32[2]" - } - ], - "name": "requestCommittee", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - } - ], - "name": "requests", - "outputs": [ - { - "internalType": "contract IRegistryFilter", - "name": "filter", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_enclave", - "type": "address" - } - ], - "name": "setEnclave", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "receipt": { - "to": null, - "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", - "contractAddress": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "transactionIndex": 9, - "gasUsed": "860580", - "logsBloom": "0x00000000000080000001000000000100000000000000000000800000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000800000000000000800000000000000800000000080000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000020000000000000000000020000000000000000000000000000000001000000000000", - "blockHash": "0x8d6af7fa19913d7eb201f04a7307ee3844cdc4bda86b43ca3ab7e1522b577cab", - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "logs": [ - { - "transactionIndex": 9, - "blockNumber": 6668198, - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "address": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" - ], - "data": "0x", - "logIndex": 16, - "blockHash": "0x8d6af7fa19913d7eb201f04a7307ee3844cdc4bda86b43ca3ab7e1522b577cab" - }, - { - "transactionIndex": 9, - "blockNumber": 6668198, - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "address": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "topics": [ - "0x2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9", - "0x000000000000000000000000083b0ae25fd41469fd8857027b40e3f49a169375" - ], - "data": "0x", - "logIndex": 17, - "blockHash": "0x8d6af7fa19913d7eb201f04a7307ee3844cdc4bda86b43ca3ab7e1522b577cab" - }, - { - "transactionIndex": 9, - "blockNumber": 6668198, - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "address": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb", - "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" - ], - "data": "0x", - "logIndex": 18, - "blockHash": "0x8d6af7fa19913d7eb201f04a7307ee3844cdc4bda86b43ca3ab7e1522b577cab" - }, - { - "transactionIndex": 9, - "blockNumber": 6668198, - "transactionHash": "0x52c081e0009793b5db42f4b17258c27a2a11c40c46df6fad4d183de612d68b43", - "address": "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 19, - "blockHash": "0x8d6af7fa19913d7eb201f04a7307ee3844cdc4bda86b43ca3ab7e1522b577cab" - } - ], - "blockNumber": 6668198, - "cumulativeGasUsed": "2286050", - "status": 1, - "byzantium": true - }, - "args": [ - "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", - "0x083b0AE25fD41469Fd8857027B40e3f49A169375" - ], - "numDeployments": 1, - "solcInputHash": "d0e6e4f19028714f394c36db62dff2be", - "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyRequested\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeNotPublished\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"CyphernodeNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEnclave\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"CommitteePublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"CommitteeRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"CyphernodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"CyphernodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"enclave\",\"type\":\"address\"}],\"name\":\"EnclaveSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"addCyphernode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"committeePublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enclave\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"isCyphernodeEligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"cyphernode\",\"type\":\"address\"}],\"name\":\"isEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"publicKeys\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"publishCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"removeCyphernode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"requestCommittee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"requests\",\"outputs\":[{\"internalType\":\"contract IRegistryFilter\",\"name\":\"filter\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"name\":\"setEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"CommitteePublished(uint256,bytes)\":{\"params\":{\"e3Id\":\"ID of the E3 for which the committee was selected.\",\"publicKey\":\"Public key of the committee.\"}},\"CommitteeRequested(uint256,address,uint32[2])\":{\"params\":{\"e3Id\":\"ID of the E3 for which the committee was selected.\",\"filter\":\"Address of the contract that will coordinate committee selection.\",\"threshold\":\"The M/N threshold for the committee.\"}},\"EnclaveSet(address)\":{\"params\":{\"enclave\":\"Address of the enclave contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"committeePublicKey(uint256)\":{\"details\":\"This function MUST revert if no committee has been requested for the given E3.This function MUST revert if the committee has not yet published a public key.\",\"params\":{\"e3Id\":\"ID of the E3 for which to get the committee public key.\"},\"returns\":{\"publicKey\":\"The public key of the committee.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"requestCommittee(uint256,address,uint32[2])\":{\"details\":\"This function MUST revert when not called by the Enclave contract.\",\"params\":{\"e3Id\":\"ID of the E3 for which to select the committee.\",\"filter\":\"The address of the filter responsible for the committee selection process.\",\"threshold\":\"The M/N threshold for the committee.\"},\"returns\":{\"success\":\"True if committee selection was successfully initiated.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"CommitteePublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when a committee is selected for an E3.\"},\"CommitteeRequested(uint256,address,uint32[2])\":{\"notice\":\"This event MUST be emitted when a committee is selected for an E3.\"},\"CyphernodeAdded(address)\":{\"notice\":\"This event MUST be emitted when a cyphernode is added to the registry.\"},\"CyphernodeRemoved(address)\":{\"notice\":\"This event MUST be emitted when a cyphernode is removed from the registry.\"},\"EnclaveSet(address)\":{\"notice\":\"This event MUST be emitted when `enclave` is set.\"}},\"kind\":\"user\",\"methods\":{\"committeePublicKey(uint256)\":{\"notice\":\"This function should be called by the Enclave contract to get the public key of a committee.\"},\"requestCommittee(uint256,address,uint32[2])\":{\"notice\":\"Initiates the committee selection process for a specified E3.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/registry/CyphernodeRegistryOwnable.sol\":\"CyphernodeRegistryOwnable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"contracts/interfaces/ICyphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface ICyphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a cyphernode is added to the registry.\\n event CyphernodeAdded(address indexed node);\\n\\n /// @notice This event MUST be emitted when a cyphernode is removed from the registry.\\n event CyphernodeRemoved(address indexed node);\\n\\n function isCyphernodeEligible(address cyphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The public key generated by the selected committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKey The public key of the committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x60af5d66db32528f5032fe083218f180ab83f3199bcf090bed7249c28bc18104\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface IRegistryFilter {\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0xec67f88f2cbf46e28d4835669ef3dd2320afe5b0324423944037c16fc3f42195\",\"license\":\"LGPL-3.0-only\"},\"contracts/registry/CyphernodeRegistryOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { ICyphernodeRegistry } from \\\"../interfaces/ICyphernodeRegistry.sol\\\";\\nimport { IRegistryFilter } from \\\"../interfaces/IRegistryFilter.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\ncontract CyphernodeRegistryOwnable is ICyphernodeRegistry, OwnableUpgradeable {\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n address public enclave;\\n\\n mapping(address cyphernode => bool isEnabled) public isEnabled;\\n\\n mapping(uint256 e3Id => IRegistryFilter filter) public requests;\\n mapping(uint256 e3Id => bytes publicKey) public publicKeys;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeAlreadyRequested();\\n error CommitteeAlreadyPublished();\\n error CommitteeDoesNotExist();\\n error CommitteeNotPublished();\\n error CyphernodeNotEnabled(address node);\\n error OnlyEnclave();\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Modifiers //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n modifier onlyEnclave() {\\n require(msg.sender == enclave, OnlyEnclave());\\n _;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n constructor(address _owner, address _enclave) {\\n initialize(_owner, _enclave);\\n }\\n\\n function initialize(address _owner, address _enclave) public initializer {\\n __Ownable_init(msg.sender);\\n setEnclave(_enclave);\\n transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external onlyEnclave returns (bool success) {\\n require(\\n requests[e3Id] == IRegistryFilter(address(0)),\\n CommitteeAlreadyRequested()\\n );\\n requests[e3Id] = IRegistryFilter(filter);\\n\\n IRegistryFilter(filter).requestCommittee(e3Id, threshold);\\n emit CommitteeRequested(e3Id, filter, threshold);\\n success = true;\\n }\\n\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata,\\n bytes calldata publicKey\\n ) external {\\n // only to be published by the filter\\n require(address(requests[e3Id]) == msg.sender, CommitteeDoesNotExist());\\n\\n // for (uint256 i = 0; i < cyphernodes.length; i++) {\\n // require(\\n // isEnabled[cyphernodes[i]] == true,\\n // CyphernodeNotEnabled(cyphernodes[i])\\n // );\\n // }\\n\\n publicKeys[e3Id] = publicKey;\\n emit CommitteePublished(e3Id, publicKey);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setEnclave(address _enclave) public onlyOwner {\\n enclave = _enclave;\\n emit EnclaveSet(_enclave);\\n }\\n\\n function addCyphernode(address node) external onlyOwner {\\n isEnabled[node] = true;\\n emit CyphernodeAdded(node);\\n }\\n\\n function removeCyphernode(address node) external onlyOwner {\\n isEnabled[node] = false;\\n emit CyphernodeRemoved(node);\\n }\\n\\n function isCyphernodeEligible(address node) external view returns (bool) {\\n return isEnabled[node];\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes memory publicKey) {\\n publicKey = publicKeys[e3Id];\\n require(publicKey.length > 0, CommitteeNotPublished());\\n }\\n}\\n\",\"keccak256\":\"0x4cfad952b8b65dba77a5adf39dba5d1f7ff8d0a3661793bf155fea39f9d3f8e6\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", - "bytecode": "0x6080346101f957601f61105238819003918201601f19168301916001600160401b038311848410176101fe5780849260409485528339810103126101f957610052602061004b83610214565b9201610214565b60008051602061103283398151915254604081901c60ff16159290916001600160401b038316801590816101f1575b60011490816101e7575b1590816101de575b506101cd576001600160401b031983166001176000805160206110328339815191525561013292846101a2575b506100c96102b0565b6100d16102b0565b6100da33610228565b6100e26102de565b600080546001600160a01b0319166001600160a01b039290921691821781557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c99080a261012d6102de565b610228565b610146575b604051610d0b90816103278239f35b68ff0000000000000000196000805160206110328339815191525416600080516020611032833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1610137565b6001600160481b031916680100000000000000011760008051602061103283398151915255386100c0565b63f92ee8a960e01b60005260046000fd5b90501538610093565b303b15915061008b565b859150610081565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101f957565b6001600160a01b0316801561029a577f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff6000805160206110328339815191525460401c16156102cd57565b631afcd79f60e31b60005260046000fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316330361031157565b63118cdaa760e01b6000523360045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c9081632a8dc588146109b957508063476422f814610952578063485cc9551461074657806370e36bbe146106e3578063715018a61461064a578063770ad208146105e057806381d12c58146105ab5780638da5cb5b146105655780639015d371146105265780639ccb58d5146103cc578063c680f41014610394578063d9bbec9514610170578063dbb06c9314610149578063e82f3b70146100f45763f2fde38b146100c457600080fd5b346100ef5760203660031901126100ef576100ed6100e06109f4565b6100e8610c76565b610bd0565b005b600080fd5b346100ef5760203660031901126100ef57600435600052600360205261011d6040600020610a7c565b805115610138576101349060405191829182610b20565b0390f35b6322e679e360e11b60005260046000fd5b346100ef5760003660031901126100ef5760206001600160a01b0360005416604051908152f35b346100ef5760603660031901126100ef5760043560243567ffffffffffffffff81116100ef576101a4903690600401610b69565b505060443567ffffffffffffffff81116100ef576101c6903690600401610b69565b908260005260026020526001600160a01b0360406000205416330361038357826000526003602052604060002067ffffffffffffffff831161036d5761020c8154610a20565b601f8111610325575b506000601f841160011461029d5791604091847f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc019594600091610292575b508460011b906000198660031b1c19161790555b82825193849260208452816020850152848401376000828201840152601f01601f19168101030190a2005b905082013587610253565b8181526020812090601f198516815b81811061030d57509160409391867f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc01979694106102f3575b5050600184811b019055610267565b830135600019600387901b60f8161c1916905586806102e4565b919260206001819286890135815501940192016102ac565b816000526020600020601f850160051c81019160208610610363575b601f0160051c01905b8181106103575750610215565b6000815560010161034a565b9091508190610341565b634e487b7160e01b600052604160045260246000fd5b632a17a1f360e01b60005260046000fd5b346100ef5760203660031901126100ef5760043560005260036020526101346103c06040600020610a7c565b60405191829182610b20565b346100ef5760803660031901126100ef576004356103e8610a0a565b366084116100ef576001600160a01b03600054163303610515578160005260026020526001600160a01b0360406000205416610504576001600160a01b03168160005260026020526040600020816001600160a01b0319825416179055604051631590527b60e11b815282600482015261046460248201610b97565b6020816064816000865af180156104f8576104bd575b5060607fa17377d4a5c0ff5c67888a6b08d9bf3a8505b47e922b6186b259471ebf12738e916040519081526104b160208201610b97565ba2602060405160018152f35b6020813d6020116104f0575b816104d660209383610a5a565b810103126100ef575180151581036100ef5750606061047a565b3d91506104c9565b6040513d6000823e3d90fd5b6374ff462560e11b60005260046000fd5b63e4c2a7eb60e01b60005260046000fd5b346100ef5760203660031901126100ef576001600160a01b036105476109f4565b166000526001602052602060ff604060002054166040519015158152f35b346100ef5760003660031901126100ef5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346100ef5760203660031901126100ef57600435600052600260205260206001600160a01b0360406000205416604051908152f35b346100ef5760203660031901126100ef576001600160a01b036106016109f4565b610609610c76565b168060005260016020526040600020600160ff198254161790557f0fdc359cb937ddbe7734e324351ff282307ad333751a9e90f17e7330157ea579600080a2005b346100ef5760003660031901126100ef57610663610c76565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346100ef5760203660031901126100ef576001600160a01b036107046109f4565b61070c610c76565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a2005b346100ef5760403660031901126100ef5761075f6109f4565b610767610a0a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff81168015908161094a575b6001149081610940575b159081610937575b506109265767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610864926001600160a01b0391856108e7575b5061080b610cbe565b610813610cbe565b61081c33610bd0565b610824610c76565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a26100e8610c76565b61086a57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610802565b63f92ee8a960e01b60005260046000fd5b905015856107b9565b303b1591506107b1565b8591506107a7565b346100ef5760203660031901126100ef576001600160a01b036109736109f4565b61097b610c76565b16806000526001602052604060002060ff1981541690557f07f3f62f2502752da9299b12b0a9966cb97ace5e3ce476d04649d5f588ec4491600080a2005b346100ef5760203660031901126100ef576020906001600160a01b036109dd6109f4565b166000526001825260ff6040600020541615158152f35b600435906001600160a01b03821682036100ef57565b602435906001600160a01b03821682036100ef57565b90600182811c92168015610a50575b6020831014610a3a57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610a2f565b90601f8019910116810190811067ffffffffffffffff82111761036d57604052565b9060405191826000825492610a9084610a20565b8084529360018116908115610afe5750600114610ab7575b50610ab592500383610a5a565b565b90506000929192526020600020906000915b818310610ae2575050906020610ab59282010138610aa8565b6020919350806001915483858901015201910190918492610ac9565b905060209250610ab594915060ff191682840152151560051b82010138610aa8565b91909160208152825180602083015260005b818110610b53575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610b32565b9181601f840112156100ef5782359167ffffffffffffffff83116100ef57602083818601950101116100ef57565b60446000915b60028310610baa57505050565b81359063ffffffff82168092036100ef5760208160019382935201920192019190610b9d565b6001600160a01b03168015610c60576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610ca957565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610ced57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", - "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c9081632a8dc588146109b957508063476422f814610952578063485cc9551461074657806370e36bbe146106e3578063715018a61461064a578063770ad208146105e057806381d12c58146105ab5780638da5cb5b146105655780639015d371146105265780639ccb58d5146103cc578063c680f41014610394578063d9bbec9514610170578063dbb06c9314610149578063e82f3b70146100f45763f2fde38b146100c457600080fd5b346100ef5760203660031901126100ef576100ed6100e06109f4565b6100e8610c76565b610bd0565b005b600080fd5b346100ef5760203660031901126100ef57600435600052600360205261011d6040600020610a7c565b805115610138576101349060405191829182610b20565b0390f35b6322e679e360e11b60005260046000fd5b346100ef5760003660031901126100ef5760206001600160a01b0360005416604051908152f35b346100ef5760603660031901126100ef5760043560243567ffffffffffffffff81116100ef576101a4903690600401610b69565b505060443567ffffffffffffffff81116100ef576101c6903690600401610b69565b908260005260026020526001600160a01b0360406000205416330361038357826000526003602052604060002067ffffffffffffffff831161036d5761020c8154610a20565b601f8111610325575b506000601f841160011461029d5791604091847f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc019594600091610292575b508460011b906000198660031b1c19161790555b82825193849260208452816020850152848401376000828201840152601f01601f19168101030190a2005b905082013587610253565b8181526020812090601f198516815b81811061030d57509160409391867f8d0ca30515bbff1268ae5868080463444e5002373f7bc7d8d8869dca0a5ffc01979694106102f3575b5050600184811b019055610267565b830135600019600387901b60f8161c1916905586806102e4565b919260206001819286890135815501940192016102ac565b816000526020600020601f850160051c81019160208610610363575b601f0160051c01905b8181106103575750610215565b6000815560010161034a565b9091508190610341565b634e487b7160e01b600052604160045260246000fd5b632a17a1f360e01b60005260046000fd5b346100ef5760203660031901126100ef5760043560005260036020526101346103c06040600020610a7c565b60405191829182610b20565b346100ef5760803660031901126100ef576004356103e8610a0a565b366084116100ef576001600160a01b03600054163303610515578160005260026020526001600160a01b0360406000205416610504576001600160a01b03168160005260026020526040600020816001600160a01b0319825416179055604051631590527b60e11b815282600482015261046460248201610b97565b6020816064816000865af180156104f8576104bd575b5060607fa17377d4a5c0ff5c67888a6b08d9bf3a8505b47e922b6186b259471ebf12738e916040519081526104b160208201610b97565ba2602060405160018152f35b6020813d6020116104f0575b816104d660209383610a5a565b810103126100ef575180151581036100ef5750606061047a565b3d91506104c9565b6040513d6000823e3d90fd5b6374ff462560e11b60005260046000fd5b63e4c2a7eb60e01b60005260046000fd5b346100ef5760203660031901126100ef576001600160a01b036105476109f4565b166000526001602052602060ff604060002054166040519015158152f35b346100ef5760003660031901126100ef5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346100ef5760203660031901126100ef57600435600052600260205260206001600160a01b0360406000205416604051908152f35b346100ef5760203660031901126100ef576001600160a01b036106016109f4565b610609610c76565b168060005260016020526040600020600160ff198254161790557f0fdc359cb937ddbe7734e324351ff282307ad333751a9e90f17e7330157ea579600080a2005b346100ef5760003660031901126100ef57610663610c76565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346100ef5760203660031901126100ef576001600160a01b036107046109f4565b61070c610c76565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a2005b346100ef5760403660031901126100ef5761075f6109f4565b610767610a0a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff81168015908161094a575b6001149081610940575b159081610937575b506109265767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610864926001600160a01b0391856108e7575b5061080b610cbe565b610813610cbe565b61081c33610bd0565b610824610c76565b16806001600160a01b031960005416176000557f2c8267accd82e977550ed2349c73311183cd22e306347be4453c8d130995e3c9600080a26100e8610c76565b61086a57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610802565b63f92ee8a960e01b60005260046000fd5b905015856107b9565b303b1591506107b1565b8591506107a7565b346100ef5760203660031901126100ef576001600160a01b036109736109f4565b61097b610c76565b16806000526001602052604060002060ff1981541690557f07f3f62f2502752da9299b12b0a9966cb97ace5e3ce476d04649d5f588ec4491600080a2005b346100ef5760203660031901126100ef576020906001600160a01b036109dd6109f4565b166000526001825260ff6040600020541615158152f35b600435906001600160a01b03821682036100ef57565b602435906001600160a01b03821682036100ef57565b90600182811c92168015610a50575b6020831014610a3a57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610a2f565b90601f8019910116810190811067ffffffffffffffff82111761036d57604052565b9060405191826000825492610a9084610a20565b8084529360018116908115610afe5750600114610ab7575b50610ab592500383610a5a565b565b90506000929192526020600020906000915b818310610ae2575050906020610ab59282010138610aa8565b6020919350806001915483858901015201910190918492610ac9565b905060209250610ab594915060ff191682840152151560051b82010138610aa8565b91909160208152825180602083015260005b818110610b53575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610b32565b9181601f840112156100ef5782359167ffffffffffffffff83116100ef57602083818601950101116100ef57565b60446000915b60028310610baa57505050565b81359063ffffffff82168092036100ef5760208160019382935201920192019190610b9d565b6001600160a01b03168015610c60576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610ca957565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610ced57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000a", - "devdoc": { - "errors": { - "InvalidInitialization()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "OwnableInvalidOwner(address)": [ - { - "details": "The owner is not a valid owner account. (eg. `address(0)`)" - } - ], - "OwnableUnauthorizedAccount(address)": [ - { - "details": "The caller account is not authorized to perform an operation." - } - ] - }, - "events": { - "CommitteePublished(uint256,bytes)": { - "params": { - "e3Id": "ID of the E3 for which the committee was selected.", - "publicKey": "Public key of the committee." - } - }, - "CommitteeRequested(uint256,address,uint32[2])": { - "params": { - "e3Id": "ID of the E3 for which the committee was selected.", - "filter": "Address of the contract that will coordinate committee selection.", - "threshold": "The M/N threshold for the committee." - } - }, - "EnclaveSet(address)": { - "params": { - "enclave": "Address of the enclave contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - } - }, - "kind": "dev", - "methods": { - "committeePublicKey(uint256)": { - "details": "This function MUST revert if no committee has been requested for the given E3.This function MUST revert if the committee has not yet published a public key.", - "params": { - "e3Id": "ID of the E3 for which to get the committee public key." - }, - "returns": { - "publicKey": "The public key of the committee." - } - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "requestCommittee(uint256,address,uint32[2])": { - "details": "This function MUST revert when not called by the Enclave contract.", - "params": { - "e3Id": "ID of the E3 for which to select the committee.", - "filter": "The address of the filter responsible for the committee selection process.", - "threshold": "The M/N threshold for the committee." - }, - "returns": { - "success": "True if committee selection was successfully initiated." - } - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "CommitteePublished(uint256,bytes)": { - "notice": "This event MUST be emitted when a committee is selected for an E3." - }, - "CommitteeRequested(uint256,address,uint32[2])": { - "notice": "This event MUST be emitted when a committee is selected for an E3." - }, - "CyphernodeAdded(address)": { - "notice": "This event MUST be emitted when a cyphernode is added to the registry." - }, - "CyphernodeRemoved(address)": { - "notice": "This event MUST be emitted when a cyphernode is removed from the registry." - }, - "EnclaveSet(address)": { - "notice": "This event MUST be emitted when `enclave` is set." - } - }, - "kind": "user", - "methods": { - "committeePublicKey(uint256)": { - "notice": "This function should be called by the Enclave contract to get the public key of a committee." - }, - "requestCommittee(uint256,address,uint32[2])": { - "notice": "Initiates the committee selection process for a specified E3." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1860, - "contract": "contracts/registry/CyphernodeRegistryOwnable.sol:CyphernodeRegistryOwnable", - "label": "enclave", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 1864, - "contract": "contracts/registry/CyphernodeRegistryOwnable.sol:CyphernodeRegistryOwnable", - "label": "isEnabled", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 1869, - "contract": "contracts/registry/CyphernodeRegistryOwnable.sol:CyphernodeRegistryOwnable", - "label": "requests", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_contract(IRegistryFilter)1846)" - }, - { - "astId": 1873, - "contract": "contracts/registry/CyphernodeRegistryOwnable.sol:CyphernodeRegistryOwnable", - "label": "publicKeys", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_bytes_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IRegistryFilter)1846": { - "encoding": "inplace", - "label": "contract IRegistryFilter", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_bytes_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes)", - "numberOfBytes": "32", - "value": "t_bytes_storage" - }, - "t_mapping(t_uint256,t_contract(IRegistryFilter)1846)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => contract IRegistryFilter)", - "numberOfBytes": "32", - "value": "t_contract(IRegistryFilter)1846" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/packages/evm/deployments/sepolia/Enclave.json b/packages/evm/deployments/sepolia/Enclave.json index 389e0b3f..ef44643d 100644 --- a/packages/evm/deployments/sepolia/Enclave.json +++ b/packages/evm/deployments/sepolia/Enclave.json @@ -1,5 +1,5 @@ { - "address": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", + "address": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", "abi": [ { "inputs": [ @@ -9,8 +9,8 @@ "type": "address" }, { - "internalType": "contract ICyphernodeRegistry", - "name": "_cyphernodeRegistry", + "internalType": "contract ICiphernodeRegistry", + "name": "_ciphernodeRegistry", "type": "address" }, { @@ -49,17 +49,6 @@ "name": "CommitteeSelectionFailed", "type": "error" }, - { - "inputs": [ - { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" - } - ], - "name": "ComputationModuleNotAllowed", - "type": "error" - }, { "inputs": [ { @@ -103,6 +92,17 @@ "name": "E3NotReady", "type": "error" }, + { + "inputs": [ + { + "internalType": "contract IE3Program", + "name": "e3Program", + "type": "address" + } + ], + "name": "E3ProgramNotAllowed", + "type": "error" + }, { "inputs": [ { @@ -136,19 +136,25 @@ "type": "error" }, { - "inputs": [], - "name": "InvalidComputation", + "inputs": [ + { + "internalType": "contract ICiphernodeRegistry", + "name": "ciphernodeRegistry", + "type": "address" + } + ], + "name": "InvalidCiphernodeRegistry", "type": "error" }, { "inputs": [ { - "internalType": "contract ICyphernodeRegistry", - "name": "cyphernodeRegistry", + "internalType": "contract IInputValidator", + "name": "inputValidator", "type": "address" } ], - "name": "InvalidCyphernodeRegistry", + "name": "InvalidComputationRequest", "type": "error" }, { @@ -163,8 +169,14 @@ "type": "error" }, { - "inputs": [], - "name": "InvalidExecutionModuleSetup", + "inputs": [ + { + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" + } + ], + "name": "InvalidEncryptionScheme", "type": "error" }, { @@ -204,6 +216,21 @@ "name": "InvalidThreshold", "type": "error" }, + { + "inputs": [], + "name": "LeafAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "LeafCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "LeafGreaterThanSnarkScalarField", + "type": "error" + }, { "inputs": [ { @@ -275,6 +302,19 @@ "name": "PlaintextOutputAlreadyPublished", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "ciphernodeRegistry", + "type": "address" + } + ], + "name": "CiphernodeRegistrySet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -299,25 +339,24 @@ "inputs": [ { "indexed": false, - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" - } - ], - "name": "ComputationModuleDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + }, { "indexed": false, - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "committeePublicKey", + "type": "bytes" } ], - "name": "ComputationModuleEnabled", + "name": "E3Activated", "type": "event" }, { @@ -325,12 +364,12 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "cyphernodeRegistry", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" } ], - "name": "CyphernodeRegistrySet", + "name": "E3ProgramDisabled", "type": "event" }, { @@ -338,24 +377,12 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "e3Id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "committeePublicKey", - "type": "bytes" + "internalType": "contract IE3Program", + "name": "e3Program", + "type": "address" } ], - "name": "E3Activated", + "name": "E3ProgramEnabled", "type": "event" }, { @@ -369,6 +396,11 @@ }, { "components": [ + { + "internalType": "uint256", + "name": "seed", + "type": "uint256" + }, { "internalType": "uint32[2]", "name": "threshold", @@ -390,39 +422,39 @@ "type": "uint256" }, { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" }, { - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" }, + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, { "internalType": "contract IInputValidator", "name": "inputValidator", "type": "address" }, { - "internalType": "contract IOutputVerifier", - "name": "outputVerifier", + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "committeePublicKey", - "type": "bytes" + "type": "bytes32" }, { - "internalType": "bytes[]", - "name": "inputs", - "type": "bytes[]" - }, - { - "internalType": "bytes", + "internalType": "bytes32", "name": "ciphertextOutput", - "type": "bytes" + "type": "bytes32" }, { "internalType": "bytes", @@ -443,14 +475,8 @@ }, { "indexed": true, - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" - }, - { - "indexed": true, - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" } ], @@ -462,12 +488,12 @@ "inputs": [ { "indexed": false, - "internalType": "contract IExecutionModule", - "name": "executionModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" } ], - "name": "ExecutionModuleDisabled", + "name": "EncryptionSchemeDisabled", "type": "event" }, { @@ -475,12 +501,12 @@ "inputs": [ { "indexed": false, - "internalType": "contract IExecutionModule", - "name": "executionModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" } ], - "name": "ExecutionModuleEnabled", + "name": "EncryptionSchemeEnabled", "type": "event" }, { @@ -510,6 +536,18 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inputHash", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" } ], "name": "InputPublished", @@ -572,6 +610,11 @@ "internalType": "uint256", "name": "e3Id", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "publicKey", + "type": "bytes" } ], "name": "activate", @@ -586,31 +629,31 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" - } - ], - "name": "computationModules", + "inputs": [], + "name": "ciphernodeRegistry", "outputs": [ { - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "contract ICiphernodeRegistry", + "name": "", + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "cyphernodeRegistry", + "inputs": [ + { + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" + } + ], + "name": "decryptionVerifiers", "outputs": [ { - "internalType": "contract ICyphernodeRegistry", - "name": "", + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" } ], @@ -620,12 +663,12 @@ { "inputs": [ { - "internalType": "contract IComputationModule", - "name": "computationModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" } ], - "name": "disableComputationModule", + "name": "disableE3Program", "outputs": [ { "internalType": "bool", @@ -639,12 +682,12 @@ { "inputs": [ { - "internalType": "contract IExecutionModule", - "name": "executionModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" } ], - "name": "disableExecutionModule", + "name": "disableEncryptionScheme", "outputs": [ { "internalType": "bool", @@ -655,16 +698,40 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IE3Program", + "name": "e3Program", + "type": "address" + } + ], + "name": "e3Programs", + "outputs": [ + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "uint256", - "name": "id", + "name": "e3Id", "type": "uint256" } ], "name": "e3s", "outputs": [ + { + "internalType": "uint256", + "name": "seed", + "type": "uint256" + }, { "internalType": "uint256", "name": "duration", @@ -676,34 +743,39 @@ "type": "uint256" }, { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" }, { - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" }, + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, { "internalType": "contract IInputValidator", "name": "inputValidator", "type": "address" }, { - "internalType": "contract IOutputVerifier", - "name": "outputVerifier", + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "committeePublicKey", - "type": "bytes" + "type": "bytes32" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "ciphertextOutput", - "type": "bytes" + "type": "bytes32" }, { "internalType": "bytes", @@ -717,12 +789,12 @@ { "inputs": [ { - "internalType": "contract IComputationModule", - "name": "computationModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" } ], - "name": "enableComputationModule", + "name": "enableE3Program", "outputs": [ { "internalType": "bool", @@ -736,38 +808,19 @@ { "inputs": [ { - "internalType": "contract IExecutionModule", - "name": "executionModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" } ], - "name": "enableExecutionModule", + "name": "getDecryptionVerifier", "outputs": [ { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IDecryptionVerifier", + "name": "", "type": "address" } ], - "name": "executionModules", - "outputs": [ - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], "stateMutability": "view", "type": "function" }, @@ -783,6 +836,11 @@ "outputs": [ { "components": [ + { + "internalType": "uint256", + "name": "seed", + "type": "uint256" + }, { "internalType": "uint32[2]", "name": "threshold", @@ -804,39 +862,39 @@ "type": "uint256" }, { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" }, { - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" }, + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, { "internalType": "contract IInputValidator", "name": "inputValidator", "type": "address" }, { - "internalType": "contract IOutputVerifier", - "name": "outputVerifier", + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "committeePublicKey", - "type": "bytes" - }, - { - "internalType": "bytes[]", - "name": "inputs", - "type": "bytes[]" + "type": "bytes32" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "ciphertextOutput", - "type": "bytes" + "type": "bytes32" }, { "internalType": "bytes", @@ -852,6 +910,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "getInputRoot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -860,8 +937,8 @@ "type": "address" }, { - "internalType": "contract ICyphernodeRegistry", - "name": "_cyphernodeRegistry", + "internalType": "contract ICiphernodeRegistry", + "name": "_ciphernodeRegistry", "type": "address" }, { @@ -875,6 +952,49 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "inputCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "inputCount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "inputs", + "outputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depth", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxDuration", @@ -923,7 +1043,12 @@ }, { "internalType": "bytes", - "name": "data", + "name": "ciphertextOutput", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "proof", "type": "bytes" } ], @@ -971,7 +1096,12 @@ }, { "internalType": "bytes", - "name": "data", + "name": "plaintextOutput", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "proof", "type": "bytes" } ], @@ -1016,23 +1146,18 @@ "type": "uint256" }, { - "internalType": "contract IComputationModule", - "name": "computationModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" }, { "internalType": "bytes", - "name": "computationParams", + "name": "e3ProgramParams", "type": "bytes" }, - { - "internalType": "contract IExecutionModule", - "name": "executionModule", - "type": "address" - }, { "internalType": "bytes", - "name": "emParams", + "name": "computeProviderParams", "type": "bytes" } ], @@ -1045,6 +1170,11 @@ }, { "components": [ + { + "internalType": "uint256", + "name": "seed", + "type": "uint256" + }, { "internalType": "uint32[2]", "name": "threshold", @@ -1066,39 +1196,39 @@ "type": "uint256" }, { - "internalType": "contract IComputationModule", - "name": "computationModule", - "type": "address" + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" }, { - "internalType": "contract IExecutionModule", - "name": "executionModule", + "internalType": "contract IE3Program", + "name": "e3Program", "type": "address" }, + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, { "internalType": "contract IInputValidator", "name": "inputValidator", "type": "address" }, { - "internalType": "contract IOutputVerifier", - "name": "outputVerifier", + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "committeePublicKey", - "type": "bytes" - }, - { - "internalType": "bytes[]", - "name": "inputs", - "type": "bytes[]" + "type": "bytes32" }, { - "internalType": "bytes", + "internalType": "bytes32", "name": "ciphertextOutput", - "type": "bytes" + "type": "bytes32" }, { "internalType": "bytes", @@ -1130,12 +1260,36 @@ { "inputs": [ { - "internalType": "contract ICyphernodeRegistry", - "name": "_cyphernodeRegistry", + "internalType": "contract ICiphernodeRegistry", + "name": "_ciphernodeRegistry", + "type": "address" + } + ], + "name": "setCiphernodeRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" + }, + { + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", "type": "address" } ], - "name": "setCyphernodeRegistry", + "name": "setDecryptionVerifier", "outputs": [ { "internalType": "bool", @@ -1179,70 +1333,70 @@ "type": "function" } ], - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", "receipt": { "to": null, "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", - "contractAddress": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", - "transactionIndex": 286, - "gasUsed": "2071049", - "logsBloom": "0x00000000000000000000000000000100000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000000200000000800000000400000000008000000000800000000000000000000000880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002004000000000000000020000000000000000000020000000001200000000800000000000000000000000000", - "blockHash": "0x516557b80e512cc5ad78bd83f7668e4d4f1dc08eb95582806d98fb0569c0517b", - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", + "contractAddress": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", + "transactionIndex": 14, + "gasUsed": "2182315", + "logsBloom": "0x00000000000000000000000000000100000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000000800000000000000400420000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000004800000000000000020000000000000000000020000000001000000000800000000000000000000000000", + "blockHash": "0x131e7dbe0721fa8cf75daeb223e1fb0245b40f225db17c43c96552ffb385276c", + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", "logs": [ { - "transactionIndex": 286, - "blockNumber": 6662691, - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", - "address": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", + "transactionIndex": 14, + "blockNumber": 6795922, + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", + "address": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" ], "data": "0x", - "logIndex": 369, - "blockHash": "0x516557b80e512cc5ad78bd83f7668e4d4f1dc08eb95582806d98fb0569c0517b" + "logIndex": 13, + "blockHash": "0x131e7dbe0721fa8cf75daeb223e1fb0245b40f225db17c43c96552ffb385276c" }, { - "transactionIndex": 286, - "blockNumber": 6662691, - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", - "address": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", + "transactionIndex": 14, + "blockNumber": 6795922, + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", + "address": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", "topics": [ "0xba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b523552" ], "data": "0x0000000000000000000000000000000000000000000000000000000000278d00", - "logIndex": 370, - "blockHash": "0x516557b80e512cc5ad78bd83f7668e4d4f1dc08eb95582806d98fb0569c0517b" + "logIndex": 14, + "blockHash": "0x131e7dbe0721fa8cf75daeb223e1fb0245b40f225db17c43c96552ffb385276c" }, { - "transactionIndex": 286, - "blockNumber": 6662691, - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", - "address": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", + "transactionIndex": 14, + "blockNumber": 6795922, + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", + "address": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", "topics": [ - "0x016ea868599173c3163f65dea5e4677b2be5f0ececb4ec15d1166a27de35a533" + "0x80052b810d39120cf6c976cca504a21703f585521dc7a41c6d241090e6c579b6" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 371, - "blockHash": "0x516557b80e512cc5ad78bd83f7668e4d4f1dc08eb95582806d98fb0569c0517b" + "logIndex": 15, + "blockHash": "0x131e7dbe0721fa8cf75daeb223e1fb0245b40f225db17c43c96552ffb385276c" }, { - "transactionIndex": 286, - "blockNumber": 6662691, - "transactionHash": "0x2e2dae8a05e34e82484cfaec005240ec707a4c0c6b6a4f6bcf8fb0f45c0c5b6f", - "address": "0x083b0AE25fD41469Fd8857027B40e3f49A169375", + "transactionIndex": 14, + "blockNumber": 6795922, + "transactionHash": "0x9854f977c9012f5a63e8f5abc8791f0bfb994f058fd94208067711e6c2ef58c4", + "address": "0x34f3f0793aA95C62aA02fAc859d6BCb7711Ddb3A", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 372, - "blockHash": "0x516557b80e512cc5ad78bd83f7668e4d4f1dc08eb95582806d98fb0569c0517b" + "logIndex": 16, + "blockHash": "0x131e7dbe0721fa8cf75daeb223e1fb0245b40f225db17c43c96552ffb385276c" } ], - "blockNumber": 6662691, - "cumulativeGasUsed": "25038564", + "blockNumber": 6795922, + "cumulativeGasUsed": "8718680", "status": 1, "byzantium": true }, @@ -1252,10 +1406,13 @@ 2592000 ], "numDeployments": 1, - "solcInputHash": "d0e6e4f19028714f394c36db62dff2be", - "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract ICyphernodeRegistry\",\"name\":\"_cyphernodeRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"CiphertextOutputAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"CiphertextOutputNotPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeSelectionFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"ComputationModuleNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3AlreadyActivated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3DoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"E3Expired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3NotActivated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"E3NotReady\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"InputDeadlineNotPassed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"InputDeadlinePassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidComputation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract ICyphernodeRegistry\",\"name\":\"cyphernodeRegistry\",\"type\":\"address\"}],\"name\":\"InvalidCyphernodeRegistry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"InvalidDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExecutionModuleSetup\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"output\",\"type\":\"bytes\"}],\"name\":\"InvalidOutput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStartWindow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"InvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ModuleAlreadyEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ModuleNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentRequired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"PlaintextOutputAlreadyPublished\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"}],\"name\":\"CiphertextOutputPublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"ComputationModuleDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"ComputationModuleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"cyphernodeRegistry\",\"type\":\"address\"}],\"name\":\"CyphernodeRegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"}],\"name\":\"E3Activated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IOutputVerifier\",\"name\":\"outputVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"E3Requested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"ExecutionModuleDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"ExecutionModuleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"InputPublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxDuration\",\"type\":\"uint256\"}],\"name\":\"MaxDurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"name\":\"PlaintextOutputPublished\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"activate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"computationModules\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cyphernodeRegistry\",\"outputs\":[{\"internalType\":\"contract ICyphernodeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"disableComputationModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"disableExecutionModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"e3s\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IOutputVerifier\",\"name\":\"outputVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"}],\"name\":\"enableComputationModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"enableExecutionModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"}],\"name\":\"executionModules\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"getE3\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IOutputVerifier\",\"name\":\"outputVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract ICyphernodeRegistry\",\"name\":\"_cyphernodeRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nexte3Id\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"publishCiphertextOutput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"publishInput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"publishPlaintextOutput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"computationParams\",\"type\":\"bytes\"},{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"emParams\",\"type\":\"bytes\"}],\"name\":\"request\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"contract IComputationModule\",\"name\":\"computationModule\",\"type\":\"address\"},{\"internalType\":\"contract IExecutionModule\",\"name\":\"executionModule\",\"type\":\"address\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IOutputVerifier\",\"name\":\"outputVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ICyphernodeRegistry\",\"name\":\"_cyphernodeRegistry\",\"type\":\"address\"}],\"name\":\"setCyphernodeRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"name\":\"setMaxDuration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"CiphertextOutputPublished(uint256,bytes)\":{\"params\":{\"ciphertextOutput\":\"ABI encoded ciphertext output.\",\"e3Id\":\"ID of the E3.\"}},\"ComputationModuleDisabled(address)\":{\"params\":{\"computationModule\":\"The address of the computation module.\"}},\"ComputationModuleEnabled(address)\":{\"params\":{\"computationModule\":\"The address of the computation module.\"}},\"CyphernodeRegistrySet(address)\":{\"params\":{\"cyphernodeRegistry\":\"The address of the CyphernodeRegistry contract.\"}},\"E3Activated(uint256,uint256,bytes)\":{\"params\":{\"committeePublicKey\":\"Public key of the committee.\",\"e3Id\":\"ID of the E3.\",\"expiration\":\"Timestamp when committee duties expire.\"}},\"E3Requested(uint256,(uint32[2],uint256[2],uint256,uint256,address,address,address,address,bytes,bytes[],bytes,bytes),address,address,address)\":{\"params\":{\"computationModule\":\"Address of the Computation module selected.\",\"e3\":\"Details of the E3.\",\"e3Id\":\"ID of the E3.\",\"executionModule\":\"Address of the execution module selected.\",\"filter\":\"Address of the pool of nodes from which the Cypher Node committee was selected.\"}},\"ExecutionModuleDisabled(address)\":{\"params\":{\"executionModule\":\"The address of the execution module.\"}},\"ExecutionModuleEnabled(address)\":{\"params\":{\"executionModule\":\"The address of the execution module.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InputPublished(uint256,bytes)\":{\"params\":{\"data\":\"ABI encoded input data.\",\"e3Id\":\"ID of the E3.\"}},\"MaxDurationSet(uint256)\":{\"params\":{\"maxDuration\":\"The maximum duration of a computation in seconds.\"}},\"PlaintextOutputPublished(uint256,bytes)\":{\"params\":{\"e3Id\":\"ID of the E3.\",\"plaintextOutput\":\"ABI encoded plaintext output.\"}}},\"kind\":\"dev\",\"methods\":{\"activate(uint256)\":{\"details\":\"This function MUST emit the E3Activated event.This function MUST revert if the given E3 has not yet been requested.This function MUST revert if the selected node committee has not yet published a public key.\",\"params\":{\"e3Id\":\"ID of the E3.\"}},\"constructor\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds\",\"_owner\":\"The owner of this contract\"}},\"getE3(uint256)\":{\"details\":\"This function MUST revert if the E3 does not exist.\",\"params\":{\"e3Id\":\"ID of the E3.\"},\"returns\":{\"e3\":\"The struct representing the requested E3.\"}},\"initialize(address,address,uint256)\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds\",\"_owner\":\"The owner of this contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"publishCiphertextOutput(uint256,bytes)\":{\"details\":\"This function MUST emit the CiphertextOutputPublished event.\",\"params\":{\"data\":\"ABI encoded output data to verify.\",\"e3Id\":\"ID of the E3.\"},\"returns\":{\"success\":\"True if the output was successfully published.\"}},\"publishInput(uint256,bytes)\":{\"details\":\"This function MUST revert if the E3 is not yet activated.This function MUST emit the InputPublished event.\",\"params\":{\"data\":\"ABI encoded input data to publish.\",\"e3Id\":\"ID of the E3.\"},\"returns\":{\"success\":\"True if the input was successfully published.\"}},\"publishPlaintextOutput(uint256,bytes)\":{\"details\":\"This function MUST revert if the output has not been published.This function MUST emit the PlaintextOutputPublished event.\",\"params\":{\"data\":\"ABI encoded output data to decrypt.\",\"e3Id\":\"ID of the E3.\"},\"returns\":{\"success\":\"True if the output was successfully decrypted.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"request(address,uint32[2],uint256[2],uint256,address,bytes,address,bytes)\":{\"details\":\"This function MUST emit the E3Requested event.\",\"params\":{\"computationModule\":\"Address of the computation module.\",\"computationParams\":\"ABI encoded computation parameters.\",\"duration\":\"The duration of the computation in seconds.\",\"emParams\":\"ABI encoded execution module parameters.\",\"executionModule\":\"Address of the execution module.\",\"filter\":\"IDs of the pool of nodes from which to select the committee.\",\"threshold\":\"The M/N threshold for the committee.\"},\"returns\":{\"e3\":\"The E3 struct.\",\"e3Id\":\"ID of the E3.\"}},\"setMaxDuration(uint256)\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds.\"},\"returns\":{\"success\":\"True if the max duration was successfully set.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"CiphertextOutputPublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3) is successfully published.\"},\"ComputationModuleDisabled(address)\":{\"notice\":\"This event MUST be emitted any time a computation module is disabled.\"},\"ComputationModuleEnabled(address)\":{\"notice\":\"This event MUST be emitted any time a computation module is enabled.\"},\"CyphernodeRegistrySet(address)\":{\"notice\":\"This event MUST be emitted any time the CyphernodeRegistry is set.\"},\"E3Activated(uint256,uint256,bytes)\":{\"notice\":\"This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\"},\"E3Requested(uint256,(uint32[2],uint256[2],uint256,uint256,address,address,address,address,bytes,bytes[],bytes,bytes),address,address,address)\":{\"notice\":\"This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\"},\"ExecutionModuleDisabled(address)\":{\"notice\":\"This event MUST be emitted any time an execution module is disabled.\"},\"ExecutionModuleEnabled(address)\":{\"notice\":\"This event MUST be emitted any time an execution module is enabled.\"},\"InputPublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is successfully published.\"},\"MaxDurationSet(uint256)\":{\"notice\":\"This event MUST be emitted any time the `maxDuration` is set.\"},\"PlaintextOutputPublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3) is successfully published.\"}},\"kind\":\"user\",\"methods\":{\"activate(uint256)\":{\"notice\":\"This function should be called to activate an Encrypted Execution Environment (E3) once it has been initialized and is ready for input.\"},\"getE3(uint256)\":{\"notice\":\"This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\"},\"publishCiphertextOutput(uint256,bytes)\":{\"notice\":\"This function should be called to publish output data for an Encrypted Execution Environment (E3).\"},\"publishInput(uint256,bytes)\":{\"notice\":\"This function should be called to publish input data for Encrypted Execution Environment (E3).\"},\"publishPlaintextOutput(uint256,bytes)\":{\"notice\":\"This function publishes the plaintext output of an Encrypted Execution Environment (E3).\"},\"request(address,uint32[2],uint256[2],uint256,address,bytes,address,bytes)\":{\"notice\":\"This function should be called to request a computation within an Encrypted Execution Environment (E3).\"},\"setMaxDuration(uint256)\":{\"notice\":\"This function should be called to set the maximum duration of requested computations.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Enclave.sol\":\"Enclave\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"contracts/Enclave.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport {\\n IEnclave,\\n E3,\\n IComputationModule,\\n IExecutionModule\\n} from \\\"./interfaces/IEnclave.sol\\\";\\nimport { ICyphernodeRegistry } from \\\"./interfaces/ICyphernodeRegistry.sol\\\";\\nimport { IInputValidator } from \\\"./interfaces/IInputValidator.sol\\\";\\nimport { IOutputVerifier } from \\\"./interfaces/IOutputVerifier.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\ncontract Enclave is IEnclave, OwnableUpgradeable {\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n ICyphernodeRegistry public cyphernodeRegistry; // address of the Cyphernode registry.\\n uint256 public maxDuration; // maximum duration of a computation in seconds.\\n uint256 public nexte3Id; // ID of the next E3.\\n uint256 public requests; // total number of requests made to Enclave.\\n\\n // TODO: should computation and execution modules be explicitly allowed?\\n // My intuition is that an allowlist is required since they impose slashing conditions.\\n // But perhaps this is one place where node pools might be utilized, allowing nodes to\\n // opt in to being selected for specific computations, along with the corresponding slashing conditions.\\n // This would reduce the governance overhead for Enclave.\\n\\n // Mapping of allowed computation modules.\\n mapping(IComputationModule computationModule => bool allowed)\\n public computationModules;\\n\\n // Mapping of allowed execution modules.\\n mapping(IExecutionModule executionModule => bool allowed)\\n public executionModules;\\n\\n // Mapping of E3s.\\n mapping(uint256 id => E3 e3) public e3s;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeSelectionFailed();\\n error ComputationModuleNotAllowed(IComputationModule computationModule);\\n error E3AlreadyActivated(uint256 e3Id);\\n error E3Expired();\\n error E3NotActivated(uint256 e3Id);\\n error E3NotReady();\\n error E3DoesNotExist(uint256 e3Id);\\n error ModuleAlreadyEnabled(address module);\\n error ModuleNotEnabled(address module);\\n error InputDeadlinePassed(uint256 e3Id, uint256 expiration);\\n error InputDeadlineNotPassed(uint256 e3Id, uint256 expiration);\\n error InvalidComputation();\\n error InvalidExecutionModuleSetup();\\n error InvalidCyphernodeRegistry(ICyphernodeRegistry cyphernodeRegistry);\\n error InvalidInput();\\n error InvalidDuration(uint256 duration);\\n error InvalidOutput(bytes output);\\n error InvalidStartWindow();\\n error InvalidThreshold(uint32[2] threshold);\\n error CiphertextOutputAlreadyPublished(uint256 e3Id);\\n error CiphertextOutputNotPublished(uint256 e3Id);\\n error PaymentRequired(uint256 value);\\n error PlaintextOutputAlreadyPublished(uint256 e3Id);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @param _owner The owner of this contract\\n /// @param _maxDuration The maximum duration of a computation in seconds\\n constructor(\\n address _owner,\\n ICyphernodeRegistry _cyphernodeRegistry,\\n uint256 _maxDuration\\n ) {\\n initialize(_owner, _cyphernodeRegistry, _maxDuration);\\n }\\n\\n /// @param _owner The owner of this contract\\n /// @param _maxDuration The maximum duration of a computation in seconds\\n function initialize(\\n address _owner,\\n ICyphernodeRegistry _cyphernodeRegistry,\\n uint256 _maxDuration\\n ) public initializer {\\n __Ownable_init(msg.sender);\\n setMaxDuration(_maxDuration);\\n setCyphernodeRegistry(_cyphernodeRegistry);\\n if (_owner != owner()) transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function request(\\n address filter,\\n uint32[2] calldata threshold,\\n uint256[2] calldata startWindow,\\n uint256 duration,\\n IComputationModule computationModule,\\n bytes memory computationParams,\\n IExecutionModule executionModule,\\n bytes memory emParams\\n ) external payable returns (uint256 e3Id, E3 memory e3) {\\n // TODO: allow for other payment methods or only native tokens?\\n // TODO: should payment checks be somewhere else? Perhaps in the computation module or cyphernode registry?\\n require(msg.value > 0, PaymentRequired(msg.value));\\n require(\\n threshold[1] >= threshold[0] && threshold[0] > 0,\\n InvalidThreshold(threshold)\\n );\\n require(\\n // TODO: do we need a minimum start window to allow time for committee selection?\\n startWindow[1] >= startWindow[0] &&\\n startWindow[1] >= block.timestamp,\\n InvalidStartWindow()\\n );\\n require(\\n duration > 0 && duration <= maxDuration,\\n InvalidDuration(duration)\\n );\\n require(\\n computationModules[computationModule],\\n ComputationModuleNotAllowed(computationModule)\\n );\\n require(\\n executionModules[executionModule],\\n ModuleNotEnabled(address(executionModule))\\n );\\n\\n // TODO: should IDs be incremental or produced deterministically?\\n e3Id = nexte3Id;\\n nexte3Id++;\\n\\n IInputValidator inputValidator = computationModule.validate(\\n computationParams\\n );\\n require(address(inputValidator) != address(0), InvalidComputation());\\n\\n // TODO: validate that the requested computation can be performed by the given execution module.\\n IOutputVerifier outputVerifier = executionModule.validate(emParams);\\n require(\\n address(outputVerifier) != address(0),\\n InvalidExecutionModuleSetup()\\n );\\n\\n e3 = E3({\\n threshold: threshold,\\n startWindow: startWindow,\\n duration: duration,\\n expiration: 0,\\n computationModule: computationModule,\\n executionModule: executionModule,\\n inputValidator: inputValidator,\\n outputVerifier: outputVerifier,\\n committeePublicKey: hex\\\"\\\",\\n inputs: new bytes[](0),\\n ciphertextOutput: hex\\\"\\\",\\n plaintextOutput: hex\\\"\\\"\\n });\\n e3s[e3Id] = e3;\\n\\n require(\\n cyphernodeRegistry.requestCommittee(e3Id, filter, threshold),\\n CommitteeSelectionFailed()\\n );\\n\\n emit E3Requested(\\n e3Id,\\n e3s[e3Id],\\n filter,\\n computationModule,\\n executionModule\\n );\\n }\\n\\n function activate(uint256 e3Id) external returns (bool success) {\\n // Note: we could load this into a storage pointer, and do the sets there\\n // Requires a mew internal _getter that returns storage\\n E3 memory e3 = getE3(e3Id);\\n require(e3.expiration == 0, E3AlreadyActivated(e3Id));\\n require(e3.startWindow[0] <= block.timestamp, E3NotReady());\\n // TODO: handle what happens to the payment if the start window has passed.\\n require(e3.startWindow[1] >= block.timestamp, E3Expired());\\n\\n bytes memory publicKey = cyphernodeRegistry.committeePublicKey(e3Id);\\n // Note: This check feels weird\\n require(publicKey.length > 0, CommitteeSelectionFailed());\\n\\n e3s[e3Id].expiration = block.timestamp + e3.duration;\\n e3s[e3Id].committeePublicKey = publicKey;\\n\\n emit E3Activated(e3Id, e3.expiration, e3.committeePublicKey);\\n\\n return true;\\n }\\n\\n function publishInput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n // TODO: should we have an input window, including both a start and end timestamp?\\n require(\\n e3.expiration > block.timestamp,\\n InputDeadlinePassed(e3Id, e3.expiration)\\n );\\n bytes memory input;\\n (input, success) = e3.inputValidator.validate(msg.sender, data);\\n require(success, InvalidInput());\\n // TODO: probably better to accumulate inputs, rather than just dumping them in storage.\\n e3s[e3Id].inputs.push(input);\\n emit InputPublished(e3Id, input);\\n }\\n\\n function publishCiphertextOutput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n require(\\n e3.expiration <= block.timestamp,\\n InputDeadlineNotPassed(e3Id, e3.expiration)\\n );\\n // TODO: should the output verifier be able to change its mind?\\n //i.e. should we be able to call this multiple times?\\n require(\\n e3.ciphertextOutput.length == 0,\\n CiphertextOutputAlreadyPublished(e3Id)\\n );\\n bytes memory output;\\n (output, success) = e3.outputVerifier.verify(e3Id, data);\\n require(success, InvalidOutput(output));\\n e3s[e3Id].ciphertextOutput = output;\\n\\n emit CiphertextOutputPublished(e3Id, output);\\n }\\n\\n function publishPlaintextOutput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n require(\\n e3.ciphertextOutput.length > 0,\\n CiphertextOutputNotPublished(e3Id)\\n );\\n require(\\n e3.plaintextOutput.length == 0,\\n PlaintextOutputAlreadyPublished(e3Id)\\n );\\n bytes memory output;\\n (output, success) = e3.computationModule.verify(e3Id, data);\\n require(success, InvalidOutput(output));\\n e3s[e3Id].plaintextOutput = output;\\n\\n emit PlaintextOutputPublished(e3Id, output);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setMaxDuration(\\n uint256 _maxDuration\\n ) public onlyOwner returns (bool success) {\\n maxDuration = _maxDuration;\\n success = true;\\n emit MaxDurationSet(_maxDuration);\\n }\\n\\n function setCyphernodeRegistry(\\n ICyphernodeRegistry _cyphernodeRegistry\\n ) public onlyOwner returns (bool success) {\\n require(\\n address(_cyphernodeRegistry) != address(0) &&\\n _cyphernodeRegistry != cyphernodeRegistry,\\n InvalidCyphernodeRegistry(_cyphernodeRegistry)\\n );\\n cyphernodeRegistry = _cyphernodeRegistry;\\n success = true;\\n emit CyphernodeRegistrySet(address(_cyphernodeRegistry));\\n }\\n\\n function enableComputationModule(\\n IComputationModule computationModule\\n ) public onlyOwner returns (bool success) {\\n require(\\n !computationModules[computationModule],\\n ModuleAlreadyEnabled(address(computationModule))\\n );\\n computationModules[computationModule] = true;\\n success = true;\\n emit ComputationModuleEnabled(computationModule);\\n }\\n\\n function enableExecutionModule(\\n IExecutionModule executionModule\\n ) public onlyOwner returns (bool success) {\\n require(\\n !executionModules[executionModule],\\n ModuleAlreadyEnabled(address(executionModule))\\n );\\n executionModules[executionModule] = true;\\n success = true;\\n emit ExecutionModuleEnabled(executionModule);\\n }\\n\\n function disableComputationModule(\\n IComputationModule computationModule\\n ) public onlyOwner returns (bool success) {\\n require(\\n computationModules[computationModule],\\n ModuleNotEnabled(address(computationModule))\\n );\\n delete computationModules[computationModule];\\n success = true;\\n emit ComputationModuleDisabled(computationModule);\\n }\\n\\n function disableExecutionModule(\\n IExecutionModule executionModule\\n ) public onlyOwner returns (bool success) {\\n require(\\n executionModules[executionModule],\\n ModuleNotEnabled(address(executionModule))\\n );\\n delete executionModules[executionModule];\\n success = true;\\n emit ExecutionModuleDisabled(executionModule);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function getE3(uint256 e3Id) public view returns (E3 memory e3) {\\n e3 = e3s[e3Id];\\n require(\\n e3.computationModule != IComputationModule(address(0)),\\n E3DoesNotExist(e3Id)\\n );\\n }\\n}\\n\",\"keccak256\":\"0xc37015e312c621b75b924d32d19b43682ffb94ef3319326b75ca1a4e36454700\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IComputationModule.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { IInputValidator } from \\\"./IInputValidator.sol\\\";\\n\\ninterface IComputationModule {\\n /// @notice This function should be called by the Enclave contract to validate the computation parameters.\\n /// @param params ABI encoded computation parameters.\\n /// @return inputValidator The input validator to be used for the computation.\\n function validate(\\n bytes calldata params\\n ) external returns (IInputValidator inputValidator);\\n\\n /// @notice This function should be called by the Enclave contract to verify the decrypted output of an E3.\\n /// @param e3Id ID of the E3.\\n /// @param outputData ABI encoded output data to be verified.\\n /// @return output The output data to be published.\\n /// @return success Whether the output data is valid.\\n function verify(\\n uint256 e3Id,\\n bytes memory outputData\\n ) external returns (bytes memory output, bool success);\\n}\\n\",\"keccak256\":\"0x9e65874df81985a203a0f3bea12996cb66f9e57663beed3e93f849414a5c4d0d\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/ICyphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface ICyphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a cyphernode is added to the registry.\\n event CyphernodeAdded(address indexed node);\\n\\n /// @notice This event MUST be emitted when a cyphernode is removed from the registry.\\n event CyphernodeRemoved(address indexed node);\\n\\n function isCyphernodeEligible(address cyphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The public key generated by the selected committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKey The public key of the committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x60af5d66db32528f5032fe083218f180ab83f3199bcf090bed7249c28bc18104\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IE3.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { IInputValidator } from \\\"./IInputValidator.sol\\\";\\nimport { IExecutionModule } from \\\"./IExecutionModule.sol\\\";\\nimport { IComputationModule } from \\\"./IComputationModule.sol\\\";\\nimport { IOutputVerifier } from \\\"./IOutputVerifier.sol\\\";\\n\\n/// @title E3 struct\\n/// @notice This struct represents an E3 computation.\\n/// @param threshold M/N threshold for the committee.\\n/// @param startWindow Start window for the computation: index zero is minimum, index 1 is the maxium.\\n/// @param duration Duration of the E3.\\n/// @param expiration Timestamp when committee duties expire.\\n/// @param computationModule Address of the computation module contract.\\n/// @param executionModule Address of the execution module contract.\\n/// @param inputValidator Address of the input validator contract.\\n/// @param outputVerifier Address of the output verifier contract.\\n/// @param committeeId ID of the selected committee.\\n/// @param ciphertextOutput Encrypted output data.\\n/// @param plaintextOutput Decrypted output data.\\nstruct E3 {\\n uint32[2] threshold;\\n uint256[2] startWindow;\\n uint256 duration;\\n uint256 expiration;\\n IComputationModule computationModule;\\n IExecutionModule executionModule;\\n IInputValidator inputValidator;\\n IOutputVerifier outputVerifier;\\n bytes committeePublicKey;\\n bytes[] inputs;\\n bytes ciphertextOutput;\\n bytes plaintextOutput;\\n}\\n\",\"keccak256\":\"0x6013398b086073328305a2f33edd3027ed82b3fb7e802627f88ac7781a2c1125\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IEnclave.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { E3, IComputationModule, IExecutionModule } from \\\"./IE3.sol\\\";\\n\\ninterface IEnclave {\\n ////////////////////////////////////////////////////////////\\n // //\\n // Events //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\\n /// @param e3Id ID of the E3.\\n /// @param e3 Details of the E3.\\n /// @param filter Address of the pool of nodes from which the Cypher Node committee was selected.\\n /// @param computationModule Address of the Computation module selected.\\n /// @param executionModule Address of the execution module selected.\\n event E3Requested(\\n uint256 e3Id,\\n E3 e3,\\n address filter,\\n IComputationModule indexed computationModule,\\n IExecutionModule indexed executionModule\\n );\\n\\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\\n /// @param e3Id ID of the E3.\\n /// @param expiration Timestamp when committee duties expire.\\n /// @param committeePublicKey Public key of the committee.\\n event E3Activated(\\n uint256 e3Id,\\n uint256 expiration,\\n bytes committeePublicKey\\n );\\n\\n /// @notice This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is\\n /// successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded input data.\\n event InputPublished(uint256 indexed e3Id, bytes data);\\n\\n /// @notice This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3)\\n /// is successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutput ABI encoded plaintext output.\\n event PlaintextOutputPublished(uint256 indexed e3Id, bytes plaintextOutput);\\n\\n /// @notice This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3)\\n /// is successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param ciphertextOutput ABI encoded ciphertext output.\\n event CiphertextOutputPublished(\\n uint256 indexed e3Id,\\n bytes ciphertextOutput\\n );\\n\\n /// @notice This event MUST be emitted any time the `maxDuration` is set.\\n /// @param maxDuration The maximum duration of a computation in seconds.\\n event MaxDurationSet(uint256 maxDuration);\\n\\n /// @notice This event MUST be emitted any time the CyphernodeRegistry is set.\\n /// @param cyphernodeRegistry The address of the CyphernodeRegistry contract.\\n event CyphernodeRegistrySet(address cyphernodeRegistry);\\n\\n /// @notice This event MUST be emitted any time a computation module is enabled.\\n /// @param computationModule The address of the computation module.\\n event ComputationModuleEnabled(IComputationModule computationModule);\\n\\n /// @notice This event MUST be emitted any time a computation module is disabled.\\n /// @param computationModule The address of the computation module.\\n event ComputationModuleDisabled(IComputationModule computationModule);\\n\\n /// @notice This event MUST be emitted any time an execution module is enabled.\\n /// @param executionModule The address of the execution module.\\n event ExecutionModuleEnabled(IExecutionModule executionModule);\\n\\n /// @notice This event MUST be emitted any time an execution module is disabled.\\n /// @param executionModule The address of the execution module.\\n event ExecutionModuleDisabled(IExecutionModule executionModule);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to request a computation within an Encrypted Execution Environment (E3).\\n /// @dev This function MUST emit the E3Requested event.\\n /// @param filter IDs of the pool of nodes from which to select the committee.\\n /// @param threshold The M/N threshold for the committee.\\n /// @param duration The duration of the computation in seconds.\\n /// @param computationModule Address of the computation module.\\n /// @param computationParams ABI encoded computation parameters.\\n /// @param executionModule Address of the execution module.\\n /// @param emParams ABI encoded execution module parameters.\\n /// @return e3Id ID of the E3.\\n /// @return e3 The E3 struct.\\n function request(\\n address filter,\\n uint32[2] calldata threshold,\\n uint256[2] calldata startWindow,\\n uint256 duration,\\n IComputationModule computationModule,\\n bytes memory computationParams,\\n IExecutionModule executionModule,\\n bytes memory emParams\\n ) external payable returns (uint256 e3Id, E3 memory e3);\\n\\n /// @notice This function should be called to activate an Encrypted Execution Environment (E3) once it has been\\n /// initialized and is ready for input.\\n /// @dev This function MUST emit the E3Activated event.\\n /// @dev This function MUST revert if the given E3 has not yet been requested.\\n /// @dev This function MUST revert if the selected node committee has not yet published a public key.\\n /// @param e3Id ID of the E3.\\n function activate(uint256 e3Id) external returns (bool success);\\n\\n /// @notice This function should be called to publish input data for Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the E3 is not yet activated.\\n /// @dev This function MUST emit the InputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded input data to publish.\\n /// @return success True if the input was successfully published.\\n function publishInput(\\n uint256 e3Id,\\n bytes calldata data\\n ) external returns (bool success);\\n\\n /// @notice This function should be called to publish output data for an Encrypted Execution Environment (E3).\\n /// @dev This function MUST emit the CiphertextOutputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded output data to verify.\\n /// @return success True if the output was successfully published.\\n function publishCiphertextOutput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success);\\n\\n /// @notice This function publishes the plaintext output of an Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the output has not been published.\\n /// @dev This function MUST emit the PlaintextOutputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded output data to decrypt.\\n /// @return success True if the output was successfully decrypted.\\n function publishPlaintextOutput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to set the maximum duration of requested computations.\\n /// @param _maxDuration The maximum duration of a computation in seconds.\\n /// @return success True if the max duration was successfully set.\\n function setMaxDuration(\\n uint256 _maxDuration\\n ) external returns (bool success);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the E3 does not exist.\\n /// @param e3Id ID of the E3.\\n /// @return e3 The struct representing the requested E3.\\n function getE3(uint256 e3Id) external view returns (E3 memory e3);\\n}\\n\",\"keccak256\":\"0x706e77d517e9d275fa68844f902ac74ae5c508443732da519423018e75426bb4\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IExecutionModule.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { IOutputVerifier } from \\\"./IOutputVerifier.sol\\\";\\n\\ninterface IExecutionModule {\\n /// @notice This function should be called by the Enclave contract to validate the execution module parameters.\\n /// @param params ABI encoded execution module parameters.\\n function validate(\\n bytes calldata params\\n ) external returns (IOutputVerifier outputVerifier);\\n}\\n\",\"keccak256\":\"0x6cd6024b4459f94dde07b70e4f784078cbd4ab71d28c3b41316d3590d7c9bcf8\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IInputValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface IInputValidator {\\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\\n /// @param params ABI encoded input parameters.\\n /// @return input The input data to be published.\\n /// @return success Whether the input parameters are valid.\\n function validate(\\n address sender,\\n bytes memory params\\n ) external returns (bytes memory input, bool success);\\n}\\n\",\"keccak256\":\"0x8faeb82309f9a353636ef4ad1ca34a181a8161ccd287dd7c3150c0d6251cd656\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IOutputVerifier.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface IOutputVerifier {\\n /// @notice This function should be called by the Enclave contract to verify the output of a computation.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded output data to be verified.\\n /// @return output Ciphertext output of the given computation.\\n function verify(\\n uint256 e3Id,\\n bytes memory data\\n ) external view returns (bytes memory output, bool success);\\n}\\n\",\"keccak256\":\"0x09648c77f96c17a0d4143a11feb5c6aec15c70029cb483335a0bd9d6224769e8\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", - "bytecode": "0x6080346102a457601f61265838819003918201601f19168301916001600160401b038311848410176102a9578084926060946040528339810103126102a45780516001600160a01b0381168082036102a45760208301516001600160a01b03811693908490036102a457604090810151600080516020612638833981519152549182901c60ff161594916001600160401b0381168015908161029c575b6001149081610292575b159081610289575b50610278576001600160401b03198116600117600080516020612638833981519152557fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b523552916020918761024d575b50610105610335565b61010d610335565b610116336102bf565b61011e610363565b80600155604051908152a1610131610363565b80151580610238575b1561022457600080546001600160a01b031916821790556040519081527f016ea868599173c3163f65dea5e4677b2be5f0ececb4ec15d1166a27de35a53390602090a1600080516020612618833981519152546001600160a01b03160361020d575b506101b1575b60405161227e908161039a8239f35b68ff0000000000000000196000805160206126388339815191525416600080516020612638833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a16101a2565b61021e90610219610363565b6102bf565b3861019c565b63157970a560e21b60005260045260246000fd5b506000546001600160a01b031681141561013a565b6001600160481b031916680100000000000000011760008051602061263883398151915255386100fc565b63f92ee8a960e01b60005260046000fd5b905015386100ae565b303b1591506100a6565b87915061009c565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0316801561031f5760008051602061261883398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff6000805160206126388339815191525460401c161561035257565b631afcd79f60e31b60005260046000fd5b600080516020612618833981519152546001600160a01b0316330361038457565b63118cdaa760e01b6000523360045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c806309e098de146116c6578063115dfcbb146116875780631794bb3c146114615780632c27e1371461143a5780634017daf01461132e578063406ed35c146112fb578063594dfe61146109f95780636db5c8fd146109db578063715018a61461094257806376c932d514610903578063784b2830146107a657806378b41acd146107835780638da5cb5b1461073d578063a8873c6b146106ab578063af378f1014610619578063b260c42a14610469578063b74cb2db1461044b578063cb6496171461042d578063cf0f34c414610405578063d016b08d14610265578063d3c59355146101d7578063f14ea7b8146101495763f2fde38b1461011957600080fd5b34610144576020366003190112610144576101426101356118db565b61013d6121e9565b612143565b005b600080fd5b34610144576020366003190112610144577f39a3e67e141e4afa4c0f050632f57cfa9ccab94319143265fb278752551b0ca860206001600160a01b0361018d6118db565b6101956121e9565b1680600052600482526101b08160ff60406000205416612030565b8060005260048252604060002060ff198154169055604051908152a1602060405160018152f35b34610144576020366003190112610144577fe48e78a7419c5652baf40c86a4d7548a04ec3f569d4e6204e5a1e1890acbfaf460206001600160a01b0361021b6118db565b6102236121e9565b16806000526005825261023e8160ff60406000205416612030565b8060005260058252604060002060ff198154169055604051908152a1602060405160018152f35b3461014457610273366118a8565b61027c82611e0e565b6060810161028d8482511515611b69565b51428111156103ed57506102d76000926001600160a01b0360c085940151169060405194858094819363caf9278560e01b83523360048401526040602484015260448301906119d1565b03925af180156103e1576000916000916103bc575b50156103ab57816000526006602052600a60406000200180549168010000000000000000831015610395576001830180835583101561037f5761035d817fabf12c38379be7b560558cae3ceec83b3762653f7dd74e875af2ea6aeac7eaa89461037194600052602060002001611c69565b6040519182916020835260208301906119d1565b0390a2602060405160018152f35b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b63b4fa3fb360e01b60005260046000fd5b90506103db91503d806000833e6103d38183611823565b810190611bd4565b836102ec565b6040513d6000823e3d90fd5b8363142c294360e31b60005260045260245260446000fd5b34610144576020366003190112610144576020610423600435612107565b6040519015158152f35b34610144576000366003190112610144576020600254604051908152f35b34610144576000366003190112610144576020600354604051908152f35b346101445760203660031901126101445760043561048681611e0e565b60608101918251610605576020820180515142106105f45760204291510151106105e357602460006001600160a01b0381541660405192838092630e82f3b760e41b82528660048301525afa9081156103e15760009161059b575b5080511561058a57604083015142019081421161057457600083815260066020526040902060048101929092557f50df9e2c9fc5a7f4a07e403fa0300b88fcc8c6943bdff4b8ae71f55b7fd95f8994610566926101009261054491600901611c69565b51930151604051938493845260208401526060604084015260608301906119d1565b0390a1602060405160018152f35b634e487b7160e01b600052601160045260246000fd5b630d8dbe2560e01b60005260046000fd5b903d8082843e6105ab8184611823565b8201916020818403126105df5780519167ffffffffffffffff83116105dc57506105d6929101611b85565b846104e1565b80fd5b5080fd5b633d82a7cd60e11b60005260046000fd5b63a0750b5160e01b60005260046000fd5b633e26347b60e21b60005260045260246000fd5b34610144576020366003190112610144577fe5df1e46acc6e102c34b0f812f6557dba66de2e5fed10b64103b5d744083ee3160206001600160a01b0361065d6118db565b6106656121e9565b1680600052600482526106818160ff60406000205416156120e1565b80600052600482526040600020600160ff19825416179055604051908152a1602060405160018152f35b34610144576020366003190112610144577fcf75d44d74f911d2ec243ed8b390c2e4c69f2f2f372a197c0665e72843d49c0d60206001600160a01b036106ef6118db565b6106f76121e9565b1680600052600582526107138160ff60406000205416156120e1565b80600052600582526040600020600160ff19825416179055604051908152a1602060405160018152f35b346101445760003660031901126101445760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346101445760203660031901126101445760206104236107a16118db565b612056565b34610144576107b4366118a8565b6107bd82611e0e565b606081016107ce8482511515611b69565b514281116108eb5750610140810151516108d65761081392916001600160a01b0360e060009301511660405180809681946321614b3960e21b83528760048401611c0a565b03915afa9081156103e1576020926000908193610893575b506108868161085b7f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade0719386611c21565b836000526006865261087481600b604060002001611c69565b604051918291878352878301906119d1565b0390a26040519015158152f35b61088693506108cd907f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade071923d8091833e6103d38183611823565b9390915061082b565b82637eb9cea960e11b60005260045260246000fd5b836370c05fb960e11b60005260045260245260446000fd5b34610144576020366003190112610144576001600160a01b036109246118db565b166000526004602052602060ff604060002054166040519015158152f35b346101445760003660031901126101445761095b6121e9565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610144576000366003190112610144576020600154604051908152f35b61014036600319011261014457610a0e6118db565b36606411610144573660a4116101445760a4359060c4356001600160a01b03811681036101445760e43567ffffffffffffffff811161014457610a55903690600401611861565b9061010435936001600160a01b0385168503610144576101243567ffffffffffffffff811161014457610a8c903690600401611861565b91610a95611d6a565b5034156112e65760443563ffffffff811690818103610144575063ffffffff610abc611fd5565b161115806112d0575b156112b25760843560643581101590816112a7575b5015611296578115158061128a575b15611275576001600160a01b038116600052600460205260ff6040600020541615611257576001600160a01b0386166000526005602052610b3b6001600160a01b03871660ff60406000205416612030565b600254936000198514610574576020610b7691600187016002556040518093819263c16e50ef60e01b835284600484015260248301906119d1565b038160006001600160a01b0387165af19081156103e15760009161120e575b506001600160a01b03169283156111fd576020610bcd916040518093819263c16e50ef60e01b835284600484015260248301906119d1565b038160006001600160a01b038c165af19081156103e1576000916111b4575b506001600160a01b03169485156111a357604051602096610c0d8883611823565b6000825260405195610c1e87611806565b6040958651610c2d8882611823565b60248b825b6064831061118b5750505088528651610c4b8882611823565b60648b825b60a4831061117b5750905089015286880152600060608801526001600160a01b03851660808801526001600160a01b038a1660a088015260c087015260e08601528351610c9d8882611823565b600081526101008601526101208501528251610cb98782611823565b600081526101408501528251610ccf8782611823565b60008152610160850152846000526006865282600020845160009060005b89600282106111535750505081558685015160005b6002811061113e575050838501516003820155606085015160048201556001600160a01b036080860151166001600160a01b036005830191166001600160a01b03198254161790556001600160a01b0360a0860151166001600160a01b036006830191166001600160a01b03198254161790556001600160a01b0360c0860151166001600160a01b036007830191166001600160a01b03198254161790556001600160a01b0360e0860151166001600160a01b036008830191166001600160a01b0319825416179055610ddd61010086015160098301611c69565b610120850151805190680100000000000000008211610395578890600a84015483600a8601558084106110b5575b5001600a830160005288600020896000925b848410611097575050505050610e4e90610e3f610140870151600b8301611c69565b600c6101608701519101611c69565b6000866001600160a01b036084818454169487519485938492639ccb58d560e01b84528c60048501521696876024840152610e8b60448401611ff9565b5af190811561108c57600091611057575b501561058a57846000526006865282600020835190868252606088830152610ed8606083018263ffffffff602091548181168452821c16910152565b610ee860a0830160018301611de6565b600381015460e083015260048101546101008301526001600160a01b036005820154166101208301526001600160a01b036006820154166101408301526001600160a01b036007820154166101608301526001600160a01b036008820154166101808301526101c06101a0830152610f6761022083016009830161192b565b600a820190605f19848203016101c085015281548082528a8201918b8260051b820101936000528b600020926000915b83831061102c575050505050916001600160a01b0380611028999a9b6110098495600c610ff57fdb6ad92217850c3c041086cc44cbec591badf6afe93d864e7f4ea4ba1bcf604199605f19898203016101e08a0152600b840161192b565b878103605f1901610200890152910161192b565b9689850152169516930390a380805195869586528501528301906119f6565b0390f35b90919293948d60016110488193601f198682030187528961192b565b97019301930191939290610f97565b90508681813d8311611085575b61106e8183611823565b810103126101445761107f90611bc7565b88610e9c565b503d611064565b84513d6000823e3d90fd5b600191816110a784935186611c69565b019201920191908a90610e1d565b600a850160005282600020908482015b81830181106110d5575050610e0b565b6001919293946110e582546118f1565b806110f8575b505001908b9392916110c5565b601f81118414611110575050600081555b8c8f6110eb565b83601f61112c9385600052600020920160051c82019101611c52565b8060005260008d812081835555611109565b60019089835193019282828601015501610d02565b829363ffffffff6001939451169063ffffffff8560051b92831b921b19161793019101610ced565b82358152918101918d9101610c50565b819061119684611fe8565b8152019101908c90610c32565b63f72c404960e01b60005260046000fd5b6020813d6020116111f5575b816111cd60209383611823565b810103126105df5751906001600160a01b03821682036105dc57506001600160a01b03610bec565b3d91506111c0565b630fdfa71f60e31b60005260046000fd5b6020813d60201161124f575b8161122760209383611823565b810103126105df5751906001600160a01b03821682036105dc57506001600160a01b03610b95565b3d915061121a565b6001600160a01b0390631e505a8160e01b6000521660045260246000fd5b506313b783af60e21b60005260045260246000fd5b50600154821115610ae9565b6308594fb760e01b60005260046000fd5b905042111587610ada565b604051633744092160e21b81526044906112ce60048201611ff9565bfd5b5063ffffffff6112de611fd5565b161515610ac5565b638c4fcd9360e01b6000523460045260246000fd5b346101445760203660031901126101445761102861131a600435611e0e565b6040519182916020835260208301906119f6565b3461014457602036600319011261014457600435600052600660205260406000206003810154611028600c61142b60048501549461141d6001600160a01b036005830154166001600160a01b036006840154166001600160a01b036007850154166001600160a01b0360088601541691604051936113ba856113b38160098b0161192b565b0386611823565b6113e9604051976113d9896113d281600b850161192b565b038a611823565b6113d2604051809c81930161192b565b6040519b8c9b8c5260208c015260408b015260608a0152608089015260a088015261012060c08801526101208701906119d1565b9085820360e08701526119d1565b908382036101008501526119d1565b346101445760003660031901126101445760206001600160a01b0360005416604051908152f35b346101445760603660031901126101445761147a6118db565b602435906001600160a01b0382168203610144577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff82168015908161167f575b6001149081611675575b15908161166c575b5061165b5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561154a918461161c575b50611528612231565b611530612231565b61153933612143565b611544604435612107565b50612056565b506001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b0382160361160a575b5061158d57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b6116169061013d6121e9565b81611586565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00558461151f565b63f92ee8a960e01b60005260046000fd5b905015856114df565b303b1591506114d7565b8591506114cd565b34610144576020366003190112610144576001600160a01b036116a86118db565b166000526005602052602060ff604060002054166040519015158152f35b34610144576116d4366118a8565b6116dd82611e0e565b6116ed8360608301511515611b69565b61014081015151156117f157610160810151516117dc57611738600093926001600160a01b0360808694015116906040519586809481936321614b3960e21b83528860048401611c0a565b03925af19081156103e1576020926000908193611799575b50610886816117807f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca1699386611c21565b836000526006865261087481600c604060002001611c69565b61088693506117d3907f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca169923d8091833e6103d38183611823565b93909150611750565b826360ec327960e01b60005260045260246000fd5b8263032c20ef60e21b60005260045260246000fd5b610180810190811067ffffffffffffffff82111761039557604052565b90601f8019910116810190811067ffffffffffffffff82111761039557604052565b67ffffffffffffffff811161039557601f01601f191660200190565b81601f820112156101445780359061187882611845565b926118866040519485611823565b8284526020838301011161014457816000926020809301838601378301015290565b90604060031983011261014457600435916024359067ffffffffffffffff8211610144576118d891600401611861565b90565b600435906001600160a01b038216820361014457565b90600182811c92168015611921575b602083101461190b57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611900565b6000929181549161193b836118f1565b8083529260018116908115611991575060011461195757505050565b60009081526020812093945091925b838310611977575060209250010190565b600181602092949394548385870101520191019190611966565b915050602093945060ff929192191683830152151560051b010190565b60005b8381106119c15750506000910152565b81810151838201526020016119b1565b906020916119ea815180928185528580860191016119ae565b601f01601f1916010190565b80519192916000845b60028210611b4d5750505060208101516000604085015b60028210611b375750505060408101516080840152606081015160a08401526001600160a01b0360808201511660c08401526001600160a01b0360a08201511660e08401526001600160a01b0360c0820151166101008401526001600160a01b0360e082015116610120840152611aa06101008201516101c06101408601526101c08501906119d1565b9261012082015193818103610160830152845180825260208201906020808260051b8501019701916000905b828210611b09575050505050610160611af76118d894956101408501518482036101808601526119d1565b920151906101a08184039101526119d1565b9091929397602080611b27600193601f198d820301865288516119d1565b9a96019493919091019101611acc565b6020806001928551815201930191019091611a16565b60208060019263ffffffff8651168152019301910190916119ff565b15611b715750565b63166b4d0360e01b60005260045260246000fd5b81601f82011215610144578051611b9b81611845565b92611ba96040519485611823565b81845260208284010111610144576118d891602080850191016119ae565b5190811515820361014457565b91906040838203126101445782519067ffffffffffffffff821161014457611c036020916118d8938601611b85565b9301611bc7565b6040906118d89392815281602082015201906119d1565b15611c295750565b604051632f9f8ab960e01b815260206004820152908190611c4e9060248301906119d1565b0390fd5b818110611c5d575050565b60008155600101611c52565b919091825167ffffffffffffffff811161039557611c8782546118f1565b601f8111611d2d575b506020601f8211600114611ccb5781929394600092611cc0575b50508160011b916000199060031b1c1916179055565b015190503880611caa565b601f1982169083600052806000209160005b818110611d1557509583600195969710611cfc575b505050811b019055565b015160001960f88460031b161c19169055388080611cf2565b9192602060018192868b015181550194019201611cdd565b611d5a90836000526020600020601f840160051c81019160208510611d60575b601f0160051c0190611c52565b38611c90565b9091508190611d4d565b60405190611d7782611806565b606061016083600060408051611d8d8282611823565b8136823783528051611d9f8282611823565b81368237602084015282015260008382015260006080820152600060a0820152600060c0820152600060e08201528261010082015282610120820152826101408201520152565b906000905b60028210611df857505050565b6001602081928554815201930191019091611deb565b90611e17611d6a565b50816000526006602052604060002091604051611e3381611806565b604051611e51818663ffffffff602091548181168452821c16910152565b611e5c604082611823565b8152604051611e6e8160018701611de6565b611e79604082611823565b602082015260038401546040820152600484015460608201526001600160a01b0360058501541693608082019485526001600160a01b0360068201541660a08301526001600160a01b0360078201541660c08301526001600160a01b0360088201541660e0830152604051611efc81611ef5816009860161192b565b0382611823565b610100830152600a8101805467ffffffffffffffff81116103955760208160051b0191611f2c6040519384611823565b818352602083019060005260206000206000915b838310611fb05750505050611f8b8392600c926101206001600160a01b03960152604051611f7581611ef581600b860161192b565b610140850152611ef5604051809481930161192b565b61016082015293511615611f9c5750565b63cd6f4a4f60e01b60005260045260246000fd5b600160208192604051611fc781611ef5818961192b565b815201920192019190611f40565b60243563ffffffff811681036101445790565b359063ffffffff8216820361014457565b6024906000905b6002821061200d57505050565b60208060019263ffffffff61202187611fe8565b16815201930191019091612000565b156120385750565b6001600160a01b03906321ac7c5f60e01b6000521660045260246000fd5b6001600160a01b03906120676121e9565b16801515806120cc575b156120b8576020817f016ea868599173c3163f65dea5e4677b2be5f0ececb4ec15d1166a27de35a533926001600160a01b03196000541617600055604051908152a1600190565b63157970a560e21b60005260045260246000fd5b506001600160a01b0360005416811415612071565b156120e95750565b6001600160a01b039063b29d459560e01b6000521660045260246000fd5b60207fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b523552916121336121e9565b80600155604051908152a1600190565b6001600160a01b031680156121d3576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361221c57565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561226057565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000a9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", - "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806309e098de146116c6578063115dfcbb146116875780631794bb3c146114615780632c27e1371461143a5780634017daf01461132e578063406ed35c146112fb578063594dfe61146109f95780636db5c8fd146109db578063715018a61461094257806376c932d514610903578063784b2830146107a657806378b41acd146107835780638da5cb5b1461073d578063a8873c6b146106ab578063af378f1014610619578063b260c42a14610469578063b74cb2db1461044b578063cb6496171461042d578063cf0f34c414610405578063d016b08d14610265578063d3c59355146101d7578063f14ea7b8146101495763f2fde38b1461011957600080fd5b34610144576020366003190112610144576101426101356118db565b61013d6121e9565b612143565b005b600080fd5b34610144576020366003190112610144577f39a3e67e141e4afa4c0f050632f57cfa9ccab94319143265fb278752551b0ca860206001600160a01b0361018d6118db565b6101956121e9565b1680600052600482526101b08160ff60406000205416612030565b8060005260048252604060002060ff198154169055604051908152a1602060405160018152f35b34610144576020366003190112610144577fe48e78a7419c5652baf40c86a4d7548a04ec3f569d4e6204e5a1e1890acbfaf460206001600160a01b0361021b6118db565b6102236121e9565b16806000526005825261023e8160ff60406000205416612030565b8060005260058252604060002060ff198154169055604051908152a1602060405160018152f35b3461014457610273366118a8565b61027c82611e0e565b6060810161028d8482511515611b69565b51428111156103ed57506102d76000926001600160a01b0360c085940151169060405194858094819363caf9278560e01b83523360048401526040602484015260448301906119d1565b03925af180156103e1576000916000916103bc575b50156103ab57816000526006602052600a60406000200180549168010000000000000000831015610395576001830180835583101561037f5761035d817fabf12c38379be7b560558cae3ceec83b3762653f7dd74e875af2ea6aeac7eaa89461037194600052602060002001611c69565b6040519182916020835260208301906119d1565b0390a2602060405160018152f35b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b63b4fa3fb360e01b60005260046000fd5b90506103db91503d806000833e6103d38183611823565b810190611bd4565b836102ec565b6040513d6000823e3d90fd5b8363142c294360e31b60005260045260245260446000fd5b34610144576020366003190112610144576020610423600435612107565b6040519015158152f35b34610144576000366003190112610144576020600254604051908152f35b34610144576000366003190112610144576020600354604051908152f35b346101445760203660031901126101445760043561048681611e0e565b60608101918251610605576020820180515142106105f45760204291510151106105e357602460006001600160a01b0381541660405192838092630e82f3b760e41b82528660048301525afa9081156103e15760009161059b575b5080511561058a57604083015142019081421161057457600083815260066020526040902060048101929092557f50df9e2c9fc5a7f4a07e403fa0300b88fcc8c6943bdff4b8ae71f55b7fd95f8994610566926101009261054491600901611c69565b51930151604051938493845260208401526060604084015260608301906119d1565b0390a1602060405160018152f35b634e487b7160e01b600052601160045260246000fd5b630d8dbe2560e01b60005260046000fd5b903d8082843e6105ab8184611823565b8201916020818403126105df5780519167ffffffffffffffff83116105dc57506105d6929101611b85565b846104e1565b80fd5b5080fd5b633d82a7cd60e11b60005260046000fd5b63a0750b5160e01b60005260046000fd5b633e26347b60e21b60005260045260246000fd5b34610144576020366003190112610144577fe5df1e46acc6e102c34b0f812f6557dba66de2e5fed10b64103b5d744083ee3160206001600160a01b0361065d6118db565b6106656121e9565b1680600052600482526106818160ff60406000205416156120e1565b80600052600482526040600020600160ff19825416179055604051908152a1602060405160018152f35b34610144576020366003190112610144577fcf75d44d74f911d2ec243ed8b390c2e4c69f2f2f372a197c0665e72843d49c0d60206001600160a01b036106ef6118db565b6106f76121e9565b1680600052600582526107138160ff60406000205416156120e1565b80600052600582526040600020600160ff19825416179055604051908152a1602060405160018152f35b346101445760003660031901126101445760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346101445760203660031901126101445760206104236107a16118db565b612056565b34610144576107b4366118a8565b6107bd82611e0e565b606081016107ce8482511515611b69565b514281116108eb5750610140810151516108d65761081392916001600160a01b0360e060009301511660405180809681946321614b3960e21b83528760048401611c0a565b03915afa9081156103e1576020926000908193610893575b506108868161085b7f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade0719386611c21565b836000526006865261087481600b604060002001611c69565b604051918291878352878301906119d1565b0390a26040519015158152f35b61088693506108cd907f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade071923d8091833e6103d38183611823565b9390915061082b565b82637eb9cea960e11b60005260045260246000fd5b836370c05fb960e11b60005260045260245260446000fd5b34610144576020366003190112610144576001600160a01b036109246118db565b166000526004602052602060ff604060002054166040519015158152f35b346101445760003660031901126101445761095b6121e9565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610144576000366003190112610144576020600154604051908152f35b61014036600319011261014457610a0e6118db565b36606411610144573660a4116101445760a4359060c4356001600160a01b03811681036101445760e43567ffffffffffffffff811161014457610a55903690600401611861565b9061010435936001600160a01b0385168503610144576101243567ffffffffffffffff811161014457610a8c903690600401611861565b91610a95611d6a565b5034156112e65760443563ffffffff811690818103610144575063ffffffff610abc611fd5565b161115806112d0575b156112b25760843560643581101590816112a7575b5015611296578115158061128a575b15611275576001600160a01b038116600052600460205260ff6040600020541615611257576001600160a01b0386166000526005602052610b3b6001600160a01b03871660ff60406000205416612030565b600254936000198514610574576020610b7691600187016002556040518093819263c16e50ef60e01b835284600484015260248301906119d1565b038160006001600160a01b0387165af19081156103e15760009161120e575b506001600160a01b03169283156111fd576020610bcd916040518093819263c16e50ef60e01b835284600484015260248301906119d1565b038160006001600160a01b038c165af19081156103e1576000916111b4575b506001600160a01b03169485156111a357604051602096610c0d8883611823565b6000825260405195610c1e87611806565b6040958651610c2d8882611823565b60248b825b6064831061118b5750505088528651610c4b8882611823565b60648b825b60a4831061117b5750905089015286880152600060608801526001600160a01b03851660808801526001600160a01b038a1660a088015260c087015260e08601528351610c9d8882611823565b600081526101008601526101208501528251610cb98782611823565b600081526101408501528251610ccf8782611823565b60008152610160850152846000526006865282600020845160009060005b89600282106111535750505081558685015160005b6002811061113e575050838501516003820155606085015160048201556001600160a01b036080860151166001600160a01b036005830191166001600160a01b03198254161790556001600160a01b0360a0860151166001600160a01b036006830191166001600160a01b03198254161790556001600160a01b0360c0860151166001600160a01b036007830191166001600160a01b03198254161790556001600160a01b0360e0860151166001600160a01b036008830191166001600160a01b0319825416179055610ddd61010086015160098301611c69565b610120850151805190680100000000000000008211610395578890600a84015483600a8601558084106110b5575b5001600a830160005288600020896000925b848410611097575050505050610e4e90610e3f610140870151600b8301611c69565b600c6101608701519101611c69565b6000866001600160a01b036084818454169487519485938492639ccb58d560e01b84528c60048501521696876024840152610e8b60448401611ff9565b5af190811561108c57600091611057575b501561058a57846000526006865282600020835190868252606088830152610ed8606083018263ffffffff602091548181168452821c16910152565b610ee860a0830160018301611de6565b600381015460e083015260048101546101008301526001600160a01b036005820154166101208301526001600160a01b036006820154166101408301526001600160a01b036007820154166101608301526001600160a01b036008820154166101808301526101c06101a0830152610f6761022083016009830161192b565b600a820190605f19848203016101c085015281548082528a8201918b8260051b820101936000528b600020926000915b83831061102c575050505050916001600160a01b0380611028999a9b6110098495600c610ff57fdb6ad92217850c3c041086cc44cbec591badf6afe93d864e7f4ea4ba1bcf604199605f19898203016101e08a0152600b840161192b565b878103605f1901610200890152910161192b565b9689850152169516930390a380805195869586528501528301906119f6565b0390f35b90919293948d60016110488193601f198682030187528961192b565b97019301930191939290610f97565b90508681813d8311611085575b61106e8183611823565b810103126101445761107f90611bc7565b88610e9c565b503d611064565b84513d6000823e3d90fd5b600191816110a784935186611c69565b019201920191908a90610e1d565b600a850160005282600020908482015b81830181106110d5575050610e0b565b6001919293946110e582546118f1565b806110f8575b505001908b9392916110c5565b601f81118414611110575050600081555b8c8f6110eb565b83601f61112c9385600052600020920160051c82019101611c52565b8060005260008d812081835555611109565b60019089835193019282828601015501610d02565b829363ffffffff6001939451169063ffffffff8560051b92831b921b19161793019101610ced565b82358152918101918d9101610c50565b819061119684611fe8565b8152019101908c90610c32565b63f72c404960e01b60005260046000fd5b6020813d6020116111f5575b816111cd60209383611823565b810103126105df5751906001600160a01b03821682036105dc57506001600160a01b03610bec565b3d91506111c0565b630fdfa71f60e31b60005260046000fd5b6020813d60201161124f575b8161122760209383611823565b810103126105df5751906001600160a01b03821682036105dc57506001600160a01b03610b95565b3d915061121a565b6001600160a01b0390631e505a8160e01b6000521660045260246000fd5b506313b783af60e21b60005260045260246000fd5b50600154821115610ae9565b6308594fb760e01b60005260046000fd5b905042111587610ada565b604051633744092160e21b81526044906112ce60048201611ff9565bfd5b5063ffffffff6112de611fd5565b161515610ac5565b638c4fcd9360e01b6000523460045260246000fd5b346101445760203660031901126101445761102861131a600435611e0e565b6040519182916020835260208301906119f6565b3461014457602036600319011261014457600435600052600660205260406000206003810154611028600c61142b60048501549461141d6001600160a01b036005830154166001600160a01b036006840154166001600160a01b036007850154166001600160a01b0360088601541691604051936113ba856113b38160098b0161192b565b0386611823565b6113e9604051976113d9896113d281600b850161192b565b038a611823565b6113d2604051809c81930161192b565b6040519b8c9b8c5260208c015260408b015260608a0152608089015260a088015261012060c08801526101208701906119d1565b9085820360e08701526119d1565b908382036101008501526119d1565b346101445760003660031901126101445760206001600160a01b0360005416604051908152f35b346101445760603660031901126101445761147a6118db565b602435906001600160a01b0382168203610144577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff82168015908161167f575b6001149081611675575b15908161166c575b5061165b5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561154a918461161c575b50611528612231565b611530612231565b61153933612143565b611544604435612107565b50612056565b506001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b0382160361160a575b5061158d57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b6116169061013d6121e9565b81611586565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00558461151f565b63f92ee8a960e01b60005260046000fd5b905015856114df565b303b1591506114d7565b8591506114cd565b34610144576020366003190112610144576001600160a01b036116a86118db565b166000526005602052602060ff604060002054166040519015158152f35b34610144576116d4366118a8565b6116dd82611e0e565b6116ed8360608301511515611b69565b61014081015151156117f157610160810151516117dc57611738600093926001600160a01b0360808694015116906040519586809481936321614b3960e21b83528860048401611c0a565b03925af19081156103e1576020926000908193611799575b50610886816117807f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca1699386611c21565b836000526006865261087481600c604060002001611c69565b61088693506117d3907f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca169923d8091833e6103d38183611823565b93909150611750565b826360ec327960e01b60005260045260246000fd5b8263032c20ef60e21b60005260045260246000fd5b610180810190811067ffffffffffffffff82111761039557604052565b90601f8019910116810190811067ffffffffffffffff82111761039557604052565b67ffffffffffffffff811161039557601f01601f191660200190565b81601f820112156101445780359061187882611845565b926118866040519485611823565b8284526020838301011161014457816000926020809301838601378301015290565b90604060031983011261014457600435916024359067ffffffffffffffff8211610144576118d891600401611861565b90565b600435906001600160a01b038216820361014457565b90600182811c92168015611921575b602083101461190b57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611900565b6000929181549161193b836118f1565b8083529260018116908115611991575060011461195757505050565b60009081526020812093945091925b838310611977575060209250010190565b600181602092949394548385870101520191019190611966565b915050602093945060ff929192191683830152151560051b010190565b60005b8381106119c15750506000910152565b81810151838201526020016119b1565b906020916119ea815180928185528580860191016119ae565b601f01601f1916010190565b80519192916000845b60028210611b4d5750505060208101516000604085015b60028210611b375750505060408101516080840152606081015160a08401526001600160a01b0360808201511660c08401526001600160a01b0360a08201511660e08401526001600160a01b0360c0820151166101008401526001600160a01b0360e082015116610120840152611aa06101008201516101c06101408601526101c08501906119d1565b9261012082015193818103610160830152845180825260208201906020808260051b8501019701916000905b828210611b09575050505050610160611af76118d894956101408501518482036101808601526119d1565b920151906101a08184039101526119d1565b9091929397602080611b27600193601f198d820301865288516119d1565b9a96019493919091019101611acc565b6020806001928551815201930191019091611a16565b60208060019263ffffffff8651168152019301910190916119ff565b15611b715750565b63166b4d0360e01b60005260045260246000fd5b81601f82011215610144578051611b9b81611845565b92611ba96040519485611823565b81845260208284010111610144576118d891602080850191016119ae565b5190811515820361014457565b91906040838203126101445782519067ffffffffffffffff821161014457611c036020916118d8938601611b85565b9301611bc7565b6040906118d89392815281602082015201906119d1565b15611c295750565b604051632f9f8ab960e01b815260206004820152908190611c4e9060248301906119d1565b0390fd5b818110611c5d575050565b60008155600101611c52565b919091825167ffffffffffffffff811161039557611c8782546118f1565b601f8111611d2d575b506020601f8211600114611ccb5781929394600092611cc0575b50508160011b916000199060031b1c1916179055565b015190503880611caa565b601f1982169083600052806000209160005b818110611d1557509583600195969710611cfc575b505050811b019055565b015160001960f88460031b161c19169055388080611cf2565b9192602060018192868b015181550194019201611cdd565b611d5a90836000526020600020601f840160051c81019160208510611d60575b601f0160051c0190611c52565b38611c90565b9091508190611d4d565b60405190611d7782611806565b606061016083600060408051611d8d8282611823565b8136823783528051611d9f8282611823565b81368237602084015282015260008382015260006080820152600060a0820152600060c0820152600060e08201528261010082015282610120820152826101408201520152565b906000905b60028210611df857505050565b6001602081928554815201930191019091611deb565b90611e17611d6a565b50816000526006602052604060002091604051611e3381611806565b604051611e51818663ffffffff602091548181168452821c16910152565b611e5c604082611823565b8152604051611e6e8160018701611de6565b611e79604082611823565b602082015260038401546040820152600484015460608201526001600160a01b0360058501541693608082019485526001600160a01b0360068201541660a08301526001600160a01b0360078201541660c08301526001600160a01b0360088201541660e0830152604051611efc81611ef5816009860161192b565b0382611823565b610100830152600a8101805467ffffffffffffffff81116103955760208160051b0191611f2c6040519384611823565b818352602083019060005260206000206000915b838310611fb05750505050611f8b8392600c926101206001600160a01b03960152604051611f7581611ef581600b860161192b565b610140850152611ef5604051809481930161192b565b61016082015293511615611f9c5750565b63cd6f4a4f60e01b60005260045260246000fd5b600160208192604051611fc781611ef5818961192b565b815201920192019190611f40565b60243563ffffffff811681036101445790565b359063ffffffff8216820361014457565b6024906000905b6002821061200d57505050565b60208060019263ffffffff61202187611fe8565b16815201930191019091612000565b156120385750565b6001600160a01b03906321ac7c5f60e01b6000521660045260246000fd5b6001600160a01b03906120676121e9565b16801515806120cc575b156120b8576020817f016ea868599173c3163f65dea5e4677b2be5f0ececb4ec15d1166a27de35a533926001600160a01b03196000541617600055604051908152a1600190565b63157970a560e21b60005260045260246000fd5b506001600160a01b0360005416811415612071565b156120e95750565b6001600160a01b039063b29d459560e01b6000521660045260246000fd5b60207fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b523552916121336121e9565b80600155604051908152a1600190565b6001600160a01b031680156121d3576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361221c57565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561226057565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000a", + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract ICiphernodeRegistry\",\"name\":\"_ciphernodeRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"CiphertextOutputAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"CiphertextOutputNotPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeSelectionFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3AlreadyActivated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3DoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"E3Expired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"E3NotActivated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"E3NotReady\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"E3ProgramNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"InputDeadlineNotPassed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"InputDeadlinePassed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract ICiphernodeRegistry\",\"name\":\"ciphernodeRegistry\",\"type\":\"address\"}],\"name\":\"InvalidCiphernodeRegistry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"}],\"name\":\"InvalidComputationRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"InvalidDuration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"InvalidEncryptionScheme\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"output\",\"type\":\"bytes\"}],\"name\":\"InvalidOutput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStartWindow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"InvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeafGreaterThanSnarkScalarField\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ModuleAlreadyEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ModuleNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentRequired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"PlaintextOutputAlreadyPublished\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"ciphernodeRegistry\",\"type\":\"address\"}],\"name\":\"CiphernodeRegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"}],\"name\":\"CiphertextOutputPublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"committeePublicKey\",\"type\":\"bytes\"}],\"name\":\"E3Activated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"E3ProgramDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"E3ProgramEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"committeePublicKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"ciphertextOutput\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"E3Requested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"EncryptionSchemeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"EncryptionSchemeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputHash\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"InputPublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxDuration\",\"type\":\"uint256\"}],\"name\":\"MaxDurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"name\":\"PlaintextOutputPublished\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"activate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ciphernodeRegistry\",\"outputs\":[{\"internalType\":\"contract ICiphernodeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"decryptionVerifiers\",\"outputs\":[{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"disableE3Program\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"disableEncryptionScheme\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"e3Programs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"e3s\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"committeePublicKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"ciphertextOutput\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"}],\"name\":\"enableE3Program\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"}],\"name\":\"getDecryptionVerifier\",\"outputs\":[{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"getE3\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"committeePublicKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"ciphertextOutput\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"getInputRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract ICiphernodeRegistry\",\"name\":\"_ciphernodeRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"inputCounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"inputCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"inputs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depth\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nexte3Id\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ciphertextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"publishCiphertextOutput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"publishInput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"publishPlaintextOutput\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"filter\",\"type\":\"address\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"computeProviderParams\",\"type\":\"bytes\"}],\"name\":\"request\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"startWindow\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IE3Program\",\"name\":\"e3Program\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"},{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"committeePublicKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"ciphertextOutput\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"plaintextOutput\",\"type\":\"bytes\"}],\"internalType\":\"struct E3\",\"name\":\"e3\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ICiphernodeRegistry\",\"name\":\"_ciphernodeRegistry\",\"type\":\"address\"}],\"name\":\"setCiphernodeRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"}],\"name\":\"setDecryptionVerifier\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDuration\",\"type\":\"uint256\"}],\"name\":\"setMaxDuration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"CiphernodeRegistrySet(address)\":{\"params\":{\"ciphernodeRegistry\":\"The address of the CiphernodeRegistry contract.\"}},\"CiphertextOutputPublished(uint256,bytes)\":{\"params\":{\"ciphertextOutput\":\"ABI encoded ciphertext output.\",\"e3Id\":\"ID of the E3.\"}},\"E3Activated(uint256,uint256,bytes)\":{\"params\":{\"committeePublicKey\":\"Public key of the committee.\",\"e3Id\":\"ID of the E3.\",\"expiration\":\"Timestamp when committee duties expire.\"}},\"E3ProgramDisabled(address)\":{\"params\":{\"e3Program\":\"The address of the E3 Program.\"}},\"E3ProgramEnabled(address)\":{\"params\":{\"e3Program\":\"The address of the E3 Program.\"}},\"E3Requested(uint256,(uint256,uint32[2],uint256[2],uint256,uint256,bytes32,address,bytes,address,address,bytes32,bytes32,bytes),address,address)\":{\"params\":{\"e3\":\"Details of the E3.\",\"e3Id\":\"ID of the E3.\",\"e3Program\":\"Address of the Computation module selected.\",\"filter\":\"Address of the pool of nodes from which the Cipher Node committee was selected.\"}},\"EncryptionSchemeDisabled(bytes32)\":{\"params\":{\"encryptionSchemeId\":\"The ID of the encryption scheme that was disabled.\"}},\"EncryptionSchemeEnabled(bytes32)\":{\"params\":{\"encryptionSchemeId\":\"The ID of the encryption scheme that was enabled.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InputPublished(uint256,bytes,uint256,uint256)\":{\"params\":{\"data\":\"ABI encoded input data.\",\"e3Id\":\"ID of the E3.\"}},\"MaxDurationSet(uint256)\":{\"params\":{\"maxDuration\":\"The maximum duration of a computation in seconds.\"}},\"PlaintextOutputPublished(uint256,bytes)\":{\"params\":{\"e3Id\":\"ID of the E3.\",\"plaintextOutput\":\"ABI encoded plaintext output.\"}}},\"kind\":\"dev\",\"methods\":{\"activate(uint256,bytes)\":{\"details\":\"This function MUST emit the E3Activated event.This function MUST revert if the given E3 has not yet been requested.This function MUST revert if the selected node committee has not yet published a public key.\",\"params\":{\"e3Id\":\"ID of the E3.\",\"publicKey\":\"Public key of the committee.\"},\"returns\":{\"success\":\"True if the E3 was successfully activated.\"}},\"constructor\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds\",\"_owner\":\"The owner of this contract\"}},\"getE3(uint256)\":{\"details\":\"This function MUST revert if the E3 does not exist.\",\"params\":{\"e3Id\":\"ID of the E3.\"},\"returns\":{\"e3\":\"The struct representing the requested E3.\"}},\"getInputRoot(uint256)\":{\"details\":\"This function MUST revert if the E3 does not exist.\",\"params\":{\"e3Id\":\"ID of the E3.\"},\"returns\":{\"_0\":\"The root of the input merkle tree.\"}},\"initialize(address,address,uint256)\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds\",\"_owner\":\"The owner of this contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"publishCiphertextOutput(uint256,bytes,bytes)\":{\"details\":\"This function MUST emit the CiphertextOutputPublished event.\",\"params\":{\"ciphertextOutput\":\"ABI encoded output data to verify.\",\"e3Id\":\"ID of the E3.\",\"proof\":\"ABI encoded data to verify the ciphertextOutput.\"},\"returns\":{\"success\":\"True if the output was successfully published.\"}},\"publishInput(uint256,bytes)\":{\"details\":\"This function MUST revert if the E3 is not yet activated.This function MUST emit the InputPublished event.\",\"params\":{\"data\":\"ABI encoded input data to publish.\",\"e3Id\":\"ID of the E3.\"},\"returns\":{\"success\":\"True if the input was successfully published.\"}},\"publishPlaintextOutput(uint256,bytes,bytes)\":{\"details\":\"This function MUST revert if the output has not been published.This function MUST emit the PlaintextOutputPublished event.\",\"params\":{\"e3Id\":\"ID of the E3.\",\"plaintextOutput\":\"ABI encoded plaintext output.\",\"proof\":\"ABI encoded data to verify the plaintextOutput.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"request(address,uint32[2],uint256[2],uint256,address,bytes,bytes)\":{\"details\":\"This function MUST emit the E3Requested event.\",\"params\":{\"computeProviderParams\":\"ABI encoded compute provider parameters.\",\"duration\":\"The duration of the computation in seconds.\",\"e3Program\":\"Address of the E3 Program.\",\"e3ProgramParams\":\"ABI encoded computation parameters.\",\"filter\":\"IDs of the pool of nodes from which to select the committee.\",\"threshold\":\"The M/N threshold for the committee.\"},\"returns\":{\"e3\":\"The E3 struct.\",\"e3Id\":\"ID of the E3.\"}},\"setMaxDuration(uint256)\":{\"params\":{\"_maxDuration\":\"The maximum duration of a computation in seconds.\"},\"returns\":{\"success\":\"True if the max duration was successfully set.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"CiphernodeRegistrySet(address)\":{\"notice\":\"This event MUST be emitted any time the CiphernodeRegistry is set.\"},\"CiphertextOutputPublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3) is successfully published.\"},\"E3Activated(uint256,uint256,bytes)\":{\"notice\":\"This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\"},\"E3ProgramDisabled(address)\":{\"notice\":\"This event MUST be emitted any time a E3 Program is disabled.\"},\"E3ProgramEnabled(address)\":{\"notice\":\"This event MUST be emitted any time a E3 Program is enabled.\"},\"E3Requested(uint256,(uint256,uint32[2],uint256[2],uint256,uint256,bytes32,address,bytes,address,address,bytes32,bytes32,bytes),address,address)\":{\"notice\":\"This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\"},\"EncryptionSchemeDisabled(bytes32)\":{\"notice\":\"This event MUST be emitted any time an encryption scheme is disabled.\"},\"EncryptionSchemeEnabled(bytes32)\":{\"notice\":\"The event MUST be emitted any time an encryption scheme is enabled.\"},\"InputPublished(uint256,bytes,uint256,uint256)\":{\"notice\":\"This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is successfully published.\"},\"MaxDurationSet(uint256)\":{\"notice\":\"This event MUST be emitted any time the `maxDuration` is set.\"},\"PlaintextOutputPublished(uint256,bytes)\":{\"notice\":\"This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3) is successfully published.\"}},\"kind\":\"user\",\"methods\":{\"activate(uint256,bytes)\":{\"notice\":\"This function should be called to activate an Encrypted Execution Environment (E3) once it has been initialized and is ready for input.\"},\"getE3(uint256)\":{\"notice\":\"This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\"},\"getInputRoot(uint256)\":{\"notice\":\"This function returns root of the input merkle tree for a given E3.\"},\"publishCiphertextOutput(uint256,bytes,bytes)\":{\"notice\":\"This function should be called to publish output data for an Encrypted Execution Environment (E3).\"},\"publishInput(uint256,bytes)\":{\"notice\":\"This function should be called to publish input data for Encrypted Execution Environment (E3).\"},\"publishPlaintextOutput(uint256,bytes,bytes)\":{\"notice\":\"This function publishes the plaintext output of an Encrypted Execution Environment (E3).\"},\"request(address,uint32[2],uint256[2],uint256,address,bytes,bytes)\":{\"notice\":\"This function should be called to request a computation within an Encrypted Execution Environment (E3).\"},\"setMaxDuration(uint256)\":{\"notice\":\"This function should be called to set the maximum duration of requested computations.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Enclave.sol\":\"Enclave\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"@zk-kit/lean-imt.sol/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.4;\\n\\nuint256 constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\",\"keccak256\":\"0xb1944a1d9f63069b2f22260935adb2d11546f82fbb7d12d853a90134a92f4b5b\",\"license\":\"UNLICENSED\"},\"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {PoseidonT3} from \\\"poseidon-solidity/PoseidonT3.sol\\\";\\nimport {SNARK_SCALAR_FIELD} from \\\"./Constants.sol\\\";\\n\\nstruct LeanIMTData {\\n // Tracks the current number of leaves in the tree.\\n uint256 size;\\n // Represents the current depth of the tree, which can increase as new leaves are inserted.\\n uint256 depth;\\n // A mapping from each level of the tree to the node value of the last even position at that level.\\n // Used for efficient inserts, updates and root calculations.\\n mapping(uint256 => uint256) sideNodes;\\n // A mapping from leaf values to their respective indices in the tree.\\n // This facilitates checks for leaf existence and retrieval of leaf positions.\\n mapping(uint256 => uint256) leaves;\\n}\\n\\nerror WrongSiblingNodes();\\nerror LeafGreaterThanSnarkScalarField();\\nerror LeafCannotBeZero();\\nerror LeafAlreadyExists();\\nerror LeafDoesNotExist();\\n\\n/// @title Lean Incremental binary Merkle tree.\\n/// @dev The LeanIMT is an optimized version of the BinaryIMT.\\n/// This implementation eliminates the use of zeroes, and make the tree depth dynamic.\\n/// When a node doesn't have the right child, instead of using a zero hash as in the BinaryIMT,\\n/// the node's value becomes that of its left child. Furthermore, rather than utilizing a static tree depth,\\n/// it is updated based on the number of leaves in the tree. This approach\\n/// results in the calculation of significantly fewer hashes, making the tree more efficient.\\nlibrary InternalLeanIMT {\\n /// @dev Inserts a new leaf into the incremental merkle tree.\\n /// The function ensures that the leaf is valid according to the\\n /// constraints of the tree and then updates the tree's structure accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the new leaf to be inserted into the tree.\\n /// @return The new hash of the node after the leaf has been inserted.\\n function _insert(LeanIMTData storage self, uint256 leaf) internal returns (uint256) {\\n if (leaf >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (leaf == 0) {\\n revert LeafCannotBeZero();\\n } else if (_has(self, leaf)) {\\n revert LeafAlreadyExists();\\n }\\n\\n uint256 index = self.size;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n // A new insertion can increase a tree's depth by at most 1,\\n // and only if the number of leaves supported by the current\\n // depth is less than the number of leaves to be supported after insertion.\\n if (2 ** treeDepth < index + 1) {\\n ++treeDepth;\\n }\\n\\n self.depth = treeDepth;\\n\\n uint256 node = leaf;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n if ((index >> level) & 1 == 1) {\\n node = PoseidonT3.hash([self.sideNodes[level], node]);\\n } else {\\n self.sideNodes[level] = node;\\n }\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n self.size = ++index;\\n\\n self.sideNodes[treeDepth] = node;\\n self.leaves[leaf] = index;\\n\\n return node;\\n }\\n\\n /// @dev Inserts many leaves into the incremental merkle tree.\\n /// The function ensures that the leaves are valid according to the\\n /// constraints of the tree and then updates the tree's structure accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaves: The values of the new leaves to be inserted into the tree.\\n /// @return The root after the leaves have been inserted.\\n function _insertMany(LeanIMTData storage self, uint256[] calldata leaves) internal returns (uint256) {\\n // Cache tree size to optimize gas\\n uint256 treeSize = self.size;\\n\\n // Check that all the new values are correct to be added.\\n for (uint256 i = 0; i < leaves.length; ) {\\n if (leaves[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (leaves[i] == 0) {\\n revert LeafCannotBeZero();\\n } else if (_has(self, leaves[i])) {\\n revert LeafAlreadyExists();\\n }\\n\\n self.leaves[leaves[i]] = treeSize + 1 + i;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Array to save the nodes that will be used to create the next level of the tree.\\n uint256[] memory currentLevelNewNodes;\\n\\n currentLevelNewNodes = leaves;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n // Calculate the depth of the tree after adding the new values.\\n // Unlike the 'insert' function, we need a while here as\\n // N insertions can increase the tree's depth more than once.\\n while (2 ** treeDepth < treeSize + leaves.length) {\\n ++treeDepth;\\n }\\n\\n self.depth = treeDepth;\\n\\n // First index to change in every level.\\n uint256 currentLevelStartIndex = treeSize;\\n\\n // Size of the level used to create the next level.\\n uint256 currentLevelSize = treeSize + leaves.length;\\n\\n // The index where changes begin at the next level.\\n uint256 nextLevelStartIndex = currentLevelStartIndex >> 1;\\n\\n // The size of the next level.\\n uint256 nextLevelSize = ((currentLevelSize - 1) >> 1) + 1;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n // The number of nodes for the new level that will be created,\\n // only the new values, not the entire level.\\n uint256 numberOfNewNodes = nextLevelSize - nextLevelStartIndex;\\n uint256[] memory nextLevelNewNodes = new uint256[](numberOfNewNodes);\\n for (uint256 i = 0; i < numberOfNewNodes; ) {\\n uint256 leftNode;\\n\\n // Assign the left node using the saved path or the position in the array.\\n if ((i + nextLevelStartIndex) * 2 < currentLevelStartIndex) {\\n leftNode = self.sideNodes[level];\\n } else {\\n leftNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 - currentLevelStartIndex];\\n }\\n\\n uint256 rightNode;\\n\\n // Assign the right node if the value exists.\\n if ((i + nextLevelStartIndex) * 2 + 1 < currentLevelSize) {\\n rightNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 + 1 - currentLevelStartIndex];\\n }\\n\\n uint256 parentNode;\\n\\n // Assign the parent node.\\n // If it has a right child the result will be the hash(leftNode, rightNode) if not,\\n // it will be the leftNode.\\n if (rightNode != 0) {\\n parentNode = PoseidonT3.hash([leftNode, rightNode]);\\n } else {\\n parentNode = leftNode;\\n }\\n\\n nextLevelNewNodes[i] = parentNode;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Update the `sideNodes` variable.\\n // If `currentLevelSize` is odd, the saved value will be the last value of the array\\n // if it is even and there are more than 1 element in `currentLevelNewNodes`, the saved value\\n // will be the value before the last one.\\n // If it is even and there is only one element, there is no need to save anything because\\n // the correct value for this level was already saved before.\\n if (currentLevelSize & 1 == 1) {\\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 1];\\n } else if (currentLevelNewNodes.length > 1) {\\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 2];\\n }\\n\\n currentLevelStartIndex = nextLevelStartIndex;\\n\\n // Calculate the next level startIndex value.\\n // It is the position of the parent node which is pos/2.\\n nextLevelStartIndex >>= 1;\\n\\n // Update the next array that will be used to calculate the next level.\\n currentLevelNewNodes = nextLevelNewNodes;\\n\\n currentLevelSize = nextLevelSize;\\n\\n // Calculate the size of the next level.\\n // The size of the next level is (currentLevelSize - 1) / 2 + 1.\\n nextLevelSize = ((nextLevelSize - 1) >> 1) + 1;\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n // Update tree size\\n self.size = treeSize + leaves.length;\\n\\n // Update tree root\\n self.sideNodes[treeDepth] = currentLevelNewNodes[0];\\n\\n return currentLevelNewNodes[0];\\n }\\n\\n /// @dev Updates the value of an existing leaf and recalculates hashes\\n /// to maintain tree integrity.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param oldLeaf: The value of the leaf that is to be updated.\\n /// @param newLeaf: The new value that will replace the oldLeaf in the tree.\\n /// @param siblingNodes: An array of sibling nodes that are necessary to recalculate the path to the root.\\n /// @return The new hash of the updated node after the leaf has been updated.\\n function _update(\\n LeanIMTData storage self,\\n uint256 oldLeaf,\\n uint256 newLeaf,\\n uint256[] calldata siblingNodes\\n ) internal returns (uint256) {\\n if (newLeaf >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n } else if (!_has(self, oldLeaf)) {\\n revert LeafDoesNotExist();\\n } else if (_has(self, newLeaf)) {\\n revert LeafAlreadyExists();\\n }\\n\\n uint256 index = _indexOf(self, oldLeaf);\\n uint256 node = newLeaf;\\n uint256 oldRoot = oldLeaf;\\n\\n uint256 lastIndex = self.size - 1;\\n uint256 i = 0;\\n\\n // Cache tree depth to optimize gas\\n uint256 treeDepth = self.depth;\\n\\n for (uint256 level = 0; level < treeDepth; ) {\\n if ((index >> level) & 1 == 1) {\\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n }\\n\\n node = PoseidonT3.hash([siblingNodes[i], node]);\\n oldRoot = PoseidonT3.hash([siblingNodes[i], oldRoot]);\\n\\n unchecked {\\n ++i;\\n }\\n } else {\\n if (index >> level != lastIndex >> level) {\\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\\n revert LeafGreaterThanSnarkScalarField();\\n }\\n\\n node = PoseidonT3.hash([node, siblingNodes[i]]);\\n oldRoot = PoseidonT3.hash([oldRoot, siblingNodes[i]]);\\n\\n unchecked {\\n ++i;\\n }\\n } else {\\n self.sideNodes[i] = node;\\n }\\n }\\n\\n unchecked {\\n ++level;\\n }\\n }\\n\\n if (oldRoot != _root(self)) {\\n revert WrongSiblingNodes();\\n }\\n\\n self.sideNodes[treeDepth] = node;\\n\\n if (newLeaf != 0) {\\n self.leaves[newLeaf] = self.leaves[oldLeaf];\\n }\\n\\n self.leaves[oldLeaf] = 0;\\n\\n return node;\\n }\\n\\n /// @dev Removes a leaf from the tree by setting its value to zero.\\n /// This function utilizes the update function to set the leaf's value\\n /// to zero and update the tree's state accordingly.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param oldLeaf: The value of the leaf to be removed.\\n /// @param siblingNodes: An array of sibling nodes required for updating the path to the root after removal.\\n /// @return The new root hash of the tree after the leaf has been removed.\\n function _remove(\\n LeanIMTData storage self,\\n uint256 oldLeaf,\\n uint256[] calldata siblingNodes\\n ) internal returns (uint256) {\\n return _update(self, oldLeaf, 0, siblingNodes);\\n }\\n\\n /// @dev Checks if a leaf exists in the tree.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the leaf to check for existence.\\n /// @return A boolean value indicating whether the leaf exists in the tree.\\n function _has(LeanIMTData storage self, uint256 leaf) internal view returns (bool) {\\n return self.leaves[leaf] != 0;\\n }\\n\\n /// @dev Retrieves the index of a given leaf in the tree.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @param leaf: The value of the leaf whose index is to be found.\\n /// @return The index of the specified leaf within the tree. If the leaf is not present, the function\\n /// reverts with a custom error.\\n function _indexOf(LeanIMTData storage self, uint256 leaf) internal view returns (uint256) {\\n if (self.leaves[leaf] == 0) {\\n revert LeafDoesNotExist();\\n }\\n\\n return self.leaves[leaf] - 1;\\n }\\n\\n /// @dev Retrieves the root of the tree from the 'sideNodes' mapping using the\\n /// current tree depth.\\n /// @param self: A storage reference to the 'LeanIMTData' struct.\\n /// @return The root hash of the tree.\\n function _root(LeanIMTData storage self) internal view returns (uint256) {\\n return self.sideNodes[self.depth];\\n }\\n}\\n\",\"keccak256\":\"0x6385ce9153d11d9824163464193d4ba3dd304e662dccd365ba2fc381a359762b\",\"license\":\"MIT\"},\"contracts/Enclave.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IEnclave, E3, IE3Program } from \\\"./interfaces/IEnclave.sol\\\";\\nimport { ICiphernodeRegistry } from \\\"./interfaces/ICiphernodeRegistry.sol\\\";\\nimport { IInputValidator } from \\\"./interfaces/IInputValidator.sol\\\";\\nimport { IDecryptionVerifier } from \\\"./interfaces/IDecryptionVerifier.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {\\n InternalLeanIMT,\\n LeanIMTData,\\n PoseidonT3\\n} from \\\"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\\\";\\n\\ncontract Enclave is IEnclave, OwnableUpgradeable {\\n using InternalLeanIMT for LeanIMTData;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n ICiphernodeRegistry public ciphernodeRegistry; // address of the Ciphernode registry.\\n uint256 public maxDuration; // maximum duration of a computation in seconds.\\n uint256 public nexte3Id; // ID of the next E3.\\n uint256 public requests; // total number of requests made to Enclave.\\n\\n // Mapping of allowed E3 Programs.\\n mapping(IE3Program e3Program => bool allowed) public e3Programs;\\n\\n // Mapping of E3s.\\n mapping(uint256 e3Id => E3 e3) public e3s;\\n\\n // Mapping of input merkle trees.\\n mapping(uint256 e3Id => LeanIMTData imt) public inputs;\\n\\n // Mapping counting the number of inputs for each E3.\\n mapping(uint256 e3Id => uint256 inputCount) public inputCounts;\\n\\n // Mapping of enabled encryption schemes.\\n mapping(bytes32 encryptionSchemeId => IDecryptionVerifier decryptionVerifier)\\n public decryptionVerifiers;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeSelectionFailed();\\n error E3ProgramNotAllowed(IE3Program e3Program);\\n error E3AlreadyActivated(uint256 e3Id);\\n error E3Expired();\\n error E3NotActivated(uint256 e3Id);\\n error E3NotReady();\\n error E3DoesNotExist(uint256 e3Id);\\n error ModuleAlreadyEnabled(address module);\\n error ModuleNotEnabled(address module);\\n error InvalidEncryptionScheme(bytes32 encryptionSchemeId);\\n error InputDeadlinePassed(uint256 e3Id, uint256 expiration);\\n error InputDeadlineNotPassed(uint256 e3Id, uint256 expiration);\\n error InvalidComputationRequest(IInputValidator inputValidator);\\n error InvalidCiphernodeRegistry(ICiphernodeRegistry ciphernodeRegistry);\\n error InvalidInput();\\n error InvalidDuration(uint256 duration);\\n error InvalidOutput(bytes output);\\n error InvalidStartWindow();\\n error InvalidThreshold(uint32[2] threshold);\\n error CiphertextOutputAlreadyPublished(uint256 e3Id);\\n error CiphertextOutputNotPublished(uint256 e3Id);\\n error PaymentRequired(uint256 value);\\n error PlaintextOutputAlreadyPublished(uint256 e3Id);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @param _owner The owner of this contract\\n /// @param _maxDuration The maximum duration of a computation in seconds\\n constructor(\\n address _owner,\\n ICiphernodeRegistry _ciphernodeRegistry,\\n uint256 _maxDuration\\n ) {\\n initialize(_owner, _ciphernodeRegistry, _maxDuration);\\n }\\n\\n /// @param _owner The owner of this contract\\n /// @param _maxDuration The maximum duration of a computation in seconds\\n function initialize(\\n address _owner,\\n ICiphernodeRegistry _ciphernodeRegistry,\\n uint256 _maxDuration\\n ) public initializer {\\n __Ownable_init(msg.sender);\\n setMaxDuration(_maxDuration);\\n setCiphernodeRegistry(_ciphernodeRegistry);\\n if (_owner != owner()) transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function request(\\n address filter,\\n uint32[2] calldata threshold,\\n uint256[2] calldata startWindow,\\n uint256 duration,\\n IE3Program e3Program,\\n bytes memory e3ProgramParams,\\n bytes memory computeProviderParams\\n ) external payable returns (uint256 e3Id, E3 memory e3) {\\n // TODO: allow for other payment methods or only native tokens?\\n // TODO: should payment checks be somewhere else? Perhaps in the E3 Program or ciphernode registry?\\n require(msg.value > 0, PaymentRequired(msg.value));\\n require(\\n threshold[1] >= threshold[0] && threshold[0] > 0,\\n InvalidThreshold(threshold)\\n );\\n require(\\n // TODO: do we need a minimum start window to allow time for committee selection?\\n startWindow[1] >= startWindow[0] &&\\n startWindow[1] >= block.timestamp,\\n InvalidStartWindow()\\n );\\n require(\\n duration > 0 && duration <= maxDuration,\\n InvalidDuration(duration)\\n );\\n require(e3Programs[e3Program], E3ProgramNotAllowed(e3Program));\\n\\n // TODO: should IDs be incremental or produced deterministically?\\n e3Id = nexte3Id;\\n nexte3Id++;\\n uint256 seed = uint256(keccak256(abi.encode(block.prevrandao, e3Id)));\\n\\n (bytes32 encryptionSchemeId, IInputValidator inputValidator) = e3Program\\n .validate(e3Id, seed, e3ProgramParams, computeProviderParams);\\n IDecryptionVerifier decryptionVerifier = decryptionVerifiers[\\n encryptionSchemeId\\n ];\\n require(\\n decryptionVerifiers[encryptionSchemeId] !=\\n IDecryptionVerifier(address(0)),\\n InvalidEncryptionScheme(encryptionSchemeId)\\n );\\n require(\\n address(inputValidator) != address(0),\\n InvalidComputationRequest(inputValidator)\\n );\\n\\n e3 = E3({\\n seed: seed,\\n threshold: threshold,\\n startWindow: startWindow,\\n duration: duration,\\n expiration: 0,\\n encryptionSchemeId: encryptionSchemeId,\\n e3Program: e3Program,\\n e3ProgramParams: e3ProgramParams,\\n inputValidator: inputValidator,\\n decryptionVerifier: decryptionVerifier,\\n committeePublicKey: hex\\\"\\\",\\n ciphertextOutput: hex\\\"\\\",\\n plaintextOutput: hex\\\"\\\"\\n });\\n e3s[e3Id] = e3;\\n\\n require(\\n ciphernodeRegistry.requestCommittee(e3Id, filter, threshold),\\n CommitteeSelectionFailed()\\n );\\n\\n emit E3Requested(e3Id, e3, filter, e3Program);\\n }\\n\\n function activate(\\n uint256 e3Id,\\n bytes memory publicKey\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n\\n require(e3.expiration == 0, E3AlreadyActivated(e3Id));\\n require(e3.startWindow[0] <= block.timestamp, E3NotReady());\\n // TODO: handle what happens to the payment if the start window has passed.\\n require(e3.startWindow[1] >= block.timestamp, E3Expired());\\n\\n bytes32 publicKeyHash = ciphernodeRegistry.committeePublicKey(e3Id);\\n require(\\n keccak256(publicKey) == publicKeyHash,\\n CommitteeSelectionFailed()\\n );\\n\\n e3s[e3Id].expiration = block.timestamp + e3.duration;\\n e3s[e3Id].committeePublicKey = keccak256(publicKey);\\n\\n emit E3Activated(e3Id, e3.expiration, publicKey);\\n\\n return true;\\n }\\n\\n function publishInput(\\n uint256 e3Id,\\n bytes memory data\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n // TODO: should we have an input window, including both a start and end timestamp?\\n require(\\n e3.expiration > block.timestamp,\\n InputDeadlinePassed(e3Id, e3.expiration)\\n );\\n bytes memory input;\\n (input, success) = e3.inputValidator.validate(msg.sender, data);\\n require(success, InvalidInput());\\n uint256 inputHash = PoseidonT3.hash(\\n [uint256(keccak256(input)), inputCounts[e3Id]]\\n );\\n\\n inputCounts[e3Id]++;\\n inputs[e3Id]._insert(inputHash);\\n\\n emit InputPublished(e3Id, input, inputHash, inputCounts[e3Id] - 1);\\n }\\n\\n function publishCiphertextOutput(\\n uint256 e3Id,\\n bytes memory ciphertextOutput,\\n bytes memory proof\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n require(\\n e3.expiration <= block.timestamp,\\n InputDeadlineNotPassed(e3Id, e3.expiration)\\n );\\n // TODO: should the output verifier be able to change its mind?\\n //i.e. should we be able to call this multiple times?\\n require(\\n e3.ciphertextOutput == bytes32(0),\\n CiphertextOutputAlreadyPublished(e3Id)\\n );\\n bytes32 ciphertextOutputHash = keccak256(ciphertextOutput);\\n (success) = e3.e3Program.verify(e3Id, ciphertextOutputHash, proof);\\n require(success, InvalidOutput(ciphertextOutput));\\n e3s[e3Id].ciphertextOutput = ciphertextOutputHash;\\n\\n emit CiphertextOutputPublished(e3Id, ciphertextOutput);\\n }\\n\\n function publishPlaintextOutput(\\n uint256 e3Id,\\n bytes memory plaintextOutput,\\n bytes memory proof\\n ) external returns (bool success) {\\n E3 memory e3 = getE3(e3Id);\\n // Note: if we make 0 a no expiration, this has to be refactored\\n require(e3.expiration > 0, E3NotActivated(e3Id));\\n require(\\n e3.ciphertextOutput != bytes32(0),\\n CiphertextOutputNotPublished(e3Id)\\n );\\n require(\\n e3.plaintextOutput.length == 0,\\n PlaintextOutputAlreadyPublished(e3Id)\\n );\\n (success) = e3.decryptionVerifier.verify(\\n e3Id,\\n keccak256(plaintextOutput),\\n proof\\n );\\n require(success, InvalidOutput(plaintextOutput));\\n e3s[e3Id].plaintextOutput = plaintextOutput;\\n\\n emit PlaintextOutputPublished(e3Id, plaintextOutput);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setMaxDuration(\\n uint256 _maxDuration\\n ) public onlyOwner returns (bool success) {\\n maxDuration = _maxDuration;\\n success = true;\\n emit MaxDurationSet(_maxDuration);\\n }\\n\\n function setCiphernodeRegistry(\\n ICiphernodeRegistry _ciphernodeRegistry\\n ) public onlyOwner returns (bool success) {\\n require(\\n address(_ciphernodeRegistry) != address(0) &&\\n _ciphernodeRegistry != ciphernodeRegistry,\\n InvalidCiphernodeRegistry(_ciphernodeRegistry)\\n );\\n ciphernodeRegistry = _ciphernodeRegistry;\\n success = true;\\n emit CiphernodeRegistrySet(address(_ciphernodeRegistry));\\n }\\n\\n function enableE3Program(\\n IE3Program e3Program\\n ) public onlyOwner returns (bool success) {\\n require(\\n !e3Programs[e3Program],\\n ModuleAlreadyEnabled(address(e3Program))\\n );\\n e3Programs[e3Program] = true;\\n success = true;\\n emit E3ProgramEnabled(e3Program);\\n }\\n\\n function disableE3Program(\\n IE3Program e3Program\\n ) public onlyOwner returns (bool success) {\\n require(e3Programs[e3Program], ModuleNotEnabled(address(e3Program)));\\n delete e3Programs[e3Program];\\n success = true;\\n emit E3ProgramDisabled(e3Program);\\n }\\n\\n function setDecryptionVerifier(\\n bytes32 encryptionSchemeId,\\n IDecryptionVerifier decryptionVerifier\\n ) public onlyOwner returns (bool success) {\\n require(\\n decryptionVerifier != IDecryptionVerifier(address(0)) &&\\n decryptionVerifiers[encryptionSchemeId] != decryptionVerifier,\\n InvalidEncryptionScheme(encryptionSchemeId)\\n );\\n decryptionVerifiers[encryptionSchemeId] = decryptionVerifier;\\n success = true;\\n emit EncryptionSchemeEnabled(encryptionSchemeId);\\n }\\n\\n function disableEncryptionScheme(\\n bytes32 encryptionSchemeId\\n ) public onlyOwner returns (bool success) {\\n require(\\n decryptionVerifiers[encryptionSchemeId] !=\\n IDecryptionVerifier(address(0)),\\n InvalidEncryptionScheme(encryptionSchemeId)\\n );\\n decryptionVerifiers[encryptionSchemeId] = IDecryptionVerifier(\\n address(0)\\n );\\n success = true;\\n emit EncryptionSchemeDisabled(encryptionSchemeId);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function getE3(uint256 e3Id) public view returns (E3 memory e3) {\\n e3 = e3s[e3Id];\\n require(e3.e3Program != IE3Program(address(0)), E3DoesNotExist(e3Id));\\n }\\n\\n function getInputRoot(uint256 e3Id) public view returns (uint256) {\\n require(\\n e3s[e3Id].e3Program != IE3Program(address(0)),\\n E3DoesNotExist(e3Id)\\n );\\n return InternalLeanIMT._root(inputs[e3Id]);\\n }\\n\\n function getDecryptionVerifier(\\n bytes32 encryptionSchemeId\\n ) public view returns (IDecryptionVerifier) {\\n return decryptionVerifiers[encryptionSchemeId];\\n }\\n}\\n\",\"keccak256\":\"0x342e115d9a51a55862783fd0a0cf5cc2e9752b2b9ce94ba2741942819315a72a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/ICiphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface ICiphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a ciphernode is added to the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeAdded(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n /// @notice This event MUST be emitted when a ciphernode is removed from the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeRemoved(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n function isCiphernodeEligible(address ciphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The hash of the public key generated by the given committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKeyHash The hash of the public key of the given committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes32 publicKeyHash);\\n}\\n\",\"keccak256\":\"0xe24e6322e8c6fc83461edfbdbedb409e243f1c4e79021a74585cfe875c225aa2\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IDecryptionVerifier.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IDecryptionVerifier {\\n /// @notice This function should be called by the Enclave contract to verify the\\n /// decryption of output of a computation.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutputHash The keccak256 hash of the plaintext output to be verified.\\n /// @param proof ABI encoded proof of the given output hash.\\n /// @return success Whether or not the plaintextOutputHash was successfully verified.\\n function verify(\\n uint256 e3Id,\\n bytes32 plaintextOutputHash,\\n bytes memory proof\\n ) external view returns (bool success);\\n}\\n\",\"keccak256\":\"0xb92991a581d3c18cdc273497687ec1c6e3016674314f21fe56917aece5d10863\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IE3.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IInputValidator } from \\\"./IInputValidator.sol\\\";\\nimport { IE3Program } from \\\"./IE3Program.sol\\\";\\nimport { IDecryptionVerifier } from \\\"./IDecryptionVerifier.sol\\\";\\n\\n/// @title E3 struct\\n/// @notice This struct represents an E3 computation.\\n/// @param threshold M/N threshold for the committee.\\n/// @param startWindow Start window for the computation: index zero is minimum, index 1 is the maxium.\\n/// @param duration Duration of the E3.\\n/// @param expiration Timestamp when committee duties expire.\\n/// @param e3Program Address of the E3 Program contract.\\n/// @param computeProvider Address of the compute provider contract.\\n/// @param inputValidator Address of the input validator contract.\\n/// @param decryptionVerifier Address of the output verifier contract.\\n/// @param committeeId ID of the selected committee.\\n/// @param ciphertextOutput Encrypted output data.\\n/// @param plaintextOutput Decrypted output data.\\nstruct E3 {\\n uint256 seed;\\n uint32[2] threshold;\\n uint256[2] startWindow;\\n uint256 duration;\\n uint256 expiration;\\n bytes32 encryptionSchemeId;\\n IE3Program e3Program;\\n bytes e3ProgramParams;\\n IInputValidator inputValidator;\\n IDecryptionVerifier decryptionVerifier;\\n bytes32 committeePublicKey;\\n bytes32 ciphertextOutput;\\n bytes plaintextOutput;\\n}\\n\",\"keccak256\":\"0x6f56a756018b282743e6f1af9241cd99b33166655e1e0bde055003677132d0ba\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IE3Program.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IInputValidator } from \\\"./IInputValidator.sol\\\";\\n\\ninterface IE3Program {\\n /// @notice This function should be called by the Enclave contract to validate the computation parameters.\\n /// @param e3Id ID of the E3.\\n /// @param seed Seed for the computation.\\n /// @param e3ProgramParams ABI encoded computation parameters.\\n /// @param computeProviderParams ABI encoded compute provider parameters.\\n /// @return encryptionSchemeId ID of the encryption scheme to be used for the computation.\\n /// @return inputValidator The input validator to be used for the computation.\\n function validate(\\n uint256 e3Id,\\n uint256 seed,\\n bytes calldata e3ProgramParams,\\n bytes calldata computeProviderParams\\n )\\n external\\n returns (bytes32 encryptionSchemeId, IInputValidator inputValidator);\\n\\n /// @notice This function should be called by the Enclave contract to verify the decrypted output of an E3.\\n /// @param e3Id ID of the E3.\\n /// @param ciphertextOutputHash The keccak256 hash of output data to be verified.\\n /// @param proof ABI encoded data to verify the ciphertextOutputHash.\\n /// @return success Whether the output data is valid.\\n function verify(\\n uint256 e3Id,\\n bytes32 ciphertextOutputHash,\\n bytes memory proof\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0xd60e92b5b6498daf0b7f1238d354156c67d25c03caaaabbc601368e9e4a295b2\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IEnclave.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { E3, IE3Program } from \\\"./IE3.sol\\\";\\n\\ninterface IEnclave {\\n ////////////////////////////////////////////////////////////\\n // //\\n // Events //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\\n /// @param e3Id ID of the E3.\\n /// @param e3 Details of the E3.\\n /// @param filter Address of the pool of nodes from which the Cipher Node committee was selected.\\n /// @param e3Program Address of the Computation module selected.\\n event E3Requested(\\n uint256 e3Id,\\n E3 e3,\\n address filter,\\n IE3Program indexed e3Program\\n );\\n\\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\\n /// @param e3Id ID of the E3.\\n /// @param expiration Timestamp when committee duties expire.\\n /// @param committeePublicKey Public key of the committee.\\n event E3Activated(\\n uint256 e3Id,\\n uint256 expiration,\\n bytes committeePublicKey\\n );\\n\\n /// @notice This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is\\n /// successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded input data.\\n event InputPublished(\\n uint256 indexed e3Id,\\n bytes data,\\n uint256 inputHash,\\n uint256 index\\n );\\n\\n /// @notice This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3)\\n /// is successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutput ABI encoded plaintext output.\\n event PlaintextOutputPublished(uint256 indexed e3Id, bytes plaintextOutput);\\n\\n /// @notice This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3)\\n /// is successfully published.\\n /// @param e3Id ID of the E3.\\n /// @param ciphertextOutput ABI encoded ciphertext output.\\n event CiphertextOutputPublished(\\n uint256 indexed e3Id,\\n bytes ciphertextOutput\\n );\\n\\n /// @notice This event MUST be emitted any time the `maxDuration` is set.\\n /// @param maxDuration The maximum duration of a computation in seconds.\\n event MaxDurationSet(uint256 maxDuration);\\n\\n /// @notice This event MUST be emitted any time the CiphernodeRegistry is set.\\n /// @param ciphernodeRegistry The address of the CiphernodeRegistry contract.\\n event CiphernodeRegistrySet(address ciphernodeRegistry);\\n\\n /// @notice The event MUST be emitted any time an encryption scheme is enabled.\\n /// @param encryptionSchemeId The ID of the encryption scheme that was enabled.\\n event EncryptionSchemeEnabled(bytes32 encryptionSchemeId);\\n\\n /// @notice This event MUST be emitted any time an encryption scheme is disabled.\\n /// @param encryptionSchemeId The ID of the encryption scheme that was disabled.\\n event EncryptionSchemeDisabled(bytes32 encryptionSchemeId);\\n\\n /// @notice This event MUST be emitted any time a E3 Program is enabled.\\n /// @param e3Program The address of the E3 Program.\\n event E3ProgramEnabled(IE3Program e3Program);\\n\\n /// @notice This event MUST be emitted any time a E3 Program is disabled.\\n /// @param e3Program The address of the E3 Program.\\n event E3ProgramDisabled(IE3Program e3Program);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to request a computation within an Encrypted Execution Environment (E3).\\n /// @dev This function MUST emit the E3Requested event.\\n /// @param filter IDs of the pool of nodes from which to select the committee.\\n /// @param threshold The M/N threshold for the committee.\\n /// @param duration The duration of the computation in seconds.\\n /// @param e3Program Address of the E3 Program.\\n /// @param e3ProgramParams ABI encoded computation parameters.\\n /// @param computeProviderParams ABI encoded compute provider parameters.\\n /// @return e3Id ID of the E3.\\n /// @return e3 The E3 struct.\\n function request(\\n address filter,\\n uint32[2] calldata threshold,\\n uint256[2] calldata startWindow,\\n uint256 duration,\\n IE3Program e3Program,\\n bytes memory e3ProgramParams,\\n bytes memory computeProviderParams\\n ) external payable returns (uint256 e3Id, E3 memory e3);\\n\\n /// @notice This function should be called to activate an Encrypted Execution Environment (E3) once it has been\\n /// initialized and is ready for input.\\n /// @dev This function MUST emit the E3Activated event.\\n /// @dev This function MUST revert if the given E3 has not yet been requested.\\n /// @dev This function MUST revert if the selected node committee has not yet published a public key.\\n /// @param e3Id ID of the E3.\\n /// @param publicKey Public key of the committee.\\n /// @return success True if the E3 was successfully activated.\\n function activate(\\n uint256 e3Id,\\n bytes memory publicKey\\n ) external returns (bool success);\\n\\n /// @notice This function should be called to publish input data for Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the E3 is not yet activated.\\n /// @dev This function MUST emit the InputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param data ABI encoded input data to publish.\\n /// @return success True if the input was successfully published.\\n function publishInput(\\n uint256 e3Id,\\n bytes calldata data\\n ) external returns (bool success);\\n\\n /// @notice This function should be called to publish output data for an Encrypted Execution Environment (E3).\\n /// @dev This function MUST emit the CiphertextOutputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param ciphertextOutput ABI encoded output data to verify.\\n /// @param proof ABI encoded data to verify the ciphertextOutput.\\n /// @return success True if the output was successfully published.\\n function publishCiphertextOutput(\\n uint256 e3Id,\\n bytes memory ciphertextOutput,\\n bytes memory proof\\n ) external returns (bool success);\\n\\n /// @notice This function publishes the plaintext output of an Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the output has not been published.\\n /// @dev This function MUST emit the PlaintextOutputPublished event.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutput ABI encoded plaintext output.\\n /// @param proof ABI encoded data to verify the plaintextOutput.\\n function publishPlaintextOutput(\\n uint256 e3Id,\\n bytes memory plaintextOutput,\\n bytes memory proof\\n ) external returns (bool success);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to set the maximum duration of requested computations.\\n /// @param _maxDuration The maximum duration of a computation in seconds.\\n /// @return success True if the max duration was successfully set.\\n function setMaxDuration(\\n uint256 _maxDuration\\n ) external returns (bool success);\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n /// @notice This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\\n /// @dev This function MUST revert if the E3 does not exist.\\n /// @param e3Id ID of the E3.\\n /// @return e3 The struct representing the requested E3.\\n function getE3(uint256 e3Id) external view returns (E3 memory e3);\\n\\n /// @notice This function returns root of the input merkle tree for a given E3.\\n /// @dev This function MUST revert if the E3 does not exist.\\n /// @param e3Id ID of the E3.\\n /// @return root The root of the input merkle tree.\\n function getInputRoot(uint256 e3Id) external view returns (uint256 root);\\n}\\n\",\"keccak256\":\"0xb1c9cd24aeb1dbf988555945ae532860c8a60a874f19020e48e29c9e3e5ebb64\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IInputValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IInputValidator {\\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\\n /// @param params ABI encoded input parameters.\\n /// @return input The input data to be published.\\n /// @return success Whether the input parameters are valid.\\n function validate(\\n address sender,\\n bytes memory params\\n ) external returns (bytes memory input, bool success);\\n}\\n\",\"keccak256\":\"0xb36d367543af680b61d0ce6b2a28045f3e8fae5753e8f6ba245752609ff2bb4a\",\"license\":\"LGPL-3.0-only\"},\"poseidon-solidity/PoseidonT3.sol\":{\"content\":\"/// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.0;\\n\\nlibrary PoseidonT3 {\\n uint constant M00 = 0x109b7f411ba0e4c9b2b70caf5c36a7b194be7c11ad24378bfedb68592ba8118b;\\n uint constant M01 = 0x2969f27eed31a480b9c36c764379dbca2cc8fdd1415c3dded62940bcde0bd771;\\n uint constant M02 = 0x143021ec686a3f330d5f9e654638065ce6cd79e28c5b3753326244ee65a1b1a7;\\n uint constant M10 = 0x16ed41e13bb9c0c66ae119424fddbcbc9314dc9fdbdeea55d6c64543dc4903e0;\\n uint constant M11 = 0x2e2419f9ec02ec394c9871c832963dc1b89d743c8c7b964029b2311687b1fe23;\\n uint constant M12 = 0x176cc029695ad02582a70eff08a6fd99d057e12e58e7d7b6b16cdfabc8ee2911;\\n\\n // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40\\n // Inspired by: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js\\n function hash(uint[2] memory) public pure returns (uint) {\\n assembly {\\n let F := 21888242871839275222246405745257275088548364400416034343698204186575808495617\\n let M20 := 0x2b90bba00fca0589f617e7dcbfe82e0df706ab640ceb247b791a93b74e36736d\\n let M21 := 0x101071f0032379b697315876690f053d148d4e109f5fb065c8aacc55a0f89bfa\\n let M22 := 0x19a3fc0a56702bf417ba7fee3802593fa644470307043f7773279cd71d25d5e0\\n\\n // load the inputs from memory\\n let state1 := add(mod(mload(0x80), F), 0x00f1445235f2148c5986587169fc1bcd887b08d4d00868df5696fff40956e864)\\n let state2 := add(mod(mload(0xa0), F), 0x08dff3487e8ac99e1f29a058d0fa80b930c728730b7ab36ce879f3890ecf73f5)\\n let scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(\\n 0x2f27be690fdaee46c3ce28f7532b13c856c35342c84bda6e20966310fadc01d0,\\n add(add(15452833169820924772166449970675545095234312153403844297388521437673434406763, mulmod(state1, M10, F)), mulmod(state2, M20, F))\\n )\\n let scratch1 := add(\\n 0x2b2ae1acf68b7b8d2416bebf3d4f6234b763fe04b8043ee48b8327bebca16cf2,\\n add(add(18674271267752038776579386132900109523609358935013267566297499497165104279117, mulmod(state1, M11, F)), mulmod(state2, M21, F))\\n )\\n let scratch2 := add(\\n 0x0319d062072bef7ecca5eac06f97d4d55952c175ab6b03eae64b44c7dbf11cfa,\\n add(add(14817777843080276494683266178512808687156649753153012854386334860566696099579, mulmod(state1, M12, F)), mulmod(state2, M22, F))\\n )\\n let state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x28813dcaebaeaa828a376df87af4a63bc8b7bf27ad49c6298ef7b387bf28526d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2727673b2ccbc903f181bf38e1c1d40d2033865200c352bc150928adddf9cb78, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x234ec45ca27727c2e74abd2b2a1494cd6efbd43e340587d6b8fb9e31e65cc632, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(0x15b52534031ae18f7f862cb2cf7cf760ab10a8150a337b1ccd99ff6e8797d428, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0dc8fad6d9e4b35f5ed9a3d186b79ce38e0e8a8d1b58b132d701d4eecf68d1f6, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1bcd95ffc211fbca600f705fad3fb567ea4eb378f62e1fec97805518a47e4d9c, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x10520b0ab721cadfe9eff81b016fc34dc76da36c2578937817cb978d069de559, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1f6d48149b8e7f7d9b257d8ed5fbbaf42932498075fed0ace88a9eb81f5627f6, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1d9655f652309014d29e00ef35a2089bfff8dc1c816f0dc9ca34bdb5460c8705, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x04df5a56ff95bcafb051f7b1cd43a99ba731ff67e47032058fe3d4185697cc7d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0672d995f8fff640151b3d290cedaf148690a10a8c8424a7f6ec282b6e4be828, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x099952b414884454b21200d7ffafdd5f0c9a9dcc06f2708e9fc1d8209b5c75b9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x052cba2255dfd00c7c483143ba8d469448e43586a9b4cd9183fd0e843a6b9fa6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0b8badee690adb8eb0bd74712b7999af82de55707251ad7716077cb93c464ddc, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x119b1590f13307af5a1ee651020c07c749c15d60683a8050b963d0a8e4b2bdd1, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x03150b7cd6d5d17b2529d36be0f67b832c4acfc884ef4ee5ce15be0bfb4a8d09, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2cc6182c5e14546e3cf1951f173912355374efb83d80898abe69cb317c9ea565, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x005032551e6378c450cfe129a404b3764218cadedac14e2b92d2cd73111bf0f9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x233237e3289baa34bb147e972ebcb9516469c399fcc069fb88f9da2cc28276b5, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x05c8f4f4ebd4a6e3c980d31674bfbe6323037f21b34ae5a4e80c2d4c24d60280, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0a7b1db13042d396ba05d818a319f25252bcf35ef3aeed91ee1f09b2590fc65b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2a73b71f9b210cf5b14296572c9d32dbf156e2b086ff47dc5df542365a404ec0, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1ac9b0417abcc9a1935107e9ffc91dc3ec18f2c4dbe7f22976a760bb5c50c460, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x12c0339ae08374823fabb076707ef479269f3e4d6cb104349015ee046dc93fc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0b7475b102a165ad7f5b18db4e1e704f52900aa3253baac68246682e56e9a28e, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x037c2849e191ca3edb1c5e49f6e8b8917c843e379366f2ea32ab3aa88d7f8448, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x05a6811f8556f014e92674661e217e9bd5206c5c93a07dc145fdb176a716346f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x29a795e7d98028946e947b75d54e9f044076e87a7b2883b47b675ef5f38bd66e, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x20439a0c84b322eb45a3857afc18f5826e8c7382c8a1585c507be199981fd22f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2e0ba8d94d9ecf4a94ec2050c7371ff1bb50f27799a84b6d4a2a6f2a0982c887, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x143fd115ce08fb27ca38eb7cce822b4517822cd2109048d2e6d0ddcca17d71c8, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0c64cbecb1c734b857968dbbdcf813cdf8611659323dbcbfc84323623be9caf1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x028a305847c683f646fca925c163ff5ae74f348d62c2b670f1426cef9403da53, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2e4ef510ff0b6fda5fa940ab4c4380f26a6bcb64d89427b824d6755b5db9e30c, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0081c95bc43384e663d79270c956ce3b8925b4f6d033b078b96384f50579400e, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2ed5f0c91cbd9749187e2fade687e05ee2491b349c039a0bba8a9f4023a0bb38, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x30509991f88da3504bbf374ed5aae2f03448a22c76234c8c990f01f33a735206, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1c3f20fd55409a53221b7c4d49a356b9f0a1119fb2067b41a7529094424ec6ad, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x10b4e7f3ab5df003049514459b6e18eec46bb2213e8e131e170887b47ddcb96c, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2a1982979c3ff7f43ddd543d891c2abddd80f804c077d775039aa3502e43adef, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1c74ee64f15e1db6feddbead56d6d55dba431ebc396c9af95cad0f1315bd5c91, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x07533ec850ba7f98eab9303cace01b4b9e4f2e8b82708cfa9c2fe45a0ae146a0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x21576b438e500449a151e4eeaf17b154285c68f42d42c1808a11abf3764c0750, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2f17c0559b8fe79608ad5ca193d62f10bce8384c815f0906743d6930836d4a9e, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x2d477e3862d07708a79e8aae946170bc9775a4201318474ae665b0b1b7e2730e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x162f5243967064c390e095577984f291afba2266c38f5abcd89be0f5b2747eab, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2b4cb233ede9ba48264ecd2c8ae50d1ad7a8596a87f29f8a7777a70092393311, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2c8fbcb2dd8573dc1dbaf8f4622854776db2eece6d85c4cf4254e7c35e03b07a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1d6f347725e4816af2ff453f0cd56b199e1b61e9f601e9ade5e88db870949da9, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x204b0c397f4ebe71ebc2d8b3df5b913df9e6ac02b68d31324cd49af5c4565529, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0c4cb9dc3c4fd8174f1149b3c63c3c2f9ecb827cd7dc25534ff8fb75bc79c502, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x174ad61a1448c899a25416474f4930301e5c49475279e0639a616ddc45bc7b54, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1a96177bcf4d8d89f759df4ec2f3cde2eaaa28c177cc0fa13a9816d49a38d2ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x066d04b24331d71cd0ef8054bc60c4ff05202c126a233c1a8242ace360b8a30a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2a4c4fc6ec0b0cf52195782871c6dd3b381cc65f72e02ad527037a62aa1bd804, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x13ab2d136ccf37d447e9f2e14a7cedc95e727f8446f6d9d7e55afc01219fd649, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1121552fca26061619d24d843dc82769c1b04fcec26f55194c2e3e869acc6a9a, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x00ef653322b13d6c889bc81715c37d77a6cd267d595c4a8909a5546c7c97cff1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0e25483e45a665208b261d8ba74051e6400c776d652595d9845aca35d8a397d3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x29f536dcb9dd7682245264659e15d88e395ac3d4dde92d8c46448db979eeba89, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2a56ef9f2c53febadfda33575dbdbd885a124e2780bbea170e456baace0fa5be, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1c8361c78eb5cf5decfb7a2d17b5c409f2ae2999a46762e8ee416240a8cb9af1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x151aff5f38b20a0fc0473089aaf0206b83e8e68a764507bfd3d0ab4be74319c5, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x04c6187e41ed881dc1b239c88f7f9d43a9f52fc8c8b6cdd1e76e47615b51f100, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x13b37bd80f4d27fb10d84331f6fb6d534b81c61ed15776449e801b7ddc9c2967, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x01a5c536273c2d9df578bfbd32c17b7a2ce3664c2a52032c9321ceb1c4e8a8e4, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2ab3561834ca73835ad05f5d7acb950b4a9a2c666b9726da832239065b7c3b02, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1d4d8ec291e720db200fe6d686c0d613acaf6af4e95d3bf69f7ed516a597b646, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x041294d2cc484d228f5784fe7919fd2bb925351240a04b711514c9c80b65af1d, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x154ac98e01708c611c4fa715991f004898f57939d126e392042971dd90e81fc6, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0b339d8acca7d4f83eedd84093aef51050b3684c88f8b0b04524563bc6ea4da4, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0955e49e6610c94254a4f84cfbab344598f0e71eaff4a7dd81ed95b50839c82e, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x06746a6156eba54426b9e22206f15abca9a6f41e6f535c6f3525401ea0654626, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0f18f5a0ecd1423c496f3820c549c27838e5790e2bd0a196ac917c7ff32077fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x04f6eeca1751f7308ac59eff5beb261e4bb563583ede7bc92a738223d6f76e13, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2b56973364c4c4f5c1a3ec4da3cdce038811eb116fb3e45bc1768d26fc0b3758, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x123769dd49d5b054dcd76b89804b1bcb8e1392b385716a5d83feb65d437f29ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2147b424fc48c80a88ee52b91169aacea989f6446471150994257b2fb01c63e9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0fdc1f58548b85701a6c5505ea332a29647e6f34ad4243c2ea54ad897cebe54d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x12373a8251fea004df68abcf0f7786d4bceff28c5dbbe0c3944f685cc0a0b1f2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x21e4f4ea5f35f85bad7ea52ff742c9e8a642756b6af44203dd8a1f35c1a90035, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x16243916d69d2ca3dfb4722224d4c462b57366492f45e90d8a81934f1bc3b147, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1efbe46dd7a578b4f66f9adbc88b4378abc21566e1a0453ca13a4159cac04ac2, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x07ea5e8537cf5dd08886020e23a7f387d468d5525be66f853b672cc96a88969a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x05a8c4f9968b8aa3b7b478a30f9a5b63650f19a75e7ce11ca9fe16c0b76c00bc, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x20f057712cc21654fbfe59bd345e8dac3f7818c701b9c7882d9d57b72a32e83f, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x04a12ededa9dfd689672f8c67fee31636dcd8e88d01d49019bd90b33eb33db69, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x27e88d8c15f37dcee44f1e5425a51decbd136ce5091a6767e49ec9544ccd101a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2feed17b84285ed9b8a5c8c5e95a41f66e096619a7703223176c41ee433de4d1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1ed7cc76edf45c7c404241420f729cf394e5942911312a0d6972b8bd53aff2b8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x15742e99b9bfa323157ff8c586f5660eac6783476144cdcadf2874be45466b1a, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1aac285387f65e82c895fc6887ddf40577107454c6ec0317284f033f27d0c785, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x25851c3c845d4790f9ddadbdb6057357832e2e7a49775f71ec75a96554d67c77, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x15a5821565cc2ec2ce78457db197edf353b7ebba2c5523370ddccc3d9f146a67, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2411d57a4813b9980efa7e31a1db5966dcf64f36044277502f15485f28c71727, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x002e6f8d6520cd4713e335b8c0b6d2e647e9a98e12f4cd2558828b5ef6cb4c9b, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2ff7bc8f4380cde997da00b616b0fcd1af8f0e91e2fe1ed7398834609e0315d2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x00b9831b948525595ee02724471bcd182e9521f6b7bb68f1e93be4febb0d3cbe, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0a2f53768b8ebf6a86913b0e57c04e011ca408648a4743a87d77adbf0c9c3512, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x00248156142fd0373a479f91ff239e960f599ff7e94be69b7f2a290305e1198d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x171d5620b87bfb1328cf8c02ab3f0c9a397196aa6a542c2350eb512a2b2bcda9, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x170a4f55536f7dc970087c7c10d6fad760c952172dd54dd99d1045e4ec34a808, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x29aba33f799fe66c2ef3134aea04336ecc37e38c1cd211ba482eca17e2dbfae1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1e9bc179a4fdd758fdd1bb1945088d47e70d114a03f6a0e8b5ba650369e64973, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1dd269799b660fad58f7f4892dfb0b5afeaad869a9c4b44f9c9e1c43bdaf8f09, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x22cdbc8b70117ad1401181d02e15459e7ccd426fe869c7c95d1dd2cb0f24af38, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x0ef042e454771c533a9f57a55c503fcefd3150f52ed94a7cd5ba93b9c7dacefd, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x11609e06ad6c8fe2f287f3036037e8851318e8b08a0359a03b304ffca62e8284, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1166d9e554616dba9e753eea427c17b7fecd58c076dfe42708b08f5b783aa9af, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2de52989431a859593413026354413db177fbf4cd2ac0b56f855a888357ee466, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x3006eb4ffc7a85819a6da492f3a8ac1df51aee5b17b8e89d74bf01cf5f71e9ad, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2af41fbb61ba8a80fdcf6fff9e3f6f422993fe8f0a4639f962344c8225145086, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x119e684de476155fe5a6b41a8ebc85db8718ab27889e85e781b214bace4827c3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1835b786e2e8925e188bea59ae363537b51248c23828f047cff784b97b3fd800, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x28201a34c594dfa34d794996c6433a20d152bac2a7905c926c40e285ab32eeb6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x083efd7a27d1751094e80fefaf78b000864c82eb571187724a761f88c22cc4e7, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0b6f88a3577199526158e61ceea27be811c16df7774dd8519e079564f61fd13b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0ec868e6d15e51d9644f66e1d6471a94589511ca00d29e1014390e6ee4254f5b, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2af33e3f866771271ac0c9b3ed2e1142ecd3e74b939cd40d00d937ab84c98591, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0b520211f904b5e7d09b5d961c6ace7734568c547dd6858b364ce5e47951f178, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0b2d722d0919a1aad8db58f10062a92ea0c56ac4270e822cca228620188a1d40, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x1f790d4d7f8cf094d980ceb37c2453e957b54a9991ca38bbe0061d1ed6e562d4, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x0171eb95dfbf7d1eaea97cd385f780150885c16235a2a6a8da92ceb01e504233, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0c2d0e3b5fd57549329bf6885da66b9b790b40defd2c8650762305381b168873, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1162fb28689c27154e5a8228b4e72b377cbcafa589e283c35d3803054407a18d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2f1459b65dee441b64ad386a91e8310f282c5a92a89e19921623ef8249711bc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x1e6ff3216b688c3d996d74367d5cd4c1bc489d46754eb712c243f70d1b53cfbb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x01ca8be73832b8d0681487d27d157802d741a6f36cdc2a0576881f9326478875, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1f7735706ffe9fc586f976d5bdf223dc680286080b10cea00b9b5de315f9650e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2522b60f4ea3307640a0c2dce041fba921ac10a3d5f096ef4745ca838285f019, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x23f0bee001b1029d5255075ddc957f833418cad4f52b6c3f8ce16c235572575b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2bc1ae8b8ddbb81fcaac2d44555ed5685d142633e9df905f66d9401093082d59, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0f9406b8296564a37304507b8dba3ed162371273a07b1fc98011fcd6ad72205f, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x2360a8eb0cc7defa67b72998de90714e17e75b174a52ee4acb126c8cd995f0a8, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x15871a5cddead976804c803cbaef255eb4815a5e96df8b006dcbbc2767f88948, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x193a56766998ee9e0a8652dd2f3b1da0362f4f54f72379544f957ccdeefb420f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x2a394a43934f86982f9be56ff4fab1703b2e63c8ad334834e4309805e777ae0f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1859954cfeb8695f3e8b635dcb345192892cd11223443ba7b4166e8876c0d142, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x04e1181763050e58013444dbcb99f1902b11bc25d90bbdca408d3819f4fed32b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0fdb253dee83869d40c335ea64de8c5bb10eb82db08b5e8b1f5e5552bfd05f23, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x058cbe8a9a5027bdaa4efb623adead6275f08686f1c08984a9d7c5bae9b4f1c0, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x1382edce9971e186497eadb1aeb1f52b23b4b83bef023ab0d15228b4cceca59a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x03464990f045c6ee0819ca51fd11b0be7f61b8eb99f14b77e1e6634601d9e8b5, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x23f7bfc8720dc296fff33b41f98ff83c6fcab4605db2eb5aaa5bc137aeb70a58, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x0a59a158e3eec2117e6e94e7f0e9decf18c3ffd5e1531a9219636158bbaf62f2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x06ec54c80381c052b58bf23b312ffd3ce2c4eba065420af8f4c23ed0075fd07b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x118872dc832e0eb5476b56648e867ec8b09340f7a7bcb1b4962f0ff9ed1f9d01, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x13d69fa127d834165ad5c7cba7ad59ed52e0b0f0e42d7fea95e1906b520921b1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x169a177f63ea681270b1c6877a73d21bde143942fb71dc55fd8a49f19f10c77b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x04ef51591c6ead97ef42f287adce40d93abeb032b922f66ffb7e9a5a7450544d, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x256e175a1dc079390ecd7ca703fb2e3b19ec61805d4f03ced5f45ee6dd0f69ec, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x30102d28636abd5fe5f2af412ff6004f75cc360d3205dd2da002813d3e2ceeb2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x10998e42dfcd3bbf1c0714bc73eb1bf40443a3fa99bef4a31fd31be182fcc792, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x193edd8e9fcf3d7625fa7d24b598a1d89f3362eaf4d582efecad76f879e36860, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x18168afd34f2d915d0368ce80b7b3347d1c7a561ce611425f2664d7aa51f0b5d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x29383c01ebd3b6ab0c017656ebe658b6a328ec77bc33626e29e2e95b33ea6111, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x10646d2f2603de39a1f4ae5e7771a64a702db6e86fb76ab600bf573f9010c711, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0beb5e07d1b27145f575f1395a55bf132f90c25b40da7b3864d0242dcb1117fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x16d685252078c133dc0d3ecad62b5c8830f95bb2e54b59abdffbf018d96fa336, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x0a6abd1d833938f33c74154e0404b4b40a555bbbec21ddfafd672dd62047f01a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1a679f5d36eb7b5c8ea12a4c2dedc8feb12dffeec450317270a6f19b34cf1860, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x0980fb233bd456c23974d50e0ebfde4726a423eada4e8f6ffbc7592e3f1b93d6, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x161b42232e61b84cbf1810af93a38fc0cece3d5628c9282003ebacb5c312c72b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0ada10a90c7f0520950f7d47a60d5e6a493f09787f1564e5d09203db47de1a0b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1a730d372310ba82320345a29ac4238ed3f07a8a2b4e121bb50ddb9af407f451, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x2c8120f268ef054f817064c369dda7ea908377feaba5c4dffbda10ef58e8c556, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1c7c8824f758753fa57c00789c684217b930e95313bcb73e6e7b8649a4968f70, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x2cd9ed31f5f8691c8e39e4077a74faa0f400ad8b491eb3f7b47b27fa3fd1cf77, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x23ff4f9d46813457cf60d92f57618399a5e022ac321ca550854ae23918a22eea, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x09945a5d147a4f66ceece6405dddd9d0af5a2c5103529407dff1ea58f180426d, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x188d9c528025d4c2b67660c6b771b90f7c7da6eaa29d3f268a6dd223ec6fc630, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x3050e37996596b7f81f68311431d8734dba7d926d3633595e0c0d8ddf4f0f47f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x15af1169396830a91600ca8102c35c426ceae5461e3f95d89d829518d30afd78, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x1da6d09885432ea9a06d9f37f873d985dae933e351466b2904284da3320d8acc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := add(0x2796ea90d269af29f5f8acf33921124e4e4fad3dbe658945e546ee411ddaa9cb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x202d7dd1da0f6b4b0325c8b3307742f01e15612ec8e9304a7cb0319e01d32d60, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x096d6790d05bb759156a952ba263d672a2d7f9c788f4c831a29dace4c0f8be5f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := add(0x054efa1f65b0fce283808965275d877b438da23ce5b13e1963798cb1447d25a4, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x1b162f83d917e93edb3308c29802deb9d8aa690113b2e14864ccf6e18e4165f1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x21e5241e12564dd6fd9f1cdd2a0de39eedfefc1466cc568ec5ceb745a0506edc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x1cfb5662e8cf5ac9226a80ee17b36abecb73ab5f87e161927b4349e10e4bdf08, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x0f21177e302a771bbae6d8d1ecb373b62c99af346220ac0129c53f666eb24100, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1671522374606992affb0dd7f71b12bec4236aede6290546bcef7e1f515c2320, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n scratch0 := add(0x0fa3ec5b9488259c2eb4cf24501bfad9be2ec9e42c5cc8ccd419d2a692cad870, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\\n scratch1 := add(0x193c0e04e0bd298357cb266c1506080ed36edce85c648cc085e8c57b1ab54bba, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\\n scratch2 := add(0x102adf8ef74735a27e9128306dcbc3c99f6f7291cd406578ce14ea2adaba68f8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\\n state0 := mulmod(scratch0, scratch0, F)\\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\\n state0 := mulmod(scratch1, scratch1, F)\\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\\n state0 := mulmod(scratch2, scratch2, F)\\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\\n state0 := add(0x0fe0af7858e49859e2a54d6f1ad945b1316aa24bfbdd23ae40a6d0cb70c3eab1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\\n state1 := add(0x216f6717bbc7dedb08536a2220843f4e2da5f1daa9ebdefde8a5ea7344798d22, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\\n state2 := add(0x1da55cc900f0d21f4a3e694391918a1b3c23b2ac773c6b3ef88e2e4228325161, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\\n scratch0 := mulmod(state0, state0, F)\\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\\n scratch0 := mulmod(state1, state1, F)\\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\\n scratch0 := mulmod(state2, state2, F)\\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\\n\\n mstore(0x0, mod(add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)), F))\\n\\n return(0, 0x20)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0102caa303bbc6690508f3615604f7730789ed990058c9513a87ccb30e4835be\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080346102a457601f61285a38819003918201601f19168301916001600160401b038311848410176102a9578084926060946040528339810103126102a45780516001600160a01b0381168082036102a45760208301516001600160a01b03811693908490036102a45760409081015160008051602061283a833981519152549182901c60ff161594916001600160401b0381168015908161029c575b6001149081610292575b159081610289575b50610278576001600160401b0319811660011760008051602061283a833981519152557fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b523552916020918761024d575b50610105610335565b61010d610335565b610116336102bf565b61011e610363565b80600155604051908152a1610131610363565b80151580610238575b1561022457600080546001600160a01b031916821790556040519081527f80052b810d39120cf6c976cca504a21703f585521dc7a41c6d241090e6c579b690602090a160008051602061281a833981519152546001600160a01b03160361020d575b506101b1575b604051612480908161039a8239f35b68ff00000000000000001960008051602061283a833981519152541660008051602061283a833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a16101a2565b61021e90610219610363565b6102bf565b3861019c565b6375ac4eb760e11b60005260045260246000fd5b506000546001600160a01b031681141561013a565b6001600160481b031916680100000000000000011760008051602061283a83398151915255386100fc565b63f92ee8a960e01b60005260046000fd5b905015386100ae565b303b1591506100a6565b87915061009c565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0316801561031f5760008051602061281a83398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff60008051602061283a8339815191525460401c161561035257565b631afcd79f60e31b60005260046000fd5b60008051602061281a833981519152546001600160a01b0316330361038457565b63118cdaa760e01b6000523360045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c80630e092fc314611b815780630ef81b2f14611b4c57806310bc628114611b4c5780631794bb3c146119265780634017daf014611846578063406ed35c146118135780634e92ec63146117855780634fc77264146116e55780635314e9fa1461155b5780636db5c8fd1461153d578063715018a6146114a45780637edcd7ab146112305780638da5cb5b146111ea5780638dcdd86b146111c357806393b58f86146109c85780639c8570c814610846578063b3c88d671461081a578063b74cb2db146107fc578063c4ccafa2146107bd578063cb6496171461079f578063cbd16872146106e6578063cf0f34c4146106c8578063d016b08d14610279578063ddef9ea114610244578063f2fde38b14610219578063fad8e111146101ec5763fd2f3d011461014557600080fd5b346101e75760203660031901126101e7576001600160a01b03610166611be6565b61016e6123eb565b1680600052600460205260ff604060002054166101d3576020817fb8d368517268f297fff00825d67d098763117d061360d31027be5b2e1a59d46792600052600482526040600020600160ff19825416179055604051908152a1602060405160018152f35b63b29d459560e01b60005260045260246000fd5b600080fd5b346101e75760203660031901126101e757602061020f61020a611be6565b612360565b6040519015158152f35b346101e75760203660031901126101e757610242610235611be6565b61023d6123eb565b6122ba565b005b346101e75760203660031901126101e75760043560005260066020526040806000206001815491015482519182526020820152f35b346101e75761028736611ef4565b61029082612016565b608081016102a18482511515612159565b51428111156106b057506102ec6000926001600160a01b0361010085940151169060405194858094819363caf9278560e01b8352336004840152604060248401526044830190611d58565b03925af18015610598576000918291610625575b50156106145761036190733333333C0A88F9BE4fd23ed0536F9B6c427e3B93602060405161032d81611c53565b835182850120815285600052600782526040600020548282015260405180958192632b0aac7f60e11b83526004830161228c565b0381845af4928315610598576000936105e0575b50836000526007602052604060002061038e8154612241565b905560008481526006602052604090207f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184106103d6576361c0541760e11b60005260046000fd5b836103ec576314b48df160e11b60005260046000fd5b83600052600381016020526040600020546105cf57805491600182019283549360ff85116104d957600182018083116104d9576001861b106105bf575b84905585916000905b8582106104ef5750509061044860039392612241565b938483556000526002820160205260406000205584600052016020526040600020558260005260076020526040600020549060001982019182116104d9577f7555a0b1b87fe36304326aed23f5c78102b63922b1141f8df7d4593eff2021dd926104c092604051938493606085526060850190611d58565b91602084015260408301520390a2602060405160018152f35b634e487b7160e01b600052601160045260246000fd5b909260018084861c16146000146105a4576020610543916040519061051382611c53565b8660005260028801835260406000205482528282015260405180938192632b0aac7f60e11b83526004830161228c565b0381855af4801561059857600090610563575b60019150935b0190610432565b6020823d8211610590575b8161057b60209383611c6f565b8101031261058d575060019051610556565b80fd5b3d915061056e565b6040513d6000823e3d90fd5b9280600191600052600286016020528460406000205561055c565b936105c990612241565b93610429565b6312c50cad60e11b60005260046000fd5b90926020823d60201161060c575b816105fb60209383611c6f565b8101031261058d5750519184610375565b3d91506105ee565b63b4fa3fb360e01b60005260046000fd5b90503d8083833e6106368183611c6f565b81019160408284031261058d57815167ffffffffffffffff81116106ac57820183601f820112156106ac5780519161066d83611e91565b9461067b6040519687611c6f565b8386526020848401011161058d5750916106a06020926106a694848088019101611d35565b01612175565b83610300565b5080fd5b8363142c294360e31b60005260045260245260446000fd5b346101e75760203660031901126101e757602061020f600435612250565b346101e75760403660031901126101e7576004356024356001600160a01b0381168091036101e7577ff4041a3f914dac3bc9bf5f003ba41f28dbb84abe42f4e07c76266f5c8ceecb699160209161073b6123eb565b801515828161077d575b61074e9161213d565b81600052600883526040600020906001600160a01b0319825416179055604051908152a1602060405160018152f35b60009081526008855260409020546001600160a01b0316821415905082610745565b346101e75760003660031901126101e7576020600254604051908152f35b346101e75760203660031901126101e7576001600160a01b036107de611be6565b166000526004602052602060ff604060002054166040519015158152f35b346101e75760003660031901126101e7576020600354604051908152f35b346101e75760203660031901126101e75760043560005260076020526020604060002054604051908152f35b346101e75761085436611f24565b9161085e81612016565b91608083016108708382511515612159565b514281116109b0575061016083015161099b5760206108bf600094956001600160a01b0360c08551858701209801511690604051968780948193632f0e1bbf60e01b83528b8a60048501612182565b03925af192831561059857600093610935575b50610928816020956109057f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade071948761219e565b8460005260058752600c6040600020015560405191829187835287830190611d58565b0390a26040519015158152f35b9392506020843d602011610993575b8161095160209383611c6f565b810103126101e7576109287f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade07191610989602096612175565b94955091506108d2565b3d9150610944565b50637eb9cea960e11b60005260045260246000fd5b826370c05fb960e11b60005260045260245260446000fd5b6101203660031901126101e7576109dd611be6565b366064116101e7573660a4116101e75760a43560c435916001600160a01b03831683036101e75760e43567ffffffffffffffff81116101e757610a24903690600401611ead565b906101043567ffffffffffffffff81116101e757610a46903690600401611ead565b90610a4f611f8f565b5034156111ae5760443563ffffffff8116908181036101e7575063ffffffff610a766121e6565b16111580611198575b1561117a57608435606435811015908161116f575b501561115e5783151580611152575b1561113d576001600160a01b038516600052600460205260ff604060002054161561111f57610b419060025493610ad985612241565b6002556040805160208101904482528783820152828152610afb606082611c6f565b5190209481518095819263530ebf1f60e11b835289600484015288602484015260806044840152610b2f6084840187611d58565b83810360031901606485015290611d58565b038160006001600160a01b038c165af19081156105985760009384926110ce575b506000848152600860205260409020546001600160a01b0390811692610b8a8685151561213d565b169081156110b95760405195610b9f87611c36565b8652604094855198610bb1878b611c6f565b6000996024815b606482106110a157505060208901528651610bd38882611c6f565b6064815b60a4821061109157505087890152606088015288608088015260a08701526001600160a01b03891660c087015260e086015261010085015261012084015284610140840152846101608401526020948251610c328782611c6f565b818152610180850152848152600586528281208451815560208501518290835b896002821061106957505050600182015583850151825b60028110611054575050606085015160048201556080850151600582015560a085015160068201556001600160a01b0360c0860151166001600160a01b036007830191166001600160a01b031982541617905560e085015180519067ffffffffffffffff8211610f9557610ce06008840154611bfc565b601f8111611023575b508890601f8311600114610fb457600d939291859183610fa9575b50508160011b916000199060031b1c19161760088201555b6001600160a01b03610100870151166001600160a01b036009830191166001600160a01b03198254161790556001600160a01b03610120870151166001600160a01b03600a830191166001600160a01b0319825416179055610140860151600b820155610160860151600c8201550161018085015180519067ffffffffffffffff8211610f95578190610daf8454611bfc565b601f8111610f5c575b508990601f8311600114610ef9578592610eee575b50508160011b916000199060031b1c19161790555b80866001600160a01b036084818454169587519485938492639ccb58d560e01b84528c60048501521697886024840152610e1e6044840161220a565b5af1908115610ee4578291610eaf575b5015610ea057507f946f75055467d027f1ad205fe58543fffb3c17cb528ffe017a0ae92e254d72f96001600160a01b03610e9c959697845191829189835260608b840152610e7f6060840189611d7d565b958784015216930390a28080519586958652850152830190611d7d565b0390f35b630d8dbe2560e01b8152600490fd5b90508681813d8311610edd575b610ec68183611c6f565b810103126106ac57610ed790612175565b88610e2e565b503d610ebc565b84513d84823e3d90fd5b015190508a80610dcd565b8486528a86209250601f198416865b8c828210610f46575050908460019594939210610f2d575b505050811b019055610de2565b015160001960f88460031b161c191690558a8080610f20565b6001859682939686015181550195019301610f08565b610f85908587528b8720601f850160051c8101918d8610610f8b575b601f0160051c01906121cf565b8b610db8565b9091508190610f78565b634e487b7160e01b84526041600452602484fd5b015190508b80610d04565b9060088401855289852091855b8b601f198616821061100d575050918391600193600d9695601f19811610610ff4575b505050811b016008820155610d1c565b015160001960f88460031b161c191690558b8080610fe4565b6001849582939585015181550194019201610fc1565b61104e906008850186528a8620601f850160051c8101918c8610610f8b57601f0160051c01906121cf565b8a610ce9565b81518382016002015590880190600101610c69565b829363ffffffff6001939451169063ffffffff8560051b92831b921b19161793019101610c52565b8135815260209182019101610bd7565b602080916110ae846121f9565b815201910190610bb8565b50633ca1cee360e11b60005260045260246000fd5b9091506040813d604011611117575b816110ea60409383611c6f565b810103126111135760208151910151936001600160a01b038516850361058d5750929088610b62565b8380fd5b3d91506110dd565b6001600160a01b038563295a6a6f60e11b6000521660045260246000fd5b836313b783af60e21b60005260045260246000fd5b50600154841115610aa3565b6308594fb760e01b60005260046000fd5b905042111586610a94565b604051633744092160e21b81526044906111966004820161220a565bfd5b5063ffffffff6111a66121e6565b161515610a7f565b638c4fcd9360e01b6000523460045260246000fd5b346101e75760003660031901126101e75760206001600160a01b0360005416604051908152f35b346101e75760003660031901126101e75760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346101e75761123e36611f24565b611249839293612016565b6112598360808301511515612159565b6101608101511561148f576101808101515161147a576112a892916001600160a01b03610120602093015116855183870120604051809681948293632f0e1bbf60e01b84528860048501612182565b03915afa9182156105985760009261143e575b506112c6838361219e565b806000526005602052600d6040600020019280519367ffffffffffffffff8511611428576020946112f78254611bfc565b601f81116113f8575b5085601f821160011461136f5791817f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca169949261092894600091611364575b508160011b916000199060031b1c19161790555b60405191829187835287830190611d58565b90508301518961133e565b601f1982169083600052806000209160005b8181106113e15750926109289492600192827f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca1699896106113c8575b5050811b019055611352565b85015160001960f88460031b161c1916905589806113bc565b91928960018192868a015181550194019201611381565b611422908360005287600020601f840160051c810191898510610f8b57601f0160051c01906121cf565b86611300565b634e487b7160e01b600052604160045260246000fd5b9091506020813d602011611472575b8161145a60209383611c6f565b810103126101e75761146b90612175565b90836112bb565b3d915061144d565b826360ec327960e01b60005260045260246000fd5b8263032c20ef60e21b60005260045260246000fd5b346101e75760003660031901126101e7576114bd6123eb565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101e75760003660031901126101e7576020600154604051908152f35b346101e75761156936611ef4565b61157282612016565b916080830180516116d0576040840180515142106116bf5760204291510151106116ae5760249360206001600160a01b036000541660405196878092630e82f3b760e41b82528760048301525afa9485156105985760009561167a575b50835194602085019586200361166957606001514201908142116104d9577f50df9e2c9fc5a7f4a07e403fa0300b88fcc8c6943bdff4b8ae71f55b7fd95f899461165b9284600052600560205260056040600020015584519020836000526005602052600b60406000200155519260405193849384526020840152606060408401526060830190611d58565b0390a1602060405160018152f35b630d8dbe2560e01b60005260046000fd5b9094506020813d6020116116a6575b8161169660209383611c6f565b810103126101e7575193856115cf565b3d9150611689565b633d82a7cd60e11b60005260046000fd5b63a0750b5160e01b60005260046000fd5b50633e26347b60e21b60005260045260246000fd5b346101e75760203660031901126101e7576001600160a01b03611706611be6565b61170e6123eb565b1680600052600460205260ff6040600020541615611771576020817f56070b80bd617fcd2f7a284861edb488830a38f9dedcd77b2cb2f4eac17743e79260005260048252604060002060ff198154169055604051908152a1602060405160018152f35b6321ac7c5f60e01b60005260045260246000fd5b346101e75760203660031901126101e7577f104eb329a192aef26eddea07c2af5ad2587792e62b37ed4045b6ba59bc5540fc60206004356117c46123eb565b80600052600882526117e6816001600160a01b0360406000205416151561213d565b806000526008825260406000206001600160a01b03198154169055604051908152a1602060405160018152f35b346101e75760203660031901126101e757610e9c611832600435612016565b604051918291602083526020830190611d7d565b346101e75760203660031901126101e757600435600052600560205260406000208054610e9c60048301549260058101546006820154916001600160a01b036007820154169261189860088301611c91565b936119016001600160a01b03600985015416956001600160a01b03600a8601541692600b860154946118d1600d600c8901549801611c91565b976040519c8d9c8d5260208d015260408c015260608b015260808a015261016060a08a0152610160890190611d58565b9460c088015260e0870152610100860152610120850152838203610140850152611d58565b346101e75760603660031901126101e75761193f611be6565b602435906001600160a01b03821682036101e7577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff821680159081611b44575b6001149081611b3a575b159081611b31575b50611b205767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055611a0f9184611ae1575b506119ed612433565b6119f5612433565b6119fe336122ba565b611a09604435612250565b50612360565b506001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b03821603611acf575b50611a5257005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b611adb9061023d6123eb565b81611a4b565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055846119e4565b63f92ee8a960e01b60005260046000fd5b905015856119a4565b303b15915061199c565b859150611992565b346101e75760203660031901126101e757600435600052600860205260206001600160a01b0360406000205416604051908152f35b346101e75760203660031901126101e757600435806000526005602052611bbb816001600160a01b03600760406000200154161515611f73565b6000526006602052600260406000206001810154600052016020526020604060002054604051908152f35b600435906001600160a01b03821682036101e757565b90600182811c92168015611c2c575b6020831014611c1657565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c0b565b6101a0810190811067ffffffffffffffff82111761142857604052565b6040810190811067ffffffffffffffff82111761142857604052565b90601f8019910116810190811067ffffffffffffffff82111761142857604052565b9060405191826000825492611ca584611bfc565b8084529360018116908115611d135750600114611ccc575b50611cca92500383611c6f565b565b90506000929192526020600020906000915b818310611cf7575050906020611cca9282010138611cbd565b6020919350806001915483858901015201910190918492611cde565b905060209250611cca94915060ff191682840152151560051b82010138611cbd565b60005b838110611d485750506000910152565b8181015183820152602001611d38565b90602091611d7181518092818552858086019101611d35565b601f01601f1916010190565b919091805183526020810151602084016000905b60028210611e75575050506040810151926000606082015b60028210611e5f575050611e5c929350606082015160a0820152608082015160c082015260a082015160e08201526001600160a01b0360c083015116610100820152610180611e0a60e08401516101e06101208501526101e0840190611d58565b926001600160a01b03610100820151166101408401526001600160a01b0361012082015116610160840152610140810151828401526101608101516101a08401520151906101c0818403910152611d58565b90565b6020806001928851815201960191019094611da9565b60208060019263ffffffff865116815201930191019091611d91565b67ffffffffffffffff811161142857601f01601f191660200190565b81601f820112156101e757803590611ec482611e91565b92611ed26040519485611c6f565b828452602083830101116101e757816000926020809301838601378301015290565b9060406003198301126101e757600435916024359067ffffffffffffffff82116101e757611e5c91600401611ead565b60606003198201126101e7576004359160243567ffffffffffffffff81116101e75782611f5391600401611ead565b916044359067ffffffffffffffff82116101e757611e5c91600401611ead565b15611f7b5750565b63cd6f4a4f60e01b60005260045260246000fd5b60405190611f9c82611c36565b6060610180836000815260408051611fb48282611c6f565b813682376020830152805190611fca8183611c6f565b8036833782015260008382015260006080820152600060a0820152600060c08201528260e082015260006101008201526000610120820152600061014082015260006101608201520152565b9061201f611f8f565b5081600052600560205260406000209160405161203b81611c36565b8354815260405163ffffffff6001860154818116835260201c166020820152612065604082611c6f565b6020820152604051600285016000825b6002821061212757505050611cca92918161209960406001600160a01b0394611c6f565b60408201526004860154606082015260058601546080820152600686015460a0820152612117600d836007890154169760c084019889526120dc60088201611c91565b60e08501528460098201541661010085015284600a82015416610120850152600b810154610140850152600c81015461016085015201611c91565b6101808201529451161515611f73565b6001602081928554815201930191019091612075565b156121455750565b6381c4951960e01b60005260045260246000fd5b156121615750565b63166b4d0360e01b60005260045260246000fd5b519081151582036101e757565b611e5c9392606092825260208201528160408201520190611d58565b156121a65750565b604051632f9f8ab960e01b8152602060048201529081906121cb906024830190611d58565b0390fd5b8181106121da575050565b600081556001016121cf565b60243563ffffffff811681036101e75790565b359063ffffffff821682036101e757565b6024906000905b6002821061221e57505050565b60208060019263ffffffff612232876121f9565b16815201930191019091612211565b60001981146104d95760010190565b60207fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b5235529161227c6123eb565b80600155604051908152a1600190565b919060408301926000905b600282106122a457505050565b6020806001928551815201930191019091612297565b6001600160a01b0316801561234a576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b03906123716123eb565b16801515806123d6575b156123c2576020817f80052b810d39120cf6c976cca504a21703f585521dc7a41c6d241090e6c579b6926001600160a01b03196000541617600055604051908152a1600190565b6375ac4eb760e11b60005260045260246000fd5b506001600160a01b036000541681141561237b565b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361241e57565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561246257565b631afcd79f60e31b60005260046000fdfea164736f6c634300081b000a9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c80630e092fc314611b815780630ef81b2f14611b4c57806310bc628114611b4c5780631794bb3c146119265780634017daf014611846578063406ed35c146118135780634e92ec63146117855780634fc77264146116e55780635314e9fa1461155b5780636db5c8fd1461153d578063715018a6146114a45780637edcd7ab146112305780638da5cb5b146111ea5780638dcdd86b146111c357806393b58f86146109c85780639c8570c814610846578063b3c88d671461081a578063b74cb2db146107fc578063c4ccafa2146107bd578063cb6496171461079f578063cbd16872146106e6578063cf0f34c4146106c8578063d016b08d14610279578063ddef9ea114610244578063f2fde38b14610219578063fad8e111146101ec5763fd2f3d011461014557600080fd5b346101e75760203660031901126101e7576001600160a01b03610166611be6565b61016e6123eb565b1680600052600460205260ff604060002054166101d3576020817fb8d368517268f297fff00825d67d098763117d061360d31027be5b2e1a59d46792600052600482526040600020600160ff19825416179055604051908152a1602060405160018152f35b63b29d459560e01b60005260045260246000fd5b600080fd5b346101e75760203660031901126101e757602061020f61020a611be6565b612360565b6040519015158152f35b346101e75760203660031901126101e757610242610235611be6565b61023d6123eb565b6122ba565b005b346101e75760203660031901126101e75760043560005260066020526040806000206001815491015482519182526020820152f35b346101e75761028736611ef4565b61029082612016565b608081016102a18482511515612159565b51428111156106b057506102ec6000926001600160a01b0361010085940151169060405194858094819363caf9278560e01b8352336004840152604060248401526044830190611d58565b03925af18015610598576000918291610625575b5015610614576103619073__$75f79a42d9bcbdbb69ad79ebd80f556f39$__602060405161032d81611c53565b835182850120815285600052600782526040600020548282015260405180958192632b0aac7f60e11b83526004830161228c565b0381845af4928315610598576000936105e0575b50836000526007602052604060002061038e8154612241565b905560008481526006602052604090207f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184106103d6576361c0541760e11b60005260046000fd5b836103ec576314b48df160e11b60005260046000fd5b83600052600381016020526040600020546105cf57805491600182019283549360ff85116104d957600182018083116104d9576001861b106105bf575b84905585916000905b8582106104ef5750509061044860039392612241565b938483556000526002820160205260406000205584600052016020526040600020558260005260076020526040600020549060001982019182116104d9577f7555a0b1b87fe36304326aed23f5c78102b63922b1141f8df7d4593eff2021dd926104c092604051938493606085526060850190611d58565b91602084015260408301520390a2602060405160018152f35b634e487b7160e01b600052601160045260246000fd5b909260018084861c16146000146105a4576020610543916040519061051382611c53565b8660005260028801835260406000205482528282015260405180938192632b0aac7f60e11b83526004830161228c565b0381855af4801561059857600090610563575b60019150935b0190610432565b6020823d8211610590575b8161057b60209383611c6f565b8101031261058d575060019051610556565b80fd5b3d915061056e565b6040513d6000823e3d90fd5b9280600191600052600286016020528460406000205561055c565b936105c990612241565b93610429565b6312c50cad60e11b60005260046000fd5b90926020823d60201161060c575b816105fb60209383611c6f565b8101031261058d5750519184610375565b3d91506105ee565b63b4fa3fb360e01b60005260046000fd5b90503d8083833e6106368183611c6f565b81019160408284031261058d57815167ffffffffffffffff81116106ac57820183601f820112156106ac5780519161066d83611e91565b9461067b6040519687611c6f565b8386526020848401011161058d5750916106a06020926106a694848088019101611d35565b01612175565b83610300565b5080fd5b8363142c294360e31b60005260045260245260446000fd5b346101e75760203660031901126101e757602061020f600435612250565b346101e75760403660031901126101e7576004356024356001600160a01b0381168091036101e7577ff4041a3f914dac3bc9bf5f003ba41f28dbb84abe42f4e07c76266f5c8ceecb699160209161073b6123eb565b801515828161077d575b61074e9161213d565b81600052600883526040600020906001600160a01b0319825416179055604051908152a1602060405160018152f35b60009081526008855260409020546001600160a01b0316821415905082610745565b346101e75760003660031901126101e7576020600254604051908152f35b346101e75760203660031901126101e7576001600160a01b036107de611be6565b166000526004602052602060ff604060002054166040519015158152f35b346101e75760003660031901126101e7576020600354604051908152f35b346101e75760203660031901126101e75760043560005260076020526020604060002054604051908152f35b346101e75761085436611f24565b9161085e81612016565b91608083016108708382511515612159565b514281116109b0575061016083015161099b5760206108bf600094956001600160a01b0360c08551858701209801511690604051968780948193632f0e1bbf60e01b83528b8a60048501612182565b03925af192831561059857600093610935575b50610928816020956109057f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade071948761219e565b8460005260058752600c6040600020015560405191829187835287830190611d58565b0390a26040519015158152f35b9392506020843d602011610993575b8161095160209383611c6f565b810103126101e7576109287f7cc27e4a5626cbc4f8ba1a927b0448de55e6a114bc87660331270c5109ade07191610989602096612175565b94955091506108d2565b3d9150610944565b50637eb9cea960e11b60005260045260246000fd5b826370c05fb960e11b60005260045260245260446000fd5b6101203660031901126101e7576109dd611be6565b366064116101e7573660a4116101e75760a43560c435916001600160a01b03831683036101e75760e43567ffffffffffffffff81116101e757610a24903690600401611ead565b906101043567ffffffffffffffff81116101e757610a46903690600401611ead565b90610a4f611f8f565b5034156111ae5760443563ffffffff8116908181036101e7575063ffffffff610a766121e6565b16111580611198575b1561117a57608435606435811015908161116f575b501561115e5783151580611152575b1561113d576001600160a01b038516600052600460205260ff604060002054161561111f57610b419060025493610ad985612241565b6002556040805160208101904482528783820152828152610afb606082611c6f565b5190209481518095819263530ebf1f60e11b835289600484015288602484015260806044840152610b2f6084840187611d58565b83810360031901606485015290611d58565b038160006001600160a01b038c165af19081156105985760009384926110ce575b506000848152600860205260409020546001600160a01b0390811692610b8a8685151561213d565b169081156110b95760405195610b9f87611c36565b8652604094855198610bb1878b611c6f565b6000996024815b606482106110a157505060208901528651610bd38882611c6f565b6064815b60a4821061109157505087890152606088015288608088015260a08701526001600160a01b03891660c087015260e086015261010085015261012084015284610140840152846101608401526020948251610c328782611c6f565b818152610180850152848152600586528281208451815560208501518290835b896002821061106957505050600182015583850151825b60028110611054575050606085015160048201556080850151600582015560a085015160068201556001600160a01b0360c0860151166001600160a01b036007830191166001600160a01b031982541617905560e085015180519067ffffffffffffffff8211610f9557610ce06008840154611bfc565b601f8111611023575b508890601f8311600114610fb457600d939291859183610fa9575b50508160011b916000199060031b1c19161760088201555b6001600160a01b03610100870151166001600160a01b036009830191166001600160a01b03198254161790556001600160a01b03610120870151166001600160a01b03600a830191166001600160a01b0319825416179055610140860151600b820155610160860151600c8201550161018085015180519067ffffffffffffffff8211610f95578190610daf8454611bfc565b601f8111610f5c575b508990601f8311600114610ef9578592610eee575b50508160011b916000199060031b1c19161790555b80866001600160a01b036084818454169587519485938492639ccb58d560e01b84528c60048501521697886024840152610e1e6044840161220a565b5af1908115610ee4578291610eaf575b5015610ea057507f946f75055467d027f1ad205fe58543fffb3c17cb528ffe017a0ae92e254d72f96001600160a01b03610e9c959697845191829189835260608b840152610e7f6060840189611d7d565b958784015216930390a28080519586958652850152830190611d7d565b0390f35b630d8dbe2560e01b8152600490fd5b90508681813d8311610edd575b610ec68183611c6f565b810103126106ac57610ed790612175565b88610e2e565b503d610ebc565b84513d84823e3d90fd5b015190508a80610dcd565b8486528a86209250601f198416865b8c828210610f46575050908460019594939210610f2d575b505050811b019055610de2565b015160001960f88460031b161c191690558a8080610f20565b6001859682939686015181550195019301610f08565b610f85908587528b8720601f850160051c8101918d8610610f8b575b601f0160051c01906121cf565b8b610db8565b9091508190610f78565b634e487b7160e01b84526041600452602484fd5b015190508b80610d04565b9060088401855289852091855b8b601f198616821061100d575050918391600193600d9695601f19811610610ff4575b505050811b016008820155610d1c565b015160001960f88460031b161c191690558b8080610fe4565b6001849582939585015181550194019201610fc1565b61104e906008850186528a8620601f850160051c8101918c8610610f8b57601f0160051c01906121cf565b8a610ce9565b81518382016002015590880190600101610c69565b829363ffffffff6001939451169063ffffffff8560051b92831b921b19161793019101610c52565b8135815260209182019101610bd7565b602080916110ae846121f9565b815201910190610bb8565b50633ca1cee360e11b60005260045260246000fd5b9091506040813d604011611117575b816110ea60409383611c6f565b810103126111135760208151910151936001600160a01b038516850361058d5750929088610b62565b8380fd5b3d91506110dd565b6001600160a01b038563295a6a6f60e11b6000521660045260246000fd5b836313b783af60e21b60005260045260246000fd5b50600154841115610aa3565b6308594fb760e01b60005260046000fd5b905042111586610a94565b604051633744092160e21b81526044906111966004820161220a565bfd5b5063ffffffff6111a66121e6565b161515610a7f565b638c4fcd9360e01b6000523460045260246000fd5b346101e75760003660031901126101e75760206001600160a01b0360005416604051908152f35b346101e75760003660031901126101e75760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b346101e75761123e36611f24565b611249839293612016565b6112598360808301511515612159565b6101608101511561148f576101808101515161147a576112a892916001600160a01b03610120602093015116855183870120604051809681948293632f0e1bbf60e01b84528860048501612182565b03915afa9182156105985760009261143e575b506112c6838361219e565b806000526005602052600d6040600020019280519367ffffffffffffffff8511611428576020946112f78254611bfc565b601f81116113f8575b5085601f821160011461136f5791817f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca169949261092894600091611364575b508160011b916000199060031b1c19161790555b60405191829187835287830190611d58565b90508301518961133e565b601f1982169083600052806000209160005b8181106113e15750926109289492600192827f02a24c3402076671e129905ba4579d884b1f94ded1c07fc03d26d11b60bca1699896106113c8575b5050811b019055611352565b85015160001960f88460031b161c1916905589806113bc565b91928960018192868a015181550194019201611381565b611422908360005287600020601f840160051c810191898510610f8b57601f0160051c01906121cf565b86611300565b634e487b7160e01b600052604160045260246000fd5b9091506020813d602011611472575b8161145a60209383611c6f565b810103126101e75761146b90612175565b90836112bb565b3d915061144d565b826360ec327960e01b60005260045260246000fd5b8263032c20ef60e21b60005260045260246000fd5b346101e75760003660031901126101e7576114bd6123eb565b60006001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101e75760003660031901126101e7576020600154604051908152f35b346101e75761156936611ef4565b61157282612016565b916080830180516116d0576040840180515142106116bf5760204291510151106116ae5760249360206001600160a01b036000541660405196878092630e82f3b760e41b82528760048301525afa9485156105985760009561167a575b50835194602085019586200361166957606001514201908142116104d9577f50df9e2c9fc5a7f4a07e403fa0300b88fcc8c6943bdff4b8ae71f55b7fd95f899461165b9284600052600560205260056040600020015584519020836000526005602052600b60406000200155519260405193849384526020840152606060408401526060830190611d58565b0390a1602060405160018152f35b630d8dbe2560e01b60005260046000fd5b9094506020813d6020116116a6575b8161169660209383611c6f565b810103126101e7575193856115cf565b3d9150611689565b633d82a7cd60e11b60005260046000fd5b63a0750b5160e01b60005260046000fd5b50633e26347b60e21b60005260045260246000fd5b346101e75760203660031901126101e7576001600160a01b03611706611be6565b61170e6123eb565b1680600052600460205260ff6040600020541615611771576020817f56070b80bd617fcd2f7a284861edb488830a38f9dedcd77b2cb2f4eac17743e79260005260048252604060002060ff198154169055604051908152a1602060405160018152f35b6321ac7c5f60e01b60005260045260246000fd5b346101e75760203660031901126101e7577f104eb329a192aef26eddea07c2af5ad2587792e62b37ed4045b6ba59bc5540fc60206004356117c46123eb565b80600052600882526117e6816001600160a01b0360406000205416151561213d565b806000526008825260406000206001600160a01b03198154169055604051908152a1602060405160018152f35b346101e75760203660031901126101e757610e9c611832600435612016565b604051918291602083526020830190611d7d565b346101e75760203660031901126101e757600435600052600560205260406000208054610e9c60048301549260058101546006820154916001600160a01b036007820154169261189860088301611c91565b936119016001600160a01b03600985015416956001600160a01b03600a8601541692600b860154946118d1600d600c8901549801611c91565b976040519c8d9c8d5260208d015260408c015260608b015260808a015261016060a08a0152610160890190611d58565b9460c088015260e0870152610100860152610120850152838203610140850152611d58565b346101e75760603660031901126101e75761193f611be6565b602435906001600160a01b03821682036101e7577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159267ffffffffffffffff821680159081611b44575b6001149081611b3a575b159081611b31575b50611b205767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055611a0f9184611ae1575b506119ed612433565b6119f5612433565b6119fe336122ba565b611a09604435612250565b50612360565b506001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b03821603611acf575b50611a5257005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b611adb9061023d6123eb565b81611a4b565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055846119e4565b63f92ee8a960e01b60005260046000fd5b905015856119a4565b303b15915061199c565b859150611992565b346101e75760203660031901126101e757600435600052600860205260206001600160a01b0360406000205416604051908152f35b346101e75760203660031901126101e757600435806000526005602052611bbb816001600160a01b03600760406000200154161515611f73565b6000526006602052600260406000206001810154600052016020526020604060002054604051908152f35b600435906001600160a01b03821682036101e757565b90600182811c92168015611c2c575b6020831014611c1657565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c0b565b6101a0810190811067ffffffffffffffff82111761142857604052565b6040810190811067ffffffffffffffff82111761142857604052565b90601f8019910116810190811067ffffffffffffffff82111761142857604052565b9060405191826000825492611ca584611bfc565b8084529360018116908115611d135750600114611ccc575b50611cca92500383611c6f565b565b90506000929192526020600020906000915b818310611cf7575050906020611cca9282010138611cbd565b6020919350806001915483858901015201910190918492611cde565b905060209250611cca94915060ff191682840152151560051b82010138611cbd565b60005b838110611d485750506000910152565b8181015183820152602001611d38565b90602091611d7181518092818552858086019101611d35565b601f01601f1916010190565b919091805183526020810151602084016000905b60028210611e75575050506040810151926000606082015b60028210611e5f575050611e5c929350606082015160a0820152608082015160c082015260a082015160e08201526001600160a01b0360c083015116610100820152610180611e0a60e08401516101e06101208501526101e0840190611d58565b926001600160a01b03610100820151166101408401526001600160a01b0361012082015116610160840152610140810151828401526101608101516101a08401520151906101c0818403910152611d58565b90565b6020806001928851815201960191019094611da9565b60208060019263ffffffff865116815201930191019091611d91565b67ffffffffffffffff811161142857601f01601f191660200190565b81601f820112156101e757803590611ec482611e91565b92611ed26040519485611c6f565b828452602083830101116101e757816000926020809301838601378301015290565b9060406003198301126101e757600435916024359067ffffffffffffffff82116101e757611e5c91600401611ead565b60606003198201126101e7576004359160243567ffffffffffffffff81116101e75782611f5391600401611ead565b916044359067ffffffffffffffff82116101e757611e5c91600401611ead565b15611f7b5750565b63cd6f4a4f60e01b60005260045260246000fd5b60405190611f9c82611c36565b6060610180836000815260408051611fb48282611c6f565b813682376020830152805190611fca8183611c6f565b8036833782015260008382015260006080820152600060a0820152600060c08201528260e082015260006101008201526000610120820152600061014082015260006101608201520152565b9061201f611f8f565b5081600052600560205260406000209160405161203b81611c36565b8354815260405163ffffffff6001860154818116835260201c166020820152612065604082611c6f565b6020820152604051600285016000825b6002821061212757505050611cca92918161209960406001600160a01b0394611c6f565b60408201526004860154606082015260058601546080820152600686015460a0820152612117600d836007890154169760c084019889526120dc60088201611c91565b60e08501528460098201541661010085015284600a82015416610120850152600b810154610140850152600c81015461016085015201611c91565b6101808201529451161515611f73565b6001602081928554815201930191019091612075565b156121455750565b6381c4951960e01b60005260045260246000fd5b156121615750565b63166b4d0360e01b60005260045260246000fd5b519081151582036101e757565b611e5c9392606092825260208201528160408201520190611d58565b156121a65750565b604051632f9f8ab960e01b8152602060048201529081906121cb906024830190611d58565b0390fd5b8181106121da575050565b600081556001016121cf565b60243563ffffffff811681036101e75790565b359063ffffffff821682036101e757565b6024906000905b6002821061221e57505050565b60208060019263ffffffff612232876121f9565b16815201930191019091612211565b60001981146104d95760010190565b60207fba0716ba1ee2ea8ecc4c64119b4537cdb42a99d82acf92af5b87607b8b5235529161227c6123eb565b80600155604051908152a1600190565b919060408301926000905b600282106122a457505050565b6020806001928551815201930191019091612297565b6001600160a01b0316801561234a576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b03906123716123eb565b16801515806123d6575b156123c2576020817f80052b810d39120cf6c976cca504a21703f585521dc7a41c6d241090e6c579b6926001600160a01b03196000541617600055604051908152a1600190565b6375ac4eb760e11b60005260045260246000fd5b506001600160a01b036000541681141561237b565b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361241e57565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561246257565b631afcd79f60e31b60005260046000fdfea164736f6c634300081b000a", + "libraries": { + "PoseidonT3": "0x3333333C0A88F9BE4fd23ed0536F9B6c427e3B93" + }, "devdoc": { "errors": { "InvalidInitialization()": [ @@ -1280,57 +1437,56 @@ ] }, "events": { - "CiphertextOutputPublished(uint256,bytes)": { + "CiphernodeRegistrySet(address)": { "params": { - "ciphertextOutput": "ABI encoded ciphertext output.", - "e3Id": "ID of the E3." + "ciphernodeRegistry": "The address of the CiphernodeRegistry contract." } }, - "ComputationModuleDisabled(address)": { + "CiphertextOutputPublished(uint256,bytes)": { "params": { - "computationModule": "The address of the computation module." + "ciphertextOutput": "ABI encoded ciphertext output.", + "e3Id": "ID of the E3." } }, - "ComputationModuleEnabled(address)": { + "E3Activated(uint256,uint256,bytes)": { "params": { - "computationModule": "The address of the computation module." + "committeePublicKey": "Public key of the committee.", + "e3Id": "ID of the E3.", + "expiration": "Timestamp when committee duties expire." } }, - "CyphernodeRegistrySet(address)": { + "E3ProgramDisabled(address)": { "params": { - "cyphernodeRegistry": "The address of the CyphernodeRegistry contract." + "e3Program": "The address of the E3 Program." } }, - "E3Activated(uint256,uint256,bytes)": { + "E3ProgramEnabled(address)": { "params": { - "committeePublicKey": "Public key of the committee.", - "e3Id": "ID of the E3.", - "expiration": "Timestamp when committee duties expire." + "e3Program": "The address of the E3 Program." } }, - "E3Requested(uint256,(uint32[2],uint256[2],uint256,uint256,address,address,address,address,bytes,bytes[],bytes,bytes),address,address,address)": { + "E3Requested(uint256,(uint256,uint32[2],uint256[2],uint256,uint256,bytes32,address,bytes,address,address,bytes32,bytes32,bytes),address,address)": { "params": { - "computationModule": "Address of the Computation module selected.", "e3": "Details of the E3.", "e3Id": "ID of the E3.", - "executionModule": "Address of the execution module selected.", - "filter": "Address of the pool of nodes from which the Cypher Node committee was selected." + "e3Program": "Address of the Computation module selected.", + "filter": "Address of the pool of nodes from which the Cipher Node committee was selected." } }, - "ExecutionModuleDisabled(address)": { + "EncryptionSchemeDisabled(bytes32)": { "params": { - "executionModule": "The address of the execution module." + "encryptionSchemeId": "The ID of the encryption scheme that was disabled." } }, - "ExecutionModuleEnabled(address)": { + "EncryptionSchemeEnabled(bytes32)": { "params": { - "executionModule": "The address of the execution module." + "encryptionSchemeId": "The ID of the encryption scheme that was enabled." } }, "Initialized(uint64)": { "details": "Triggered when the contract has been initialized or reinitialized." }, - "InputPublished(uint256,bytes)": { + "InputPublished(uint256,bytes,uint256,uint256)": { "params": { "data": "ABI encoded input data.", "e3Id": "ID of the E3." @@ -1350,10 +1506,14 @@ }, "kind": "dev", "methods": { - "activate(uint256)": { + "activate(uint256,bytes)": { "details": "This function MUST emit the E3Activated event.This function MUST revert if the given E3 has not yet been requested.This function MUST revert if the selected node committee has not yet published a public key.", "params": { - "e3Id": "ID of the E3." + "e3Id": "ID of the E3.", + "publicKey": "Public key of the committee." + }, + "returns": { + "success": "True if the E3 was successfully activated." } }, "constructor": { @@ -1371,6 +1531,15 @@ "e3": "The struct representing the requested E3." } }, + "getInputRoot(uint256)": { + "details": "This function MUST revert if the E3 does not exist.", + "params": { + "e3Id": "ID of the E3." + }, + "returns": { + "_0": "The root of the input merkle tree." + } + }, "initialize(address,address,uint256)": { "params": { "_maxDuration": "The maximum duration of a computation in seconds", @@ -1380,11 +1549,12 @@ "owner()": { "details": "Returns the address of the current owner." }, - "publishCiphertextOutput(uint256,bytes)": { + "publishCiphertextOutput(uint256,bytes,bytes)": { "details": "This function MUST emit the CiphertextOutputPublished event.", "params": { - "data": "ABI encoded output data to verify.", - "e3Id": "ID of the E3." + "ciphertextOutput": "ABI encoded output data to verify.", + "e3Id": "ID of the E3.", + "proof": "ABI encoded data to verify the ciphertextOutput." }, "returns": { "success": "True if the output was successfully published." @@ -1400,27 +1570,24 @@ "success": "True if the input was successfully published." } }, - "publishPlaintextOutput(uint256,bytes)": { + "publishPlaintextOutput(uint256,bytes,bytes)": { "details": "This function MUST revert if the output has not been published.This function MUST emit the PlaintextOutputPublished event.", "params": { - "data": "ABI encoded output data to decrypt.", - "e3Id": "ID of the E3." - }, - "returns": { - "success": "True if the output was successfully decrypted." + "e3Id": "ID of the E3.", + "plaintextOutput": "ABI encoded plaintext output.", + "proof": "ABI encoded data to verify the plaintextOutput." } }, "renounceOwnership()": { "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." }, - "request(address,uint32[2],uint256[2],uint256,address,bytes,address,bytes)": { + "request(address,uint32[2],uint256[2],uint256,address,bytes,bytes)": { "details": "This function MUST emit the E3Requested event.", "params": { - "computationModule": "Address of the computation module.", - "computationParams": "ABI encoded computation parameters.", + "computeProviderParams": "ABI encoded compute provider parameters.", "duration": "The duration of the computation in seconds.", - "emParams": "ABI encoded execution module parameters.", - "executionModule": "Address of the execution module.", + "e3Program": "Address of the E3 Program.", + "e3ProgramParams": "ABI encoded computation parameters.", "filter": "IDs of the pool of nodes from which to select the committee.", "threshold": "The M/N threshold for the committee." }, @@ -1445,31 +1612,31 @@ }, "userdoc": { "events": { + "CiphernodeRegistrySet(address)": { + "notice": "This event MUST be emitted any time the CiphernodeRegistry is set." + }, "CiphertextOutputPublished(uint256,bytes)": { "notice": "This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3) is successfully published." }, - "ComputationModuleDisabled(address)": { - "notice": "This event MUST be emitted any time a computation module is disabled." - }, - "ComputationModuleEnabled(address)": { - "notice": "This event MUST be emitted any time a computation module is enabled." - }, - "CyphernodeRegistrySet(address)": { - "notice": "This event MUST be emitted any time the CyphernodeRegistry is set." - }, "E3Activated(uint256,uint256,bytes)": { "notice": "This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated." }, - "E3Requested(uint256,(uint32[2],uint256[2],uint256,uint256,address,address,address,address,bytes,bytes[],bytes,bytes),address,address,address)": { + "E3ProgramDisabled(address)": { + "notice": "This event MUST be emitted any time a E3 Program is disabled." + }, + "E3ProgramEnabled(address)": { + "notice": "This event MUST be emitted any time a E3 Program is enabled." + }, + "E3Requested(uint256,(uint256,uint32[2],uint256[2],uint256,uint256,bytes32,address,bytes,address,address,bytes32,bytes32,bytes),address,address)": { "notice": "This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested." }, - "ExecutionModuleDisabled(address)": { - "notice": "This event MUST be emitted any time an execution module is disabled." + "EncryptionSchemeDisabled(bytes32)": { + "notice": "This event MUST be emitted any time an encryption scheme is disabled." }, - "ExecutionModuleEnabled(address)": { - "notice": "This event MUST be emitted any time an execution module is enabled." + "EncryptionSchemeEnabled(bytes32)": { + "notice": "The event MUST be emitted any time an encryption scheme is enabled." }, - "InputPublished(uint256,bytes)": { + "InputPublished(uint256,bytes,uint256,uint256)": { "notice": "This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is successfully published." }, "MaxDurationSet(uint256)": { @@ -1481,22 +1648,25 @@ }, "kind": "user", "methods": { - "activate(uint256)": { + "activate(uint256,bytes)": { "notice": "This function should be called to activate an Encrypted Execution Environment (E3) once it has been initialized and is ready for input." }, "getE3(uint256)": { "notice": "This function should be called to retrieve the details of an Encrypted Execution Environment (E3)." }, - "publishCiphertextOutput(uint256,bytes)": { + "getInputRoot(uint256)": { + "notice": "This function returns root of the input merkle tree for a given E3." + }, + "publishCiphertextOutput(uint256,bytes,bytes)": { "notice": "This function should be called to publish output data for an Encrypted Execution Environment (E3)." }, "publishInput(uint256,bytes)": { "notice": "This function should be called to publish input data for Encrypted Execution Environment (E3)." }, - "publishPlaintextOutput(uint256,bytes)": { + "publishPlaintextOutput(uint256,bytes,bytes)": { "notice": "This function publishes the plaintext output of an Encrypted Execution Environment (E3)." }, - "request(address,uint32[2],uint256[2],uint256,address,bytes,address,bytes)": { + "request(address,uint32[2],uint256[2],uint256,address,bytes,bytes)": { "notice": "This function should be called to request a computation within an Encrypted Execution Environment (E3)." }, "setMaxDuration(uint256)": { @@ -1508,15 +1678,15 @@ "storageLayout": { "storage": [ { - "astId": 516, + "astId": 1382, "contract": "contracts/Enclave.sol:Enclave", - "label": "cyphernodeRegistry", + "label": "ciphernodeRegistry", "offset": 0, "slot": "0", - "type": "t_contract(ICyphernodeRegistry)1570" + "type": "t_contract(ICiphernodeRegistry)2539" }, { - "astId": 518, + "astId": 1384, "contract": "contracts/Enclave.sol:Enclave", "label": "maxDuration", "offset": 0, @@ -1524,7 +1694,7 @@ "type": "t_uint256" }, { - "astId": 520, + "astId": 1386, "contract": "contracts/Enclave.sol:Enclave", "label": "nexte3Id", "offset": 0, @@ -1532,7 +1702,7 @@ "type": "t_uint256" }, { - "astId": 522, + "astId": 1388, "contract": "contracts/Enclave.sol:Enclave", "label": "requests", "offset": 0, @@ -1540,37 +1710,47 @@ "type": "t_uint256" }, { - "astId": 527, + "astId": 1393, "contract": "contracts/Enclave.sol:Enclave", - "label": "computationModules", + "label": "e3Programs", "offset": 0, "slot": "4", - "type": "t_mapping(t_contract(IComputationModule)1495,t_bool)" + "type": "t_mapping(t_contract(IE3Program)2649,t_bool)" }, { - "astId": 532, + "astId": 1398, "contract": "contracts/Enclave.sol:Enclave", - "label": "executionModules", + "label": "e3s", "offset": 0, "slot": "5", - "type": "t_mapping(t_contract(IExecutionModule)1802,t_bool)" + "type": "t_mapping(t_uint256,t_struct(E3)2615_storage)" }, { - "astId": 537, + "astId": 1403, "contract": "contracts/Enclave.sol:Enclave", - "label": "e3s", + "label": "inputs", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(E3)1615_storage)" + "type": "t_mapping(t_uint256,t_struct(LeanIMTData)518_storage)" + }, + { + "astId": 1407, + "contract": "contracts/Enclave.sol:Enclave", + "label": "inputCounts", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 1412, + "contract": "contracts/Enclave.sol:Enclave", + "label": "decryptionVerifiers", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_bytes32,t_contract(IDecryptionVerifier)2572)" } ], "types": { - "t_array(t_bytes_storage)dyn_storage": { - "base": "t_bytes_storage", - "encoding": "dynamic_array", - "label": "bytes[]", - "numberOfBytes": "32" - }, "t_array(t_uint256)2_storage": { "base": "t_uint256", "encoding": "inplace", @@ -1588,159 +1768,220 @@ "label": "bool", "numberOfBytes": "1" }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, "t_bytes_storage": { "encoding": "bytes", "label": "bytes", "numberOfBytes": "32" }, - "t_contract(IComputationModule)1495": { + "t_contract(ICiphernodeRegistry)2539": { "encoding": "inplace", - "label": "contract IComputationModule", + "label": "contract ICiphernodeRegistry", "numberOfBytes": "20" }, - "t_contract(ICyphernodeRegistry)1570": { + "t_contract(IDecryptionVerifier)2572": { "encoding": "inplace", - "label": "contract ICyphernodeRegistry", + "label": "contract IDecryptionVerifier", "numberOfBytes": "20" }, - "t_contract(IExecutionModule)1802": { + "t_contract(IE3Program)2649": { "encoding": "inplace", - "label": "contract IExecutionModule", + "label": "contract IE3Program", "numberOfBytes": "20" }, - "t_contract(IInputValidator)1817": { + "t_contract(IInputValidator)2846": { "encoding": "inplace", "label": "contract IInputValidator", "numberOfBytes": "20" }, - "t_contract(IOutputVerifier)1832": { - "encoding": "inplace", - "label": "contract IOutputVerifier", - "numberOfBytes": "20" - }, - "t_mapping(t_contract(IComputationModule)1495,t_bool)": { + "t_mapping(t_bytes32,t_contract(IDecryptionVerifier)2572)": { "encoding": "mapping", - "key": "t_contract(IComputationModule)1495", - "label": "mapping(contract IComputationModule => bool)", + "key": "t_bytes32", + "label": "mapping(bytes32 => contract IDecryptionVerifier)", "numberOfBytes": "32", - "value": "t_bool" + "value": "t_contract(IDecryptionVerifier)2572" }, - "t_mapping(t_contract(IExecutionModule)1802,t_bool)": { + "t_mapping(t_contract(IE3Program)2649,t_bool)": { "encoding": "mapping", - "key": "t_contract(IExecutionModule)1802", - "label": "mapping(contract IExecutionModule => bool)", + "key": "t_contract(IE3Program)2649", + "label": "mapping(contract IE3Program => bool)", "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_uint256,t_struct(E3)1615_storage)": { + "t_mapping(t_uint256,t_struct(E3)2615_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct E3)", "numberOfBytes": "32", - "value": "t_struct(E3)1615_storage" + "value": "t_struct(E3)2615_storage" + }, + "t_mapping(t_uint256,t_struct(LeanIMTData)518_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LeanIMTData)", + "numberOfBytes": "32", + "value": "t_struct(LeanIMTData)518_storage" }, - "t_struct(E3)1615_storage": { + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(E3)2615_storage": { "encoding": "inplace", "label": "struct E3", "members": [ { - "astId": 1585, + "astId": 2583, "contract": "contracts/Enclave.sol:Enclave", - "label": "threshold", + "label": "seed", "offset": 0, "slot": "0", - "type": "t_array(t_uint32)2_storage" + "type": "t_uint256" }, { - "astId": 1589, + "astId": 2587, "contract": "contracts/Enclave.sol:Enclave", - "label": "startWindow", + "label": "threshold", "offset": 0, "slot": "1", - "type": "t_array(t_uint256)2_storage" + "type": "t_array(t_uint32)2_storage" }, { - "astId": 1591, + "astId": 2591, "contract": "contracts/Enclave.sol:Enclave", - "label": "duration", + "label": "startWindow", "offset": 0, - "slot": "3", - "type": "t_uint256" + "slot": "2", + "type": "t_array(t_uint256)2_storage" }, { - "astId": 1593, + "astId": 2593, "contract": "contracts/Enclave.sol:Enclave", - "label": "expiration", + "label": "duration", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 1596, + "astId": 2595, "contract": "contracts/Enclave.sol:Enclave", - "label": "computationModule", + "label": "expiration", "offset": 0, "slot": "5", - "type": "t_contract(IComputationModule)1495" + "type": "t_uint256" }, { - "astId": 1599, + "astId": 2597, "contract": "contracts/Enclave.sol:Enclave", - "label": "executionModule", + "label": "encryptionSchemeId", "offset": 0, "slot": "6", - "type": "t_contract(IExecutionModule)1802" + "type": "t_bytes32" }, { - "astId": 1602, + "astId": 2600, "contract": "contracts/Enclave.sol:Enclave", - "label": "inputValidator", + "label": "e3Program", "offset": 0, "slot": "7", - "type": "t_contract(IInputValidator)1817" + "type": "t_contract(IE3Program)2649" }, { - "astId": 1605, + "astId": 2602, "contract": "contracts/Enclave.sol:Enclave", - "label": "outputVerifier", + "label": "e3ProgramParams", "offset": 0, "slot": "8", - "type": "t_contract(IOutputVerifier)1832" + "type": "t_bytes_storage" }, { - "astId": 1607, + "astId": 2605, "contract": "contracts/Enclave.sol:Enclave", - "label": "committeePublicKey", + "label": "inputValidator", "offset": 0, "slot": "9", - "type": "t_bytes_storage" + "type": "t_contract(IInputValidator)2846" }, { - "astId": 1610, + "astId": 2608, "contract": "contracts/Enclave.sol:Enclave", - "label": "inputs", + "label": "decryptionVerifier", "offset": 0, "slot": "10", - "type": "t_array(t_bytes_storage)dyn_storage" + "type": "t_contract(IDecryptionVerifier)2572" }, { - "astId": 1612, + "astId": 2610, "contract": "contracts/Enclave.sol:Enclave", - "label": "ciphertextOutput", + "label": "committeePublicKey", "offset": 0, "slot": "11", - "type": "t_bytes_storage" + "type": "t_bytes32" }, { - "astId": 1614, + "astId": 2612, "contract": "contracts/Enclave.sol:Enclave", - "label": "plaintextOutput", + "label": "ciphertextOutput", "offset": 0, "slot": "12", + "type": "t_bytes32" + }, + { + "astId": 2614, + "contract": "contracts/Enclave.sol:Enclave", + "label": "plaintextOutput", + "offset": 0, + "slot": "13", "type": "t_bytes_storage" } ], - "numberOfBytes": "416" + "numberOfBytes": "448" + }, + "t_struct(LeanIMTData)518_storage": { + "encoding": "inplace", + "label": "struct LeanIMTData", + "members": [ + { + "astId": 507, + "contract": "contracts/Enclave.sol:Enclave", + "label": "size", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 509, + "contract": "contracts/Enclave.sol:Enclave", + "label": "depth", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 513, + "contract": "contracts/Enclave.sol:Enclave", + "label": "sideNodes", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 517, + "contract": "contracts/Enclave.sol:Enclave", + "label": "leaves", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "numberOfBytes": "128" }, "t_uint256": { "encoding": "inplace", @@ -1754,4 +1995,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/MockComputeProvider.json b/packages/evm/deployments/sepolia/MockComputeProvider.json new file mode 100644 index 00000000..5c9c4e91 --- /dev/null +++ b/packages/evm/deployments/sepolia/MockComputeProvider.json @@ -0,0 +1,75 @@ +{ + "address": "0xA707C73146757ebe00FAcD22e96Cd9e0cCA5baC7", + "abi": [ + { + "inputs": [], + "name": "invalidParams", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "validate", + "outputs": [ + { + "internalType": "contract IDecryptionVerifier", + "name": "decryptionVerifier", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x2e08b6f5257abdd783e14d7a284626f942326f5199607c3c2d48053f2e65ca81", + "receipt": { + "to": null, + "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "contractAddress": "0xA707C73146757ebe00FAcD22e96Cd9e0cCA5baC7", + "transactionIndex": 14, + "gasUsed": "128651", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbe8adc20b70a39d1ab4a362b624f235e4634004943b801925ae5cce6ac4e4b40", + "transactionHash": "0x2e08b6f5257abdd783e14d7a284626f942326f5199607c3c2d48053f2e65ca81", + "logs": [], + "blockNumber": 6795926, + "cumulativeGasUsed": "6097635", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"invalidParams\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"contract IDecryptionVerifier\",\"name\":\"decryptionVerifier\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/MockComputeProvider.sol\":\"MockComputeProvider\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/interfaces/IComputeProvider.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IDecryptionVerifier } from \\\"./IDecryptionVerifier.sol\\\";\\n\\ninterface IComputeProvider {\\n /// @notice This function should be called by the Enclave contract to validate the compute provider parameters.\\n /// @param params ABI encoded compute provider parameters.\\n function validate(\\n uint256 e3Id,\\n uint256 seed,\\n bytes calldata params\\n ) external returns (IDecryptionVerifier decryptionVerifier);\\n}\\n\",\"keccak256\":\"0x265fea4a55770649aca73fbf4d7ccc01ba654565ec18247597b73d36dac27fe1\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IDecryptionVerifier.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IDecryptionVerifier {\\n /// @notice This function should be called by the Enclave contract to verify the\\n /// decryption of output of a computation.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutputHash The keccak256 hash of the plaintext output to be verified.\\n /// @param proof ABI encoded proof of the given output hash.\\n /// @return success Whether or not the plaintextOutputHash was successfully verified.\\n function verify(\\n uint256 e3Id,\\n bytes32 plaintextOutputHash,\\n bytes memory proof\\n ) external view returns (bool success);\\n}\\n\",\"keccak256\":\"0xb92991a581d3c18cdc273497687ec1c6e3016674314f21fe56917aece5d10863\",\"license\":\"LGPL-3.0-only\"},\"contracts/test/MockComputeProvider.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport {\\n IComputeProvider,\\n IDecryptionVerifier\\n} from \\\"../interfaces/IComputeProvider.sol\\\";\\n\\ncontract MockComputeProvider is IComputeProvider {\\n error invalidParams();\\n\\n function validate(\\n uint256,\\n uint256,\\n bytes memory params\\n ) external pure returns (IDecryptionVerifier decryptionVerifier) {\\n require(params.length == 32, invalidParams());\\n // solhint-disable no-inline-assembly\\n assembly {\\n decryptionVerifier := mload(add(params, 32))\\n }\\n (decryptionVerifier) = abi.decode(params, (IDecryptionVerifier));\\n }\\n}\\n\",\"keccak256\":\"0x129807f1fc79c9cdd1fff120a39f91f8d31826ac9a6fe4e2d714c5ee1bd367aa\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6080806040523460155761015d908161001b8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c6323e7fd591461002757600080fd5b346100ea5760603660031901126100ea5760443567ffffffffffffffff81116100ea57366023820112156100ea5780600401359067ffffffffffffffff82116100ef57604051601f8301601f19908116603f0116810167ffffffffffffffff8111828210176100ef5760405282815236602484840101116100ea5760006020846100e69560246100bf96018386013783010152610105565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b602081510361013f576020818051810103126100ea576020015173ffffffffffffffffffffffffffffffffffffffff811681036100ea5790565b63be64db2760e01b60005260046000fdfea164736f6c634300081b000a", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c6323e7fd591461002757600080fd5b346100ea5760603660031901126100ea5760443567ffffffffffffffff81116100ea57366023820112156100ea5780600401359067ffffffffffffffff82116100ef57604051601f8301601f19908116603f0116810167ffffffffffffffff8111828210176100ef5760405282815236602484840101116100ea5760006020846100e69560246100bf96018386013783010152610105565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b602081510361013f576020818051810103126100ea576020015173ffffffffffffffffffffffffffffffffffffffff811681036100ea5790565b63be64db2760e01b60005260046000fdfea164736f6c634300081b000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/MockDecryptionVerifier.json b/packages/evm/deployments/sepolia/MockDecryptionVerifier.json new file mode 100644 index 00000000..e7d160f0 --- /dev/null +++ b/packages/evm/deployments/sepolia/MockDecryptionVerifier.json @@ -0,0 +1,70 @@ +{ + "address": "0x81C00a1FD136a49FBBD8e692817b97ecB8BC2Ca8", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0xe66dc491386f471a8bfe5c1e52b6c8d96b8061d02f0259a0c8ab764ddb99cc27", + "receipt": { + "to": null, + "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "contractAddress": "0x81C00a1FD136a49FBBD8e692817b97ecB8BC2Ca8", + "transactionIndex": 7, + "gasUsed": "103723", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3ab24746f8ec38dd7f4b9ffacce99d1bc6398e146c96ef5fa3177b3632089760", + "transactionHash": "0xe66dc491386f471a8bfe5c1e52b6c8d96b8061d02f0259a0c8ab764ddb99cc27", + "logs": [], + "blockNumber": 6795927, + "cumulativeGasUsed": "2374816", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/MockDecryptionVerifier.sol\":\"MockDecryptionVerifier\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/interfaces/IDecryptionVerifier.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IDecryptionVerifier {\\n /// @notice This function should be called by the Enclave contract to verify the\\n /// decryption of output of a computation.\\n /// @param e3Id ID of the E3.\\n /// @param plaintextOutputHash The keccak256 hash of the plaintext output to be verified.\\n /// @param proof ABI encoded proof of the given output hash.\\n /// @return success Whether or not the plaintextOutputHash was successfully verified.\\n function verify(\\n uint256 e3Id,\\n bytes32 plaintextOutputHash,\\n bytes memory proof\\n ) external view returns (bool success);\\n}\\n\",\"keccak256\":\"0xb92991a581d3c18cdc273497687ec1c6e3016674314f21fe56917aece5d10863\",\"license\":\"LGPL-3.0-only\"},\"contracts/test/MockDecryptionVerifier.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IDecryptionVerifier } from \\\"../interfaces/IDecryptionVerifier.sol\\\";\\n\\ncontract MockDecryptionVerifier is IDecryptionVerifier {\\n function verify(\\n uint256,\\n bytes32,\\n bytes memory data\\n ) external pure returns (bool success) {\\n data;\\n\\n if (data.length > 0) success = true;\\n }\\n}\\n\",\"keccak256\":\"0x85a320eb4c9079cf73b32a259cd8709ad0c4475171521ab92adb2e9a863faf8d\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6080806040523460145760e9908161001a8239f35b600080fdfe60806004361015600e57600080fd5b60003560e01c632f0e1bbf14602257600080fd5b3460c157606036600319011260c15760443567ffffffffffffffff811160c1573660238201121560c15780600401359067ffffffffffffffff821160c657601f8201601f19908116603f0116830167ffffffffffffffff81118482101760c657604052818352366024838301011160c1578160009260246020930183860137830101526000905160ba575b6020906040519015158152f35b50600160ad565b600080fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c634300081b000a", + "deployedBytecode": "0x60806004361015600e57600080fd5b60003560e01c632f0e1bbf14602257600080fd5b3460c157606036600319011260c15760443567ffffffffffffffff811160c1573660238201121560c15780600401359067ffffffffffffffff821160c657601f8201601f19908116603f0116830167ffffffffffffffff81118482101760c657604052818352366024838301011160c1578160009260246020930183860137830101526000905160ba575b6020906040519015158152f35b50600160ad565b600080fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c634300081b000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/MockE3Program.json b/packages/evm/deployments/sepolia/MockE3Program.json new file mode 100644 index 00000000..8a72bce1 --- /dev/null +++ b/packages/evm/deployments/sepolia/MockE3Program.json @@ -0,0 +1,179 @@ +{ + "address": "0xD56AA6F5224181c243F7FCe8b04fE84c4dff8356", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IInputValidator", + "name": "_inputValidator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "computeProviderParams", + "type": "bytes" + } + ], + "name": "invalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "ENCRYPTION_SCHEME_ID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IInputValidator", + "name": "_inputValidator", + "type": "address" + } + ], + "name": "setInputValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "e3ProgramParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "computeProviderParams", + "type": "bytes" + } + ], + "name": "validate", + "outputs": [ + { + "internalType": "bytes32", + "name": "encryptionSchemeId", + "type": "bytes32" + }, + { + "internalType": "contract IInputValidator", + "name": "inputValidator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x5213f671f478ae29283b8c95e274dfa02dc686433394b963fcb9d82b3f1c90ea", + "receipt": { + "to": null, + "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "contractAddress": "0xD56AA6F5224181c243F7FCe8b04fE84c4dff8356", + "transactionIndex": 30, + "gasUsed": "237696", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x58088f75cc1f85e9c0cf62bae1adcebd3b4117bc97038363c1bd4ed8f7a9f57d", + "transactionHash": "0x5213f671f478ae29283b8c95e274dfa02dc686433394b963fcb9d82b3f1c90ea", + "logs": [], + "blockNumber": 6795929, + "cumulativeGasUsed": "10367369", + "status": 1, + "byzantium": true + }, + "args": [ + "0x5886DA898774c6036B0957db10d1FdA979Ae42da" + ], + "numDeployments": 1, + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IInputValidator\",\"name\":\"_inputValidator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"computeProviderParams\",\"type\":\"bytes\"}],\"name\":\"invalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ENCRYPTION_SCHEME_ID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IInputValidator\",\"name\":\"_inputValidator\",\"type\":\"address\"}],\"name\":\"setInputValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"e3ProgramParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"computeProviderParams\",\"type\":\"bytes\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"encryptionSchemeId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IInputValidator\",\"name\":\"inputValidator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/MockE3Program.sol\":\"MockE3Program\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/interfaces/IE3Program.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IInputValidator } from \\\"./IInputValidator.sol\\\";\\n\\ninterface IE3Program {\\n /// @notice This function should be called by the Enclave contract to validate the computation parameters.\\n /// @param e3Id ID of the E3.\\n /// @param seed Seed for the computation.\\n /// @param e3ProgramParams ABI encoded computation parameters.\\n /// @param computeProviderParams ABI encoded compute provider parameters.\\n /// @return encryptionSchemeId ID of the encryption scheme to be used for the computation.\\n /// @return inputValidator The input validator to be used for the computation.\\n function validate(\\n uint256 e3Id,\\n uint256 seed,\\n bytes calldata e3ProgramParams,\\n bytes calldata computeProviderParams\\n )\\n external\\n returns (bytes32 encryptionSchemeId, IInputValidator inputValidator);\\n\\n /// @notice This function should be called by the Enclave contract to verify the decrypted output of an E3.\\n /// @param e3Id ID of the E3.\\n /// @param ciphertextOutputHash The keccak256 hash of output data to be verified.\\n /// @param proof ABI encoded data to verify the ciphertextOutputHash.\\n /// @return success Whether the output data is valid.\\n function verify(\\n uint256 e3Id,\\n bytes32 ciphertextOutputHash,\\n bytes memory proof\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0xd60e92b5b6498daf0b7f1238d354156c67d25c03caaaabbc601368e9e4a295b2\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IInputValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IInputValidator {\\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\\n /// @param params ABI encoded input parameters.\\n /// @return input The input data to be published.\\n /// @return success Whether the input parameters are valid.\\n function validate(\\n address sender,\\n bytes memory params\\n ) external returns (bytes memory input, bool success);\\n}\\n\",\"keccak256\":\"0xb36d367543af680b61d0ce6b2a28045f3e8fae5753e8f6ba245752609ff2bb4a\",\"license\":\"LGPL-3.0-only\"},\"contracts/test/MockE3Program.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IE3Program, IInputValidator } from \\\"../interfaces/IE3Program.sol\\\";\\n\\ncontract MockE3Program is IE3Program {\\n error invalidParams(bytes e3ProgramParams, bytes computeProviderParams);\\n\\n bytes32 public constant ENCRYPTION_SCHEME_ID = keccak256(\\\"fhe.rs:BFV\\\");\\n\\n IInputValidator private storageInputValidator;\\n\\n constructor(IInputValidator _inputValidator) {\\n storageInputValidator = _inputValidator;\\n }\\n\\n function setInputValidator(IInputValidator _inputValidator) external {\\n storageInputValidator = _inputValidator;\\n }\\n\\n function validate(\\n uint256,\\n uint256,\\n bytes memory e3ProgramParams,\\n bytes memory computeProviderParams\\n )\\n external\\n view\\n returns (bytes32 encryptionSchemeId, IInputValidator inputValidator)\\n {\\n require(\\n computeProviderParams.length == 32,\\n invalidParams(e3ProgramParams, computeProviderParams)\\n );\\n\\n inputValidator = storageInputValidator;\\n encryptionSchemeId = ENCRYPTION_SCHEME_ID;\\n }\\n\\n function verify(\\n uint256,\\n bytes32,\\n bytes memory data\\n ) external pure returns (bool success) {\\n data;\\n if (data.length > 0) success = true;\\n }\\n}\\n\",\"keccak256\":\"0x5cf3b29857af2663e7a5944b4d60f2386d2fb54a20b97e2b7dd9239c3f702d3d\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x608034607057601f61037138819003918201601f19168301916001600160401b03831184841017607557808492602094604052833981010312607057516001600160a01b03811690819003607057600080546001600160a01b0319169190911790556040516102e5908161008c8239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c80632f0e1bbf146101c95780635d42800d1461016957806378d891871461012e5763a61d7e3e1461004857600080fd5b346101295760803660031901126101295760443567ffffffffffffffff811161012957610079903690600401610218565b60643567ffffffffffffffff811161012957610099903690600401610218565b9060208251036100eb57604073ffffffffffffffffffffffffffffffffffffffff600054168151907f2c2a814a0495f913a3a312fc4771e37552bc14f8a2d4075a08122d356f0849c682526020820152f35b610125610113926040519384936312bed5ff60e31b8552604060048601526044850190610297565b83810360031901602485015290610297565b0390fd5b600080fd5b346101295760003660031901126101295760206040517f2c2a814a0495f913a3a312fc4771e37552bc14f8a2d4075a08122d356f0849c68152f35b346101295760203660031901126101295760043573ffffffffffffffffffffffffffffffffffffffff8116809103610129577fffffffffffffffffffffffff00000000000000000000000000000000000000006000541617600055600080f35b346101295760603660031901126101295760443567ffffffffffffffff8111610129576101fa903690600401610218565b60009051610210575b6020906040519015158152f35b506001610203565b81601f820112156101295780359067ffffffffffffffff82116102815760405192601f8301601f19908116603f0116840167ffffffffffffffff811185821017610281576040528284526020838301011161012957816000926020809301838601378301015290565b634e487b7160e01b600052604160045260246000fd5b919082519283825260005b8481106102c3575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016102a256fea164736f6c634300081b000a", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c80632f0e1bbf146101c95780635d42800d1461016957806378d891871461012e5763a61d7e3e1461004857600080fd5b346101295760803660031901126101295760443567ffffffffffffffff811161012957610079903690600401610218565b60643567ffffffffffffffff811161012957610099903690600401610218565b9060208251036100eb57604073ffffffffffffffffffffffffffffffffffffffff600054168151907f2c2a814a0495f913a3a312fc4771e37552bc14f8a2d4075a08122d356f0849c682526020820152f35b610125610113926040519384936312bed5ff60e31b8552604060048601526044850190610297565b83810360031901602485015290610297565b0390fd5b600080fd5b346101295760003660031901126101295760206040517f2c2a814a0495f913a3a312fc4771e37552bc14f8a2d4075a08122d356f0849c68152f35b346101295760203660031901126101295760043573ffffffffffffffffffffffffffffffffffffffff8116809103610129577fffffffffffffffffffffffff00000000000000000000000000000000000000006000541617600055600080f35b346101295760603660031901126101295760443567ffffffffffffffff8111610129576101fa903690600401610218565b60009051610210575b6020906040519015158152f35b506001610203565b81601f820112156101295780359067ffffffffffffffff82116102815760405192601f8301601f19908116603f0116840167ffffffffffffffff811185821017610281576040528284526020838301011161012957816000926020809301838601378301015290565b634e487b7160e01b600052604160045260246000fd5b919082519283825260005b8481106102c3575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016102a256fea164736f6c634300081b000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3725, + "contract": "contracts/test/MockE3Program.sol:MockE3Program", + "label": "storageInputValidator", + "offset": 0, + "slot": "0", + "type": "t_contract(IInputValidator)2846" + } + ], + "types": { + "t_contract(IInputValidator)2846": { + "encoding": "inplace", + "label": "contract IInputValidator", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/MockInputValidator.json b/packages/evm/deployments/sepolia/MockInputValidator.json new file mode 100644 index 00000000..10745946 --- /dev/null +++ b/packages/evm/deployments/sepolia/MockInputValidator.json @@ -0,0 +1,70 @@ +{ + "address": "0x5886DA898774c6036B0957db10d1FdA979Ae42da", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "validate", + "outputs": [ + { + "internalType": "bytes", + "name": "input", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x047b00b9d4caaf80dbfb021987ef0e1cf3181b34b67059e4c59b1effa7fce6d9", + "receipt": { + "to": null, + "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", + "contractAddress": "0x5886DA898774c6036B0957db10d1FdA979Ae42da", + "transactionIndex": 13, + "gasUsed": "129617", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x866873034423d6dfb2770ddb087c5aac8ae1009cbcd084f2d9acf8bbdc62f8b6", + "transactionHash": "0x047b00b9d4caaf80dbfb021987ef0e1cf3181b34b67059e4c59b1effa7fce6d9", + "logs": [], + "blockNumber": 6795928, + "cumulativeGasUsed": "904689", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/MockInputValidator.sol\":\"MockInputValidator\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/interfaces/IInputValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IInputValidator {\\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\\n /// @param params ABI encoded input parameters.\\n /// @return input The input data to be published.\\n /// @return success Whether the input parameters are valid.\\n function validate(\\n address sender,\\n bytes memory params\\n ) external returns (bytes memory input, bool success);\\n}\\n\",\"keccak256\":\"0xb36d367543af680b61d0ce6b2a28045f3e8fae5753e8f6ba245752609ff2bb4a\",\"license\":\"LGPL-3.0-only\"},\"contracts/test/MockInputValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { IInputValidator } from \\\"../interfaces/IInputValidator.sol\\\";\\n\\ncontract MockInputValidator is IInputValidator {\\n function validate(\\n address,\\n bytes memory params\\n ) external pure returns (bytes memory input, bool success) {\\n input = params;\\n\\n if (input.length == 3) {\\n success = false;\\n } else {\\n success = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5cc01d27a2ee82ed07350b0a801146d831f9d63af9771989fb66600745d4287d\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60808060405234601557610161908161001b8239f35b600080fdfe6080600436101561000f57600080fd5b60003560e01c63caf927851461002457600080fd5b346101395760403660031901126101395760043573ffffffffffffffffffffffffffffffffffffffff8116036101395760243567ffffffffffffffff811161013957366023820112156101395780600401359067ffffffffffffffff821161013e57601f8201601f19908116603f0116830167ffffffffffffffff81118482101761013e576040528183523660248383010111610139578160009260246020930183860137830101528051600303610131576000905b60405180926040825282519283604084015260005b84811061011957505091606092600084838501015215156020830152601f80199101168101030190f35b602082820181015160608884010152869450016100ef565b6001906100da565b600080fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c634300081b000a", + "deployedBytecode": "0x6080600436101561000f57600080fd5b60003560e01c63caf927851461002457600080fd5b346101395760403660031901126101395760043573ffffffffffffffffffffffffffffffffffffffff8116036101395760243567ffffffffffffffff811161013957366023820112156101395780600401359067ffffffffffffffff821161013e57601f8201601f19908116603f0116830167ffffffffffffffff81118482101761013e576040528183523660248383010111610139578160009260246020930183860137830101528051600303610131576000905b60405180926040825282519283604084015260005b84811061011957505091606092600084838501015215156020830152601f80199101168101030190f35b602082820181015160608884010152869450016100ef565b6001906100da565b600080fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c634300081b000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/NaiveRegistryFilter.json b/packages/evm/deployments/sepolia/NaiveRegistryFilter.json index 61400ff2..5e54ac0b 100644 --- a/packages/evm/deployments/sepolia/NaiveRegistryFilter.json +++ b/packages/evm/deployments/sepolia/NaiveRegistryFilter.json @@ -1,5 +1,5 @@ { - "address": "0x4c19b2b2cE63129B494Cb0b0eCa4a2f761C649D6", + "address": "0x3fC4f037355b23bBE12F9F453E81961669562F47", "abi": [ { "inputs": [ @@ -10,7 +10,7 @@ }, { "internalType": "address", - "name": "_enclave", + "name": "_registry", "type": "address" } ], @@ -117,9 +117,45 @@ "name": "committees", "outputs": [ { - "internalType": "bytes", + "internalType": "bytes32", "name": "publicKey", - "type": "bytes" + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "e3Id", + "type": "uint256" + } + ], + "name": "getCommittee", + "outputs": [ + { + "components": [ + { + "internalType": "address[]", + "name": "nodes", + "type": "address[]" + }, + { + "internalType": "uint32[2]", + "name": "threshold", + "type": "uint32[2]" + }, + { + "internalType": "bytes32", + "name": "publicKey", + "type": "bytes32" + } + ], + "internalType": "struct NaiveRegistryFilter.Committee", + "name": "", + "type": "tuple" } ], "stateMutability": "view", @@ -250,72 +286,58 @@ "type": "function" } ], - "transactionHash": "0x3e1cd2b9beba7d5ca0540a7dc817b897998eed25f69128ab8c18e72213a607bb", + "transactionHash": "0x8f5b3fe631a244ecbbf9a43374ea17e32c7f9d63c93abe1bde4b0f9f41b343bf", "receipt": { "to": null, "from": "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", - "contractAddress": "0x4c19b2b2cE63129B494Cb0b0eCa4a2f761C649D6", - "transactionIndex": 103, - "gasUsed": "765625", - "logsBloom": "0x00000000000000000000000000000100000000000000000000800000000080000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000101000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000020000000000000000000020000000000000000000000000000000000000000000000", - "blockHash": "0x5f2631ec7ee97ddbc4d178d3d10e876979fcefde8efcb1e7be33f21c66013da9", - "transactionHash": "0x3e1cd2b9beba7d5ca0540a7dc817b897998eed25f69128ab8c18e72213a607bb", + "contractAddress": "0x3fC4f037355b23bBE12F9F453E81961669562F47", + "transactionIndex": 13, + "gasUsed": "771935", + "logsBloom": "0x00000000000000000000000000000100000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000800000000100000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000004000000000000040020000000000000000000020000000000000000000000000000000000000000000000", + "blockHash": "0x987a5a2bb8a147ce2f1bcdc79660509fb8a1b4566b3b1bad6e057ea8f6635c6e", + "transactionHash": "0x8f5b3fe631a244ecbbf9a43374ea17e32c7f9d63c93abe1bde4b0f9f41b343bf", "logs": [ { - "transactionIndex": 103, - "blockNumber": 6668292, - "transactionHash": "0x3e1cd2b9beba7d5ca0540a7dc817b897998eed25f69128ab8c18e72213a607bb", - "address": "0x4c19b2b2cE63129B494Cb0b0eCa4a2f761C649D6", + "transactionIndex": 13, + "blockNumber": 6795924, + "transactionHash": "0x8f5b3fe631a244ecbbf9a43374ea17e32c7f9d63c93abe1bde4b0f9f41b343bf", + "address": "0x3fC4f037355b23bBE12F9F453E81961669562F47", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" ], "data": "0x", - "logIndex": 154, - "blockHash": "0x5f2631ec7ee97ddbc4d178d3d10e876979fcefde8efcb1e7be33f21c66013da9" + "logIndex": 7, + "blockHash": "0x987a5a2bb8a147ce2f1bcdc79660509fb8a1b4566b3b1bad6e057ea8f6635c6e" }, { - "transactionIndex": 103, - "blockNumber": 6668292, - "transactionHash": "0x3e1cd2b9beba7d5ca0540a7dc817b897998eed25f69128ab8c18e72213a607bb", - "address": "0x4c19b2b2cE63129B494Cb0b0eCa4a2f761C649D6", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb", - "0x000000000000000000000000485e60c486671e932fd9c53d4110cdeab1e7f0eb" - ], - "data": "0x", - "logIndex": 155, - "blockHash": "0x5f2631ec7ee97ddbc4d178d3d10e876979fcefde8efcb1e7be33f21c66013da9" - }, - { - "transactionIndex": 103, - "blockNumber": 6668292, - "transactionHash": "0x3e1cd2b9beba7d5ca0540a7dc817b897998eed25f69128ab8c18e72213a607bb", - "address": "0x4c19b2b2cE63129B494Cb0b0eCa4a2f761C649D6", + "transactionIndex": 13, + "blockNumber": 6795924, + "transactionHash": "0x8f5b3fe631a244ecbbf9a43374ea17e32c7f9d63c93abe1bde4b0f9f41b343bf", + "address": "0x3fC4f037355b23bBE12F9F453E81961669562F47", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 156, - "blockHash": "0x5f2631ec7ee97ddbc4d178d3d10e876979fcefde8efcb1e7be33f21c66013da9" + "logIndex": 8, + "blockHash": "0x987a5a2bb8a147ce2f1bcdc79660509fb8a1b4566b3b1bad6e057ea8f6635c6e" } ], - "blockNumber": 6668292, - "cumulativeGasUsed": "14723279", + "blockNumber": 6795924, + "cumulativeGasUsed": "14014957", "status": 1, "byzantium": true }, "args": [ "0x485E60C486671E932fd9C53d4110cdEab1E7F0eb", - "0xF9E3aeB059D699Ac4541625DE81062d6D8ad7e85" + "0x54A68fAb10E5Ba79Bf0aB155463Bf01cD758cB35" ], "numDeployments": 1, - "solcInputHash": "d0e6e4f19028714f394c36db62dff2be", - "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_enclave\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeNotPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRegistry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3\",\"type\":\"uint256\"}],\"name\":\"committees\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"nodes\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"publishCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"requestCommittee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/registry/NaiveRegistryFilter.sol\":\"NaiveRegistryFilter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"contracts/interfaces/ICyphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface ICyphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a cyphernode is added to the registry.\\n event CyphernodeAdded(address indexed node);\\n\\n /// @notice This event MUST be emitted when a cyphernode is removed from the registry.\\n event CyphernodeRemoved(address indexed node);\\n\\n function isCyphernodeEligible(address cyphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The public key generated by the selected committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKey The public key of the committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x60af5d66db32528f5032fe083218f180ab83f3199bcf090bed7249c28bc18104\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\ninterface IRegistryFilter {\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0xec67f88f2cbf46e28d4835669ef3dd2320afe5b0324423944037c16fc3f42195\",\"license\":\"LGPL-3.0-only\"},\"contracts/registry/NaiveRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.26;\\n\\nimport { ICyphernodeRegistry } from \\\"../interfaces/ICyphernodeRegistry.sol\\\";\\nimport { IRegistryFilter } from \\\"../interfaces/IRegistryFilter.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\ncontract NaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\\n struct Committee {\\n address[] nodes;\\n uint32[2] threshold;\\n bytes publicKey;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n address public registry;\\n\\n mapping(uint256 e3 => Committee committee) public committees;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeAlreadyExists();\\n error CommitteeAlreadyPublished();\\n error CommitteeDoesNotExist();\\n error CommitteeNotPublished();\\n error OnlyRegistry();\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Modifiers //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n modifier onlyRegistry() {\\n require(msg.sender == registry, OnlyRegistry());\\n _;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n constructor(address _owner, address _enclave) {\\n initialize(_owner, _enclave);\\n }\\n\\n function initialize(address _owner, address _registry) public initializer {\\n __Ownable_init(msg.sender);\\n setRegistry(_registry);\\n transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external onlyRegistry returns (bool success) {\\n Committee storage committee = committees[e3Id];\\n require(committee.threshold.length == 0, CommitteeAlreadyExists());\\n committee.threshold = threshold;\\n success = true;\\n }\\n\\n function publishCommittee(\\n uint256 e3Id,\\n address[] memory nodes,\\n bytes memory publicKey\\n ) external onlyOwner {\\n Committee storage committee = committees[e3Id];\\n require(\\n keccak256(committee.publicKey) == keccak256(hex\\\"\\\"),\\n CommitteeAlreadyPublished()\\n );\\n committee.nodes = nodes;\\n committee.publicKey = publicKey;\\n ICyphernodeRegistry(registry).publishCommittee(\\n e3Id,\\n abi.encode(nodes),\\n publicKey\\n );\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setRegistry(address _registry) public onlyOwner {\\n registry = _registry;\\n }\\n}\\n\",\"keccak256\":\"0x1f961c7313a6d24f0c1bfc4455a461eb25d329f85fea57e08a6fc159f9960a5a\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", - "bytecode": "0x6080346101d657601f610e7c38819003918201601f19168301916001600160401b038311848410176101db5780849260409485528339810103126101d657610052602061004b836101f1565b92016101f1565b600080516020610e5c83398151915254604081901c60ff16159290916001600160401b038316801590816101ce575b60011490816101c4575b1590816101bb575b506101aa576001600160401b03198316600117600080516020610e5c8339815191525561010f928461017f575b506100c961028d565b6100d161028d565b6100da33610205565b6100e26102bb565b600080546001600160a01b0319166001600160a01b039290921691909117905561010a6102bb565b610205565b610123575b604051610b5890816103048239f35b68ff000000000000000019600080516020610e5c8339815191525416600080516020610e5c833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1610114565b6001600160481b0319166801000000000000000117600080516020610e5c83398151915255386100c0565b63f92ee8a960e01b60005260046000fd5b90501538610093565b303b15915061008b565b859150610081565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101d657565b6001600160a01b03168015610277577f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff600080516020610e5c8339815191525460401c16156102aa57565b631afcd79f60e31b60005260046000fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031633036102ee57565b63118cdaa760e01b6000523360045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c90816329f73b9c14610480575080632b20a4f614610435578063485cc9551461023d578063715018a6146101a45780637b1039991461017e5780638da5cb5b14610138578063a91ee0dc146100f9578063f2fde38b146100cc5763f5e820fd1461008457600080fd5b346100c95760203660031901126100c9576100b1600260406100c593600435815260016020522001610921565b6040519182916020835260208301906109c5565b0390f35b80fd5b50346100c95760203660031901126100c9576100f66100e96108cc565b6100f1610ac3565b610a1d565b80f35b50346100c95760203660031901126100c9576001600160a01b0361011b6108cc565b610123610ac3565b166001600160a01b0319600054161760005580f35b50346100c957806003193601126100c95760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b50346100c957806003193601126100c9576001600160a01b036020915416604051908152f35b50346100c957806003193601126100c9576101bd610ac3565b806001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346100c95760403660031901126100c9576102576108cc565b602435906001600160a01b0382168203610431577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff811680159081610429575b600114908161041f575b159081610416575b506104075767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561034392916001600160a01b0391856103c8575b50610310610b0b565b610318610b0b565b61032133610a1d565b610329610ac3565b166001600160a01b031960005416176000556100f1610ac3565b61034a5780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005538610307565b63f92ee8a960e01b8552600485fd5b905015386102bd565b303b1591506102b5565b8591506102ab565b8280fd5b50346100c95760603660031901126100c957366064116100c957806001600160a01b03600492541633036104745760016020526334c2a65d60e11b8152fd5b6310f5403960e31b8152fd5b82346100c95760603660031901126100c9576004356024359267ffffffffffffffff841161043157366023850112156104315783600401359367ffffffffffffffff8511610880578460051b946104da6020870184610894565b82526020820190602482968201019036821161084457602401915b81831061085c575050506044359167ffffffffffffffff831161070b573660238401121561070b57826004013567ffffffffffffffff81116108485760405193610549601f8301601f191660200186610894565b8185523660248383010111610844578186926024602093018388013785010152610571610ac3565b80845260016020526040842060028101907fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706105ac83610921565b60208151910120036108355783519067ffffffffffffffff821161082157680100000000000000008211610821578054828255808310610806575b508790875260208720875b8381106107e95750505050835167ffffffffffffffff81116107d55761061882546108e7565b601f811161079a575b50806020601f821160011461073957879161072e575b508160011b916000199060031b1c19161790555b6001600160a01b0384541660405192604084019060208086015251809152606084019690865b81811061070f5750505061069283869796959603601f198101855284610894565b803b1561070b578392836106cd936106df6040519889968795869463d9bbec9560e01b865260048601526060602486015260648501906109c5565b838103600319016044850152906109c5565b03925af180156106fe576106f05780f35b6106f991610894565b818180f35b50604051903d90823e3d90fd5b8380fd5b82516001600160a01b0316895260209889019890920191600101610671565b905085015188610637565b8388528088209150601f198316885b81811061078257509083600194939210610769575b5050811b01905561064b565b87015160001960f88460031b161c19169055888061075d565b9192602060018192868c015181550194019201610748565b6107c59083885260208820601f840160051c810191602085106107cb575b601f0160051c0190610a06565b87610621565b90915081906107b8565b634e487b7160e01b86526041600452602486fd5b60019060206001600160a01b0385511694019381840155016105f2565b8188526020882061081b918101908401610a06565b886105e7565b634e487b7160e01b87526041600452602487fd5b63632a22bb60e01b8652600486fd5b8580fd5b634e487b7160e01b85526041600452602485fd5b82356001600160a01b038116810361087c578152602092830192016104f5565b8680fd5b634e487b7160e01b84526041600452602484fd5b90601f8019910116810190811067ffffffffffffffff8211176108b657604052565b634e487b7160e01b600052604160045260246000fd5b600435906001600160a01b03821682036108e257565b600080fd5b90600182811c92168015610917575b602083101461090157565b634e487b7160e01b600052602260045260246000fd5b91607f16916108f6565b9060405191826000825492610935846108e7565b80845293600181169081156109a3575060011461095c575b5061095a92500383610894565b565b90506000929192526020600020906000915b81831061098757505090602061095a928201013861094d565b602091935080600191548385890101520191019091849261096e565b90506020925061095a94915060ff191682840152151560051b8201013861094d565b919082519283825260005b8481106109f1575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016109d0565b818110610a11575050565b60008155600101610a06565b6001600160a01b03168015610aad576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610af657565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610b3a57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", - "deployedBytecode": "0x608080604052600436101561001357600080fd5b600090813560e01c90816329f73b9c14610480575080632b20a4f614610435578063485cc9551461023d578063715018a6146101a45780637b1039991461017e5780638da5cb5b14610138578063a91ee0dc146100f9578063f2fde38b146100cc5763f5e820fd1461008457600080fd5b346100c95760203660031901126100c9576100b1600260406100c593600435815260016020522001610921565b6040519182916020835260208301906109c5565b0390f35b80fd5b50346100c95760203660031901126100c9576100f66100e96108cc565b6100f1610ac3565b610a1d565b80f35b50346100c95760203660031901126100c9576001600160a01b0361011b6108cc565b610123610ac3565b166001600160a01b0319600054161760005580f35b50346100c957806003193601126100c95760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b50346100c957806003193601126100c9576001600160a01b036020915416604051908152f35b50346100c957806003193601126100c9576101bd610ac3565b806001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346100c95760403660031901126100c9576102576108cc565b602435906001600160a01b0382168203610431577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff811680159081610429575b600114908161041f575b159081610416575b506104075767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561034392916001600160a01b0391856103c8575b50610310610b0b565b610318610b0b565b61032133610a1d565b610329610ac3565b166001600160a01b031960005416176000556100f1610ac3565b61034a5780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005538610307565b63f92ee8a960e01b8552600485fd5b905015386102bd565b303b1591506102b5565b8591506102ab565b8280fd5b50346100c95760603660031901126100c957366064116100c957806001600160a01b03600492541633036104745760016020526334c2a65d60e11b8152fd5b6310f5403960e31b8152fd5b82346100c95760603660031901126100c9576004356024359267ffffffffffffffff841161043157366023850112156104315783600401359367ffffffffffffffff8511610880578460051b946104da6020870184610894565b82526020820190602482968201019036821161084457602401915b81831061085c575050506044359167ffffffffffffffff831161070b573660238401121561070b57826004013567ffffffffffffffff81116108485760405193610549601f8301601f191660200186610894565b8185523660248383010111610844578186926024602093018388013785010152610571610ac3565b80845260016020526040842060028101907fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706105ac83610921565b60208151910120036108355783519067ffffffffffffffff821161082157680100000000000000008211610821578054828255808310610806575b508790875260208720875b8381106107e95750505050835167ffffffffffffffff81116107d55761061882546108e7565b601f811161079a575b50806020601f821160011461073957879161072e575b508160011b916000199060031b1c19161790555b6001600160a01b0384541660405192604084019060208086015251809152606084019690865b81811061070f5750505061069283869796959603601f198101855284610894565b803b1561070b578392836106cd936106df6040519889968795869463d9bbec9560e01b865260048601526060602486015260648501906109c5565b838103600319016044850152906109c5565b03925af180156106fe576106f05780f35b6106f991610894565b818180f35b50604051903d90823e3d90fd5b8380fd5b82516001600160a01b0316895260209889019890920191600101610671565b905085015188610637565b8388528088209150601f198316885b81811061078257509083600194939210610769575b5050811b01905561064b565b87015160001960f88460031b161c19169055888061075d565b9192602060018192868c015181550194019201610748565b6107c59083885260208820601f840160051c810191602085106107cb575b601f0160051c0190610a06565b87610621565b90915081906107b8565b634e487b7160e01b86526041600452602486fd5b60019060206001600160a01b0385511694019381840155016105f2565b8188526020882061081b918101908401610a06565b886105e7565b634e487b7160e01b87526041600452602487fd5b63632a22bb60e01b8652600486fd5b8580fd5b634e487b7160e01b85526041600452602485fd5b82356001600160a01b038116810361087c578152602092830192016104f5565b8680fd5b634e487b7160e01b84526041600452602484fd5b90601f8019910116810190811067ffffffffffffffff8211176108b657604052565b634e487b7160e01b600052604160045260246000fd5b600435906001600160a01b03821682036108e257565b600080fd5b90600182811c92168015610917575b602083101461090157565b634e487b7160e01b600052602260045260246000fd5b91607f16916108f6565b9060405191826000825492610935846108e7565b80845293600181169081156109a3575060011461095c575b5061095a92500383610894565b565b90506000929192526020600020906000915b81831061098757505090602061095a928201013861094d565b602091935080600191548385890101520191019091849261096e565b90506020925061095a94915060ff191682840152151560051b8201013861094d565b919082519283825260005b8481106109f1575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016109d0565b818110610a11575050565b60008155600101610a06565b6001600160a01b03168015610aad576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610af657565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610b3a57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081a000a", + "solcInputHash": "21fe30cc06e4cb96958a78cd2e5aab1b", + "metadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeAlreadyPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitteeNotPublished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRegistry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3\",\"type\":\"uint256\"}],\"name\":\"committees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"publicKey\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"}],\"name\":\"getCommittee\",\"outputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"nodes\",\"type\":\"address[]\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"},{\"internalType\":\"bytes32\",\"name\":\"publicKey\",\"type\":\"bytes32\"}],\"internalType\":\"struct NaiveRegistryFilter.Committee\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"nodes\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"}],\"name\":\"publishCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"e3Id\",\"type\":\"uint256\"},{\"internalType\":\"uint32[2]\",\"name\":\"threshold\",\"type\":\"uint32[2]\"}],\"name\":\"requestCommittee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/registry/NaiveRegistryFilter.sol\":\"NaiveRegistryFilter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"contracts/interfaces/ICiphernodeRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface ICiphernodeRegistry {\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param filter Address of the contract that will coordinate committee selection.\\n /// @param threshold The M/N threshold for the committee.\\n event CommitteeRequested(\\n uint256 indexed e3Id,\\n address filter,\\n uint32[2] threshold\\n );\\n\\n /// @notice This event MUST be emitted when a committee is selected for an E3.\\n /// @param e3Id ID of the E3 for which the committee was selected.\\n /// @param publicKey Public key of the committee.\\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\\n\\n /// @notice This event MUST be emitted when `enclave` is set.\\n /// @param enclave Address of the enclave contract.\\n event EnclaveSet(address indexed enclave);\\n\\n /// @notice This event MUST be emitted when a ciphernode is added to the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeAdded(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n /// @notice This event MUST be emitted when a ciphernode is removed from the registry.\\n /// @param node Address of the ciphernode.\\n /// @param index Index of the ciphernode in the registry.\\n /// @param numNodes Number of ciphernodes in the registry.\\n /// @param size Size of the registry.\\n event CiphernodeRemoved(\\n address indexed node,\\n uint256 index,\\n uint256 numNodes,\\n uint256 size\\n );\\n\\n function isCiphernodeEligible(address ciphernode) external returns (bool);\\n\\n /// @notice Initiates the committee selection process for a specified E3.\\n /// @dev This function MUST revert when not called by the Enclave contract.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param filter The address of the filter responsible for the committee selection process.\\n /// @param threshold The M/N threshold for the committee.\\n /// @return success True if committee selection was successfully initiated.\\n function requestCommittee(\\n uint256 e3Id,\\n address filter,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n\\n /// @notice Publishes the public key resulting from the committee selection process.\\n /// @dev This function MUST revert if not called by the previously selected filter.\\n /// @param e3Id ID of the E3 for which to select the committee.\\n /// @param publicKey The hash of the public key generated by the given committee.\\n function publishCommittee(\\n uint256 e3Id,\\n bytes calldata proof,\\n bytes calldata publicKey\\n ) external;\\n\\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\\n /// @dev This function MUST revert if no committee has been requested for the given E3.\\n /// @dev This function MUST revert if the committee has not yet published a public key.\\n /// @param e3Id ID of the E3 for which to get the committee public key.\\n /// @return publicKeyHash The hash of the public key of the given committee.\\n function committeePublicKey(\\n uint256 e3Id\\n ) external view returns (bytes32 publicKeyHash);\\n}\\n\",\"keccak256\":\"0xe24e6322e8c6fc83461edfbdbedb409e243f1c4e79021a74585cfe875c225aa2\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/IRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\ninterface IRegistryFilter {\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0x6bd13d0b188e54393b1a030a43f95042161091d49428e880c301d882c4583100\",\"license\":\"LGPL-3.0-only\"},\"contracts/registry/NaiveRegistryFilter.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.27;\\n\\nimport { ICiphernodeRegistry } from \\\"../interfaces/ICiphernodeRegistry.sol\\\";\\nimport { IRegistryFilter } from \\\"../interfaces/IRegistryFilter.sol\\\";\\nimport {\\n OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\ncontract NaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\\n struct Committee {\\n address[] nodes;\\n uint32[2] threshold;\\n bytes32 publicKey;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Storage Variables //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n address public registry;\\n\\n mapping(uint256 e3 => Committee committee) public committees;\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Errors //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n error CommitteeAlreadyExists();\\n error CommitteeAlreadyPublished();\\n error CommitteeDoesNotExist();\\n error CommitteeNotPublished();\\n error OnlyRegistry();\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Modifiers //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n modifier onlyRegistry() {\\n require(msg.sender == registry, OnlyRegistry());\\n _;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Initialization //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n constructor(address _owner, address _registry) {\\n initialize(_owner, _registry);\\n }\\n\\n function initialize(address _owner, address _registry) public initializer {\\n __Ownable_init(msg.sender);\\n setRegistry(_registry);\\n if (_owner != owner()) transferOwnership(_owner);\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Core Entrypoints //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function requestCommittee(\\n uint256 e3Id,\\n uint32[2] calldata threshold\\n ) external onlyRegistry returns (bool success) {\\n require(committees[e3Id].threshold[1] == 0, CommitteeAlreadyExists());\\n committees[e3Id].threshold = threshold;\\n success = true;\\n }\\n\\n function publishCommittee(\\n uint256 e3Id,\\n address[] memory nodes,\\n bytes memory publicKey\\n ) external onlyOwner {\\n Committee storage committee = committees[e3Id];\\n require(committee.publicKey == bytes32(0), CommitteeAlreadyPublished());\\n committee.nodes = nodes;\\n committee.publicKey = keccak256(publicKey);\\n ICiphernodeRegistry(registry).publishCommittee(\\n e3Id,\\n abi.encode(nodes),\\n publicKey\\n );\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Set Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function setRegistry(address _registry) public onlyOwner {\\n registry = _registry;\\n }\\n\\n ////////////////////////////////////////////////////////////\\n // //\\n // Get Functions //\\n // //\\n ////////////////////////////////////////////////////////////\\n\\n function getCommittee(\\n uint256 e3Id\\n ) external view returns (Committee memory) {\\n return committees[e3Id];\\n }\\n}\\n\",\"keccak256\":\"0x693eae32115a7313fa68c024161c4a4d3e9f0bcdb2ac0e67bffa798554555892\",\"license\":\"LGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6080346101f457601f610eb938819003918201601f19168301916001600160401b038311848410176101f95780849260409485528339810103126101f457610052602061004b8361020f565b920161020f565b600080516020610e9983398151915254604081901c60ff16159291906001600160401b038116801590816101ec575b60011490816101e2575b1590816101d9575b506101c8576001600160401b03198116600117600080516020610e99833981519152558361019d575b506100c5610299565b6100cd610299565b6100d633610223565b6100de6102c7565b600080546001600160a01b0319166001600160a01b03928316179055600080516020610e7983398151915254811690821603610186575b5061012a575b604051610b7b90816102fe8239f35b68ff000000000000000019600080516020610e998339815191525416600080516020610e99833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a161011b565b610197906101926102c7565b610223565b38610115565b6001600160481b0319166801000000000000000117600080516020610e9983398151915255386100bc565b63f92ee8a960e01b60005260046000fd5b90501538610093565b303b15915061008b565b859150610081565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101f457565b6001600160a01b0316801561028357600080516020610e7983398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b60ff600080516020610e998339815191525460401c16156102b657565b631afcd79f60e31b60005260046000fd5b600080516020610e79833981519152546001600160a01b031633036102e857565b63118cdaa760e01b6000523360045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c90816218449a1461082e5750806329f73b9c1461053a5780632b20a4f614610468578063485cc9551461022e578063715018a6146101955780637b1039991461016f5780638da5cb5b14610129578063a91ee0dc146100ea578063f2fde38b146100bd5763f5e820fd1461008e57600080fd5b346100ba5760203660031901126100ba5760026040602092600435815260018452200154604051908152f35b80fd5b50346100ba5760203660031901126100ba576100e76100da6109e4565b6100e2610ae6565b610a40565b80f35b50346100ba5760203660031901126100ba576001600160a01b0361010c6109e4565b610114610ae6565b166001600160a01b0319600054161760005580f35b50346100ba57806003193601126100ba5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b50346100ba57806003193601126100ba576001600160a01b036020915416604051908152f35b50346100ba57806003193601126100ba576101ae610ae6565b806001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346100ba5760403660031901126100ba576102486109e4565b602435906001600160a01b0382168203610464577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff81168015908161045c575b6001149081610452575b159081610449575b5061043a5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039190846103fb575b506102fd610b2e565b610305610b2e565b61030e33610a40565b610316610ae6565b166001600160a01b031960005416176000556001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b038216036103e9575b5061036b5780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6103f5906100e2610ae6565b38610363565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055386102f4565b63f92ee8a960e01b8552600485fd5b905015386102ae565b303b1591506102a6565b85915061029c565b8280fd5b50346100ba5760603660031901126100ba5760043536606411610536576001600160a01b03825416330361052757808252600160205263ffffffff600160408420015460201c16610518578152600160205260016040822001602482805b600281106104dd5750505055602060405160018152f35b90919384359063ffffffff8216918281036105145750600583901b91821b63ffffffff90921b1916179360200191906001016104c6565b8480fd5b6334c2a65d60e11b8252600482fd5b6310f5403960e31b8252600482fd5b5080fd5b50346100ba5760603660031901126100ba576024359060043567ffffffffffffffff8311610536573660238401121561053657826004013567ffffffffffffffff811161081a578060051b936040519161059760208701846109c2565b82526020820190602482968201019036821161081657602401915b8183106107f6575050506044359167ffffffffffffffff831161075557366023840112156107555782600401359267ffffffffffffffff84116107e25760405193610607601f8201601f1916602001866109c2565b808552602085019136602483830101116107de57818792602460209301853786010152610632610ae6565b81855260016020526040852090600282019182546107cf5784519067ffffffffffffffff82116107bb576801000000000000000082116107bb578054828255808310610795575b508890885260208820885b83811061077857505050508451902090556001600160a01b0384541660405192604084019060208086015251809152606084019690865b818110610759575050506106dc83869796959603601f1981018552846109c2565b803b1561075557839283610717936107296040519889968795869463d9bbec9560e01b865260048601526060602486015260648501906109ff565b838103600319016044850152906109ff565b03925af180156107485761073a5780f35b610743916109c2565b388180f35b50604051903d90823e3d90fd5b8380fd5b82516001600160a01b03168952602098890198909201916001016106bb565b60019060206001600160a01b038551169401938184015501610684565b8189528260208a2091820191015b8181106107b05750610679565b8981556001016107a3565b634e487b7160e01b88526041600452602488fd5b63632a22bb60e01b8752600487fd5b8680fd5b634e487b7160e01b85526041600452602485fd5b82356001600160a01b03811681036107de578152602092830192016105b2565b8580fd5b634e487b7160e01b83526041600452602483fd5b82346100ba5760203660031901126100ba579061084a81610990565b606081528160408092815161085f83826109c2565b8236823760208201520152600435825260016020528082209080519061088482610990565b80518354808252848652602080872090830191875b81811061097157505050816108af9103826109c2565b8252600281519363ffffffff6001820154818116875260201c1660208601526108d883866109c2565b602084019485520154908083019182528051936020855260a08501935193608060208701528451809152602060c08701950190875b81811061095257505050519084019094905b600282106109365750508293505160808301520390f35b60208060019263ffffffff89511681520196019101909461091f565b82516001600160a01b031687526020968701969092019160010161090d565b82546001600160a01b0316845260209093019260019283019201610899565b6060810190811067ffffffffffffffff8211176109ac57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176109ac57604052565b600435906001600160a01b03821682036109fa57565b600080fd5b919082519283825260005b848110610a2b575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201610a0a565b6001600160a01b03168015610ad0576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610b1957565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610b5d57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081b000a9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b600090813560e01c90816218449a1461082e5750806329f73b9c1461053a5780632b20a4f614610468578063485cc9551461022e578063715018a6146101955780637b1039991461016f5780638da5cb5b14610129578063a91ee0dc146100ea578063f2fde38b146100bd5763f5e820fd1461008e57600080fd5b346100ba5760203660031901126100ba5760026040602092600435815260018452200154604051908152f35b80fd5b50346100ba5760203660031901126100ba576100e76100da6109e4565b6100e2610ae6565b610a40565b80f35b50346100ba5760203660031901126100ba576001600160a01b0361010c6109e4565b610114610ae6565b166001600160a01b0319600054161760005580f35b50346100ba57806003193601126100ba5760206001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b50346100ba57806003193601126100ba576001600160a01b036020915416604051908152f35b50346100ba57806003193601126100ba576101ae610ae6565b806001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031981167f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346100ba5760403660031901126100ba576102486109e4565b602435906001600160a01b0382168203610464577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c16159267ffffffffffffffff81168015908161045c575b6001149081610452575b159081610449575b5061043a5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039190846103fb575b506102fd610b2e565b610305610b2e565b61030e33610a40565b610316610ae6565b166001600160a01b031960005416176000556001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054166001600160a01b038216036103e9575b5061036b5780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6103f5906100e2610ae6565b38610363565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055386102f4565b63f92ee8a960e01b8552600485fd5b905015386102ae565b303b1591506102a6565b85915061029c565b8280fd5b50346100ba5760603660031901126100ba5760043536606411610536576001600160a01b03825416330361052757808252600160205263ffffffff600160408420015460201c16610518578152600160205260016040822001602482805b600281106104dd5750505055602060405160018152f35b90919384359063ffffffff8216918281036105145750600583901b91821b63ffffffff90921b1916179360200191906001016104c6565b8480fd5b6334c2a65d60e11b8252600482fd5b6310f5403960e31b8252600482fd5b5080fd5b50346100ba5760603660031901126100ba576024359060043567ffffffffffffffff8311610536573660238401121561053657826004013567ffffffffffffffff811161081a578060051b936040519161059760208701846109c2565b82526020820190602482968201019036821161081657602401915b8183106107f6575050506044359167ffffffffffffffff831161075557366023840112156107555782600401359267ffffffffffffffff84116107e25760405193610607601f8201601f1916602001866109c2565b808552602085019136602483830101116107de57818792602460209301853786010152610632610ae6565b81855260016020526040852090600282019182546107cf5784519067ffffffffffffffff82116107bb576801000000000000000082116107bb578054828255808310610795575b508890885260208820885b83811061077857505050508451902090556001600160a01b0384541660405192604084019060208086015251809152606084019690865b818110610759575050506106dc83869796959603601f1981018552846109c2565b803b1561075557839283610717936107296040519889968795869463d9bbec9560e01b865260048601526060602486015260648501906109ff565b838103600319016044850152906109ff565b03925af180156107485761073a5780f35b610743916109c2565b388180f35b50604051903d90823e3d90fd5b8380fd5b82516001600160a01b03168952602098890198909201916001016106bb565b60019060206001600160a01b038551169401938184015501610684565b8189528260208a2091820191015b8181106107b05750610679565b8981556001016107a3565b634e487b7160e01b88526041600452602488fd5b63632a22bb60e01b8752600487fd5b8680fd5b634e487b7160e01b85526041600452602485fd5b82356001600160a01b03811681036107de578152602092830192016105b2565b8580fd5b634e487b7160e01b83526041600452602483fd5b82346100ba5760203660031901126100ba579061084a81610990565b606081528160408092815161085f83826109c2565b8236823760208201520152600435825260016020528082209080519061088482610990565b80518354808252848652602080872090830191875b81811061097157505050816108af9103826109c2565b8252600281519363ffffffff6001820154818116875260201c1660208601526108d883866109c2565b602084019485520154908083019182528051936020855260a08501935193608060208701528451809152602060c08701950190875b81811061095257505050519084019094905b600282106109365750508293505160808301520390f35b60208060019263ffffffff89511681520196019101909461091f565b82516001600160a01b031687526020968701969092019160010161090d565b82546001600160a01b0316845260209093019260019283019201610899565b6060810190811067ffffffffffffffff8211176109ac57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176109ac57604052565b600435906001600160a01b03821682036109fa57565b600080fd5b919082519283825260005b848110610a2b575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201610a0a565b6001600160a01b03168015610ad0576001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054826001600160a01b03198216177f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b6001600160a01b037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054163303610b1957565b63118cdaa760e01b6000523360045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610b5d57565b631afcd79f60e31b60005260046000fdfea164736f6c634300081b000a", "devdoc": { "errors": { "InvalidInitialization()": [ @@ -366,7 +388,7 @@ "storageLayout": { "storage": [ { - "astId": 2140, + "astId": 3285, "contract": "contracts/registry/NaiveRegistryFilter.sol:NaiveRegistryFilter", "label": "registry", "offset": 0, @@ -374,12 +396,12 @@ "type": "t_address" }, { - "astId": 2145, + "astId": 3290, "contract": "contracts/registry/NaiveRegistryFilter.sol:NaiveRegistryFilter", "label": "committees", "offset": 0, "slot": "1", - "type": "t_mapping(t_uint256,t_struct(Committee)2138_storage)" + "type": "t_mapping(t_uint256,t_struct(Committee)3283_storage)" } ], "types": { @@ -400,24 +422,24 @@ "label": "uint32[2]", "numberOfBytes": "32" }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(Committee)2138_storage)": { + "t_mapping(t_uint256,t_struct(Committee)3283_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct NaiveRegistryFilter.Committee)", "numberOfBytes": "32", - "value": "t_struct(Committee)2138_storage" + "value": "t_struct(Committee)3283_storage" }, - "t_struct(Committee)2138_storage": { + "t_struct(Committee)3283_storage": { "encoding": "inplace", "label": "struct NaiveRegistryFilter.Committee", "members": [ { - "astId": 2131, + "astId": 3276, "contract": "contracts/registry/NaiveRegistryFilter.sol:NaiveRegistryFilter", "label": "nodes", "offset": 0, @@ -425,7 +447,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 2135, + "astId": 3280, "contract": "contracts/registry/NaiveRegistryFilter.sol:NaiveRegistryFilter", "label": "threshold", "offset": 0, @@ -433,12 +455,12 @@ "type": "t_array(t_uint32)2_storage" }, { - "astId": 2137, + "astId": 3282, "contract": "contracts/registry/NaiveRegistryFilter.sol:NaiveRegistryFilter", "label": "publicKey", "offset": 0, "slot": "2", - "type": "t_bytes_storage" + "type": "t_bytes32" } ], "numberOfBytes": "96" @@ -455,4 +477,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/solcInputs/21fe30cc06e4cb96958a78cd2e5aab1b.json b/packages/evm/deployments/sepolia/solcInputs/21fe30cc06e4cb96958a78cd2e5aab1b.json new file mode 100644 index 00000000..4cb4a821 --- /dev/null +++ b/packages/evm/deployments/sepolia/solcInputs/21fe30cc06e4cb96958a78cd2e5aab1b.json @@ -0,0 +1,104 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n assembly {\n $.slot := INITIALIZABLE_STORAGE\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@zk-kit/lean-imt.sol/Constants.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.4;\n\nuint256 constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n" + }, + "@zk-kit/lean-imt.sol/InternalLeanIMT.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport {PoseidonT3} from \"poseidon-solidity/PoseidonT3.sol\";\nimport {SNARK_SCALAR_FIELD} from \"./Constants.sol\";\n\nstruct LeanIMTData {\n // Tracks the current number of leaves in the tree.\n uint256 size;\n // Represents the current depth of the tree, which can increase as new leaves are inserted.\n uint256 depth;\n // A mapping from each level of the tree to the node value of the last even position at that level.\n // Used for efficient inserts, updates and root calculations.\n mapping(uint256 => uint256) sideNodes;\n // A mapping from leaf values to their respective indices in the tree.\n // This facilitates checks for leaf existence and retrieval of leaf positions.\n mapping(uint256 => uint256) leaves;\n}\n\nerror WrongSiblingNodes();\nerror LeafGreaterThanSnarkScalarField();\nerror LeafCannotBeZero();\nerror LeafAlreadyExists();\nerror LeafDoesNotExist();\n\n/// @title Lean Incremental binary Merkle tree.\n/// @dev The LeanIMT is an optimized version of the BinaryIMT.\n/// This implementation eliminates the use of zeroes, and make the tree depth dynamic.\n/// When a node doesn't have the right child, instead of using a zero hash as in the BinaryIMT,\n/// the node's value becomes that of its left child. Furthermore, rather than utilizing a static tree depth,\n/// it is updated based on the number of leaves in the tree. This approach\n/// results in the calculation of significantly fewer hashes, making the tree more efficient.\nlibrary InternalLeanIMT {\n /// @dev Inserts a new leaf into the incremental merkle tree.\n /// The function ensures that the leaf is valid according to the\n /// constraints of the tree and then updates the tree's structure accordingly.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param leaf: The value of the new leaf to be inserted into the tree.\n /// @return The new hash of the node after the leaf has been inserted.\n function _insert(LeanIMTData storage self, uint256 leaf) internal returns (uint256) {\n if (leaf >= SNARK_SCALAR_FIELD) {\n revert LeafGreaterThanSnarkScalarField();\n } else if (leaf == 0) {\n revert LeafCannotBeZero();\n } else if (_has(self, leaf)) {\n revert LeafAlreadyExists();\n }\n\n uint256 index = self.size;\n\n // Cache tree depth to optimize gas\n uint256 treeDepth = self.depth;\n\n // A new insertion can increase a tree's depth by at most 1,\n // and only if the number of leaves supported by the current\n // depth is less than the number of leaves to be supported after insertion.\n if (2 ** treeDepth < index + 1) {\n ++treeDepth;\n }\n\n self.depth = treeDepth;\n\n uint256 node = leaf;\n\n for (uint256 level = 0; level < treeDepth; ) {\n if ((index >> level) & 1 == 1) {\n node = PoseidonT3.hash([self.sideNodes[level], node]);\n } else {\n self.sideNodes[level] = node;\n }\n\n unchecked {\n ++level;\n }\n }\n\n self.size = ++index;\n\n self.sideNodes[treeDepth] = node;\n self.leaves[leaf] = index;\n\n return node;\n }\n\n /// @dev Inserts many leaves into the incremental merkle tree.\n /// The function ensures that the leaves are valid according to the\n /// constraints of the tree and then updates the tree's structure accordingly.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param leaves: The values of the new leaves to be inserted into the tree.\n /// @return The root after the leaves have been inserted.\n function _insertMany(LeanIMTData storage self, uint256[] calldata leaves) internal returns (uint256) {\n // Cache tree size to optimize gas\n uint256 treeSize = self.size;\n\n // Check that all the new values are correct to be added.\n for (uint256 i = 0; i < leaves.length; ) {\n if (leaves[i] >= SNARK_SCALAR_FIELD) {\n revert LeafGreaterThanSnarkScalarField();\n } else if (leaves[i] == 0) {\n revert LeafCannotBeZero();\n } else if (_has(self, leaves[i])) {\n revert LeafAlreadyExists();\n }\n\n self.leaves[leaves[i]] = treeSize + 1 + i;\n\n unchecked {\n ++i;\n }\n }\n\n // Array to save the nodes that will be used to create the next level of the tree.\n uint256[] memory currentLevelNewNodes;\n\n currentLevelNewNodes = leaves;\n\n // Cache tree depth to optimize gas\n uint256 treeDepth = self.depth;\n\n // Calculate the depth of the tree after adding the new values.\n // Unlike the 'insert' function, we need a while here as\n // N insertions can increase the tree's depth more than once.\n while (2 ** treeDepth < treeSize + leaves.length) {\n ++treeDepth;\n }\n\n self.depth = treeDepth;\n\n // First index to change in every level.\n uint256 currentLevelStartIndex = treeSize;\n\n // Size of the level used to create the next level.\n uint256 currentLevelSize = treeSize + leaves.length;\n\n // The index where changes begin at the next level.\n uint256 nextLevelStartIndex = currentLevelStartIndex >> 1;\n\n // The size of the next level.\n uint256 nextLevelSize = ((currentLevelSize - 1) >> 1) + 1;\n\n for (uint256 level = 0; level < treeDepth; ) {\n // The number of nodes for the new level that will be created,\n // only the new values, not the entire level.\n uint256 numberOfNewNodes = nextLevelSize - nextLevelStartIndex;\n uint256[] memory nextLevelNewNodes = new uint256[](numberOfNewNodes);\n for (uint256 i = 0; i < numberOfNewNodes; ) {\n uint256 leftNode;\n\n // Assign the left node using the saved path or the position in the array.\n if ((i + nextLevelStartIndex) * 2 < currentLevelStartIndex) {\n leftNode = self.sideNodes[level];\n } else {\n leftNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 - currentLevelStartIndex];\n }\n\n uint256 rightNode;\n\n // Assign the right node if the value exists.\n if ((i + nextLevelStartIndex) * 2 + 1 < currentLevelSize) {\n rightNode = currentLevelNewNodes[(i + nextLevelStartIndex) * 2 + 1 - currentLevelStartIndex];\n }\n\n uint256 parentNode;\n\n // Assign the parent node.\n // If it has a right child the result will be the hash(leftNode, rightNode) if not,\n // it will be the leftNode.\n if (rightNode != 0) {\n parentNode = PoseidonT3.hash([leftNode, rightNode]);\n } else {\n parentNode = leftNode;\n }\n\n nextLevelNewNodes[i] = parentNode;\n\n unchecked {\n ++i;\n }\n }\n\n // Update the `sideNodes` variable.\n // If `currentLevelSize` is odd, the saved value will be the last value of the array\n // if it is even and there are more than 1 element in `currentLevelNewNodes`, the saved value\n // will be the value before the last one.\n // If it is even and there is only one element, there is no need to save anything because\n // the correct value for this level was already saved before.\n if (currentLevelSize & 1 == 1) {\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 1];\n } else if (currentLevelNewNodes.length > 1) {\n self.sideNodes[level] = currentLevelNewNodes[currentLevelNewNodes.length - 2];\n }\n\n currentLevelStartIndex = nextLevelStartIndex;\n\n // Calculate the next level startIndex value.\n // It is the position of the parent node which is pos/2.\n nextLevelStartIndex >>= 1;\n\n // Update the next array that will be used to calculate the next level.\n currentLevelNewNodes = nextLevelNewNodes;\n\n currentLevelSize = nextLevelSize;\n\n // Calculate the size of the next level.\n // The size of the next level is (currentLevelSize - 1) / 2 + 1.\n nextLevelSize = ((nextLevelSize - 1) >> 1) + 1;\n\n unchecked {\n ++level;\n }\n }\n\n // Update tree size\n self.size = treeSize + leaves.length;\n\n // Update tree root\n self.sideNodes[treeDepth] = currentLevelNewNodes[0];\n\n return currentLevelNewNodes[0];\n }\n\n /// @dev Updates the value of an existing leaf and recalculates hashes\n /// to maintain tree integrity.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param oldLeaf: The value of the leaf that is to be updated.\n /// @param newLeaf: The new value that will replace the oldLeaf in the tree.\n /// @param siblingNodes: An array of sibling nodes that are necessary to recalculate the path to the root.\n /// @return The new hash of the updated node after the leaf has been updated.\n function _update(\n LeanIMTData storage self,\n uint256 oldLeaf,\n uint256 newLeaf,\n uint256[] calldata siblingNodes\n ) internal returns (uint256) {\n if (newLeaf >= SNARK_SCALAR_FIELD) {\n revert LeafGreaterThanSnarkScalarField();\n } else if (!_has(self, oldLeaf)) {\n revert LeafDoesNotExist();\n } else if (_has(self, newLeaf)) {\n revert LeafAlreadyExists();\n }\n\n uint256 index = _indexOf(self, oldLeaf);\n uint256 node = newLeaf;\n uint256 oldRoot = oldLeaf;\n\n uint256 lastIndex = self.size - 1;\n uint256 i = 0;\n\n // Cache tree depth to optimize gas\n uint256 treeDepth = self.depth;\n\n for (uint256 level = 0; level < treeDepth; ) {\n if ((index >> level) & 1 == 1) {\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\n revert LeafGreaterThanSnarkScalarField();\n }\n\n node = PoseidonT3.hash([siblingNodes[i], node]);\n oldRoot = PoseidonT3.hash([siblingNodes[i], oldRoot]);\n\n unchecked {\n ++i;\n }\n } else {\n if (index >> level != lastIndex >> level) {\n if (siblingNodes[i] >= SNARK_SCALAR_FIELD) {\n revert LeafGreaterThanSnarkScalarField();\n }\n\n node = PoseidonT3.hash([node, siblingNodes[i]]);\n oldRoot = PoseidonT3.hash([oldRoot, siblingNodes[i]]);\n\n unchecked {\n ++i;\n }\n } else {\n self.sideNodes[i] = node;\n }\n }\n\n unchecked {\n ++level;\n }\n }\n\n if (oldRoot != _root(self)) {\n revert WrongSiblingNodes();\n }\n\n self.sideNodes[treeDepth] = node;\n\n if (newLeaf != 0) {\n self.leaves[newLeaf] = self.leaves[oldLeaf];\n }\n\n self.leaves[oldLeaf] = 0;\n\n return node;\n }\n\n /// @dev Removes a leaf from the tree by setting its value to zero.\n /// This function utilizes the update function to set the leaf's value\n /// to zero and update the tree's state accordingly.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param oldLeaf: The value of the leaf to be removed.\n /// @param siblingNodes: An array of sibling nodes required for updating the path to the root after removal.\n /// @return The new root hash of the tree after the leaf has been removed.\n function _remove(\n LeanIMTData storage self,\n uint256 oldLeaf,\n uint256[] calldata siblingNodes\n ) internal returns (uint256) {\n return _update(self, oldLeaf, 0, siblingNodes);\n }\n\n /// @dev Checks if a leaf exists in the tree.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param leaf: The value of the leaf to check for existence.\n /// @return A boolean value indicating whether the leaf exists in the tree.\n function _has(LeanIMTData storage self, uint256 leaf) internal view returns (bool) {\n return self.leaves[leaf] != 0;\n }\n\n /// @dev Retrieves the index of a given leaf in the tree.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @param leaf: The value of the leaf whose index is to be found.\n /// @return The index of the specified leaf within the tree. If the leaf is not present, the function\n /// reverts with a custom error.\n function _indexOf(LeanIMTData storage self, uint256 leaf) internal view returns (uint256) {\n if (self.leaves[leaf] == 0) {\n revert LeafDoesNotExist();\n }\n\n return self.leaves[leaf] - 1;\n }\n\n /// @dev Retrieves the root of the tree from the 'sideNodes' mapping using the\n /// current tree depth.\n /// @param self: A storage reference to the 'LeanIMTData' struct.\n /// @return The root hash of the tree.\n function _root(LeanIMTData storage self) internal view returns (uint256) {\n return self.sideNodes[self.depth];\n }\n}\n" + }, + "contracts/Enclave.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IEnclave, E3, IE3Program } from \"./interfaces/IEnclave.sol\";\nimport { ICiphernodeRegistry } from \"./interfaces/ICiphernodeRegistry.sol\";\nimport { IInputValidator } from \"./interfaces/IInputValidator.sol\";\nimport { IDecryptionVerifier } from \"./interfaces/IDecryptionVerifier.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n InternalLeanIMT,\n LeanIMTData,\n PoseidonT3\n} from \"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\";\n\ncontract Enclave is IEnclave, OwnableUpgradeable {\n using InternalLeanIMT for LeanIMTData;\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n ICiphernodeRegistry public ciphernodeRegistry; // address of the Ciphernode registry.\n uint256 public maxDuration; // maximum duration of a computation in seconds.\n uint256 public nexte3Id; // ID of the next E3.\n uint256 public requests; // total number of requests made to Enclave.\n\n // Mapping of allowed E3 Programs.\n mapping(IE3Program e3Program => bool allowed) public e3Programs;\n\n // Mapping of E3s.\n mapping(uint256 e3Id => E3 e3) public e3s;\n\n // Mapping of input merkle trees.\n mapping(uint256 e3Id => LeanIMTData imt) public inputs;\n\n // Mapping counting the number of inputs for each E3.\n mapping(uint256 e3Id => uint256 inputCount) public inputCounts;\n\n // Mapping of enabled encryption schemes.\n mapping(bytes32 encryptionSchemeId => IDecryptionVerifier decryptionVerifier)\n public decryptionVerifiers;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeSelectionFailed();\n error E3ProgramNotAllowed(IE3Program e3Program);\n error E3AlreadyActivated(uint256 e3Id);\n error E3Expired();\n error E3NotActivated(uint256 e3Id);\n error E3NotReady();\n error E3DoesNotExist(uint256 e3Id);\n error ModuleAlreadyEnabled(address module);\n error ModuleNotEnabled(address module);\n error InvalidEncryptionScheme(bytes32 encryptionSchemeId);\n error InputDeadlinePassed(uint256 e3Id, uint256 expiration);\n error InputDeadlineNotPassed(uint256 e3Id, uint256 expiration);\n error InvalidComputationRequest(IInputValidator inputValidator);\n error InvalidCiphernodeRegistry(ICiphernodeRegistry ciphernodeRegistry);\n error InvalidInput();\n error InvalidDuration(uint256 duration);\n error InvalidOutput(bytes output);\n error InvalidStartWindow();\n error InvalidThreshold(uint32[2] threshold);\n error CiphertextOutputAlreadyPublished(uint256 e3Id);\n error CiphertextOutputNotPublished(uint256 e3Id);\n error PaymentRequired(uint256 value);\n error PlaintextOutputAlreadyPublished(uint256 e3Id);\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @param _owner The owner of this contract\n /// @param _maxDuration The maximum duration of a computation in seconds\n constructor(\n address _owner,\n ICiphernodeRegistry _ciphernodeRegistry,\n uint256 _maxDuration\n ) {\n initialize(_owner, _ciphernodeRegistry, _maxDuration);\n }\n\n /// @param _owner The owner of this contract\n /// @param _maxDuration The maximum duration of a computation in seconds\n function initialize(\n address _owner,\n ICiphernodeRegistry _ciphernodeRegistry,\n uint256 _maxDuration\n ) public initializer {\n __Ownable_init(msg.sender);\n setMaxDuration(_maxDuration);\n setCiphernodeRegistry(_ciphernodeRegistry);\n if (_owner != owner()) transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function request(\n address filter,\n uint32[2] calldata threshold,\n uint256[2] calldata startWindow,\n uint256 duration,\n IE3Program e3Program,\n bytes memory e3ProgramParams,\n bytes memory computeProviderParams\n ) external payable returns (uint256 e3Id, E3 memory e3) {\n // TODO: allow for other payment methods or only native tokens?\n // TODO: should payment checks be somewhere else? Perhaps in the E3 Program or ciphernode registry?\n require(msg.value > 0, PaymentRequired(msg.value));\n require(\n threshold[1] >= threshold[0] && threshold[0] > 0,\n InvalidThreshold(threshold)\n );\n require(\n // TODO: do we need a minimum start window to allow time for committee selection?\n startWindow[1] >= startWindow[0] &&\n startWindow[1] >= block.timestamp,\n InvalidStartWindow()\n );\n require(\n duration > 0 && duration <= maxDuration,\n InvalidDuration(duration)\n );\n require(e3Programs[e3Program], E3ProgramNotAllowed(e3Program));\n\n // TODO: should IDs be incremental or produced deterministically?\n e3Id = nexte3Id;\n nexte3Id++;\n uint256 seed = uint256(keccak256(abi.encode(block.prevrandao, e3Id)));\n\n (bytes32 encryptionSchemeId, IInputValidator inputValidator) = e3Program\n .validate(e3Id, seed, e3ProgramParams, computeProviderParams);\n IDecryptionVerifier decryptionVerifier = decryptionVerifiers[\n encryptionSchemeId\n ];\n require(\n decryptionVerifiers[encryptionSchemeId] !=\n IDecryptionVerifier(address(0)),\n InvalidEncryptionScheme(encryptionSchemeId)\n );\n require(\n address(inputValidator) != address(0),\n InvalidComputationRequest(inputValidator)\n );\n\n e3 = E3({\n seed: seed,\n threshold: threshold,\n startWindow: startWindow,\n duration: duration,\n expiration: 0,\n encryptionSchemeId: encryptionSchemeId,\n e3Program: e3Program,\n e3ProgramParams: e3ProgramParams,\n inputValidator: inputValidator,\n decryptionVerifier: decryptionVerifier,\n committeePublicKey: hex\"\",\n ciphertextOutput: hex\"\",\n plaintextOutput: hex\"\"\n });\n e3s[e3Id] = e3;\n\n require(\n ciphernodeRegistry.requestCommittee(e3Id, filter, threshold),\n CommitteeSelectionFailed()\n );\n\n emit E3Requested(e3Id, e3, filter, e3Program);\n }\n\n function activate(\n uint256 e3Id,\n bytes memory publicKey\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n\n require(e3.expiration == 0, E3AlreadyActivated(e3Id));\n require(e3.startWindow[0] <= block.timestamp, E3NotReady());\n // TODO: handle what happens to the payment if the start window has passed.\n require(e3.startWindow[1] >= block.timestamp, E3Expired());\n\n bytes32 publicKeyHash = ciphernodeRegistry.committeePublicKey(e3Id);\n require(\n keccak256(publicKey) == publicKeyHash,\n CommitteeSelectionFailed()\n );\n\n e3s[e3Id].expiration = block.timestamp + e3.duration;\n e3s[e3Id].committeePublicKey = keccak256(publicKey);\n\n emit E3Activated(e3Id, e3.expiration, publicKey);\n\n return true;\n }\n\n function publishInput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n // TODO: should we have an input window, including both a start and end timestamp?\n require(\n e3.expiration > block.timestamp,\n InputDeadlinePassed(e3Id, e3.expiration)\n );\n bytes memory input;\n (input, success) = e3.inputValidator.validate(msg.sender, data);\n require(success, InvalidInput());\n uint256 inputHash = PoseidonT3.hash(\n [uint256(keccak256(input)), inputCounts[e3Id]]\n );\n\n inputCounts[e3Id]++;\n inputs[e3Id]._insert(inputHash);\n\n emit InputPublished(e3Id, input, inputHash, inputCounts[e3Id] - 1);\n }\n\n function publishCiphertextOutput(\n uint256 e3Id,\n bytes memory ciphertextOutput,\n bytes memory proof\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n require(\n e3.expiration <= block.timestamp,\n InputDeadlineNotPassed(e3Id, e3.expiration)\n );\n // TODO: should the output verifier be able to change its mind?\n //i.e. should we be able to call this multiple times?\n require(\n e3.ciphertextOutput == bytes32(0),\n CiphertextOutputAlreadyPublished(e3Id)\n );\n bytes32 ciphertextOutputHash = keccak256(ciphertextOutput);\n (success) = e3.e3Program.verify(e3Id, ciphertextOutputHash, proof);\n require(success, InvalidOutput(ciphertextOutput));\n e3s[e3Id].ciphertextOutput = ciphertextOutputHash;\n\n emit CiphertextOutputPublished(e3Id, ciphertextOutput);\n }\n\n function publishPlaintextOutput(\n uint256 e3Id,\n bytes memory plaintextOutput,\n bytes memory proof\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n require(\n e3.ciphertextOutput != bytes32(0),\n CiphertextOutputNotPublished(e3Id)\n );\n require(\n e3.plaintextOutput.length == 0,\n PlaintextOutputAlreadyPublished(e3Id)\n );\n (success) = e3.decryptionVerifier.verify(\n e3Id,\n keccak256(plaintextOutput),\n proof\n );\n require(success, InvalidOutput(plaintextOutput));\n e3s[e3Id].plaintextOutput = plaintextOutput;\n\n emit PlaintextOutputPublished(e3Id, plaintextOutput);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setMaxDuration(\n uint256 _maxDuration\n ) public onlyOwner returns (bool success) {\n maxDuration = _maxDuration;\n success = true;\n emit MaxDurationSet(_maxDuration);\n }\n\n function setCiphernodeRegistry(\n ICiphernodeRegistry _ciphernodeRegistry\n ) public onlyOwner returns (bool success) {\n require(\n address(_ciphernodeRegistry) != address(0) &&\n _ciphernodeRegistry != ciphernodeRegistry,\n InvalidCiphernodeRegistry(_ciphernodeRegistry)\n );\n ciphernodeRegistry = _ciphernodeRegistry;\n success = true;\n emit CiphernodeRegistrySet(address(_ciphernodeRegistry));\n }\n\n function enableE3Program(\n IE3Program e3Program\n ) public onlyOwner returns (bool success) {\n require(\n !e3Programs[e3Program],\n ModuleAlreadyEnabled(address(e3Program))\n );\n e3Programs[e3Program] = true;\n success = true;\n emit E3ProgramEnabled(e3Program);\n }\n\n function disableE3Program(\n IE3Program e3Program\n ) public onlyOwner returns (bool success) {\n require(e3Programs[e3Program], ModuleNotEnabled(address(e3Program)));\n delete e3Programs[e3Program];\n success = true;\n emit E3ProgramDisabled(e3Program);\n }\n\n function setDecryptionVerifier(\n bytes32 encryptionSchemeId,\n IDecryptionVerifier decryptionVerifier\n ) public onlyOwner returns (bool success) {\n require(\n decryptionVerifier != IDecryptionVerifier(address(0)) &&\n decryptionVerifiers[encryptionSchemeId] != decryptionVerifier,\n InvalidEncryptionScheme(encryptionSchemeId)\n );\n decryptionVerifiers[encryptionSchemeId] = decryptionVerifier;\n success = true;\n emit EncryptionSchemeEnabled(encryptionSchemeId);\n }\n\n function disableEncryptionScheme(\n bytes32 encryptionSchemeId\n ) public onlyOwner returns (bool success) {\n require(\n decryptionVerifiers[encryptionSchemeId] !=\n IDecryptionVerifier(address(0)),\n InvalidEncryptionScheme(encryptionSchemeId)\n );\n decryptionVerifiers[encryptionSchemeId] = IDecryptionVerifier(\n address(0)\n );\n success = true;\n emit EncryptionSchemeDisabled(encryptionSchemeId);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function getE3(uint256 e3Id) public view returns (E3 memory e3) {\n e3 = e3s[e3Id];\n require(e3.e3Program != IE3Program(address(0)), E3DoesNotExist(e3Id));\n }\n\n function getInputRoot(uint256 e3Id) public view returns (uint256) {\n require(\n e3s[e3Id].e3Program != IE3Program(address(0)),\n E3DoesNotExist(e3Id)\n );\n return InternalLeanIMT._root(inputs[e3Id]);\n }\n\n function getDecryptionVerifier(\n bytes32 encryptionSchemeId\n ) public view returns (IDecryptionVerifier) {\n return decryptionVerifiers[encryptionSchemeId];\n }\n}\n" + }, + "contracts/interfaces/ICiphernodeRegistry.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\ninterface ICiphernodeRegistry {\n /// @notice This event MUST be emitted when a committee is selected for an E3.\n /// @param e3Id ID of the E3 for which the committee was selected.\n /// @param filter Address of the contract that will coordinate committee selection.\n /// @param threshold The M/N threshold for the committee.\n event CommitteeRequested(\n uint256 indexed e3Id,\n address filter,\n uint32[2] threshold\n );\n\n /// @notice This event MUST be emitted when a committee is selected for an E3.\n /// @param e3Id ID of the E3 for which the committee was selected.\n /// @param publicKey Public key of the committee.\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\n\n /// @notice This event MUST be emitted when `enclave` is set.\n /// @param enclave Address of the enclave contract.\n event EnclaveSet(address indexed enclave);\n\n /// @notice This event MUST be emitted when a ciphernode is added to the registry.\n /// @param node Address of the ciphernode.\n /// @param index Index of the ciphernode in the registry.\n /// @param numNodes Number of ciphernodes in the registry.\n /// @param size Size of the registry.\n event CiphernodeAdded(\n address indexed node,\n uint256 index,\n uint256 numNodes,\n uint256 size\n );\n\n /// @notice This event MUST be emitted when a ciphernode is removed from the registry.\n /// @param node Address of the ciphernode.\n /// @param index Index of the ciphernode in the registry.\n /// @param numNodes Number of ciphernodes in the registry.\n /// @param size Size of the registry.\n event CiphernodeRemoved(\n address indexed node,\n uint256 index,\n uint256 numNodes,\n uint256 size\n );\n\n function isCiphernodeEligible(address ciphernode) external returns (bool);\n\n /// @notice Initiates the committee selection process for a specified E3.\n /// @dev This function MUST revert when not called by the Enclave contract.\n /// @param e3Id ID of the E3 for which to select the committee.\n /// @param filter The address of the filter responsible for the committee selection process.\n /// @param threshold The M/N threshold for the committee.\n /// @return success True if committee selection was successfully initiated.\n function requestCommittee(\n uint256 e3Id,\n address filter,\n uint32[2] calldata threshold\n ) external returns (bool success);\n\n /// @notice Publishes the public key resulting from the committee selection process.\n /// @dev This function MUST revert if not called by the previously selected filter.\n /// @param e3Id ID of the E3 for which to select the committee.\n /// @param publicKey The hash of the public key generated by the given committee.\n function publishCommittee(\n uint256 e3Id,\n bytes calldata proof,\n bytes calldata publicKey\n ) external;\n\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\n /// @dev This function MUST revert if no committee has been requested for the given E3.\n /// @dev This function MUST revert if the committee has not yet published a public key.\n /// @param e3Id ID of the E3 for which to get the committee public key.\n /// @return publicKeyHash The hash of the public key of the given committee.\n function committeePublicKey(\n uint256 e3Id\n ) external view returns (bytes32 publicKeyHash);\n}\n" + }, + "contracts/interfaces/IComputeProvider.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IDecryptionVerifier } from \"./IDecryptionVerifier.sol\";\n\ninterface IComputeProvider {\n /// @notice This function should be called by the Enclave contract to validate the compute provider parameters.\n /// @param params ABI encoded compute provider parameters.\n function validate(\n uint256 e3Id,\n uint256 seed,\n bytes calldata params\n ) external returns (IDecryptionVerifier decryptionVerifier);\n}\n" + }, + "contracts/interfaces/IDecryptionVerifier.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\ninterface IDecryptionVerifier {\n /// @notice This function should be called by the Enclave contract to verify the\n /// decryption of output of a computation.\n /// @param e3Id ID of the E3.\n /// @param plaintextOutputHash The keccak256 hash of the plaintext output to be verified.\n /// @param proof ABI encoded proof of the given output hash.\n /// @return success Whether or not the plaintextOutputHash was successfully verified.\n function verify(\n uint256 e3Id,\n bytes32 plaintextOutputHash,\n bytes memory proof\n ) external view returns (bool success);\n}\n" + }, + "contracts/interfaces/IE3.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IInputValidator } from \"./IInputValidator.sol\";\nimport { IE3Program } from \"./IE3Program.sol\";\nimport { IDecryptionVerifier } from \"./IDecryptionVerifier.sol\";\n\n/// @title E3 struct\n/// @notice This struct represents an E3 computation.\n/// @param threshold M/N threshold for the committee.\n/// @param startWindow Start window for the computation: index zero is minimum, index 1 is the maxium.\n/// @param duration Duration of the E3.\n/// @param expiration Timestamp when committee duties expire.\n/// @param e3Program Address of the E3 Program contract.\n/// @param computeProvider Address of the compute provider contract.\n/// @param inputValidator Address of the input validator contract.\n/// @param decryptionVerifier Address of the output verifier contract.\n/// @param committeeId ID of the selected committee.\n/// @param ciphertextOutput Encrypted output data.\n/// @param plaintextOutput Decrypted output data.\nstruct E3 {\n uint256 seed;\n uint32[2] threshold;\n uint256[2] startWindow;\n uint256 duration;\n uint256 expiration;\n bytes32 encryptionSchemeId;\n IE3Program e3Program;\n bytes e3ProgramParams;\n IInputValidator inputValidator;\n IDecryptionVerifier decryptionVerifier;\n bytes32 committeePublicKey;\n bytes32 ciphertextOutput;\n bytes plaintextOutput;\n}\n" + }, + "contracts/interfaces/IE3Program.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IInputValidator } from \"./IInputValidator.sol\";\n\ninterface IE3Program {\n /// @notice This function should be called by the Enclave contract to validate the computation parameters.\n /// @param e3Id ID of the E3.\n /// @param seed Seed for the computation.\n /// @param e3ProgramParams ABI encoded computation parameters.\n /// @param computeProviderParams ABI encoded compute provider parameters.\n /// @return encryptionSchemeId ID of the encryption scheme to be used for the computation.\n /// @return inputValidator The input validator to be used for the computation.\n function validate(\n uint256 e3Id,\n uint256 seed,\n bytes calldata e3ProgramParams,\n bytes calldata computeProviderParams\n )\n external\n returns (bytes32 encryptionSchemeId, IInputValidator inputValidator);\n\n /// @notice This function should be called by the Enclave contract to verify the decrypted output of an E3.\n /// @param e3Id ID of the E3.\n /// @param ciphertextOutputHash The keccak256 hash of output data to be verified.\n /// @param proof ABI encoded data to verify the ciphertextOutputHash.\n /// @return success Whether the output data is valid.\n function verify(\n uint256 e3Id,\n bytes32 ciphertextOutputHash,\n bytes memory proof\n ) external returns (bool success);\n}\n" + }, + "contracts/interfaces/IEnclave.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { E3, IE3Program } from \"./IE3.sol\";\n\ninterface IEnclave {\n ////////////////////////////////////////////////////////////\n // //\n // Events //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\n /// @param e3Id ID of the E3.\n /// @param e3 Details of the E3.\n /// @param filter Address of the pool of nodes from which the Cipher Node committee was selected.\n /// @param e3Program Address of the Computation module selected.\n event E3Requested(\n uint256 e3Id,\n E3 e3,\n address filter,\n IE3Program indexed e3Program\n );\n\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\n /// @param e3Id ID of the E3.\n /// @param expiration Timestamp when committee duties expire.\n /// @param committeePublicKey Public key of the committee.\n event E3Activated(\n uint256 e3Id,\n uint256 expiration,\n bytes committeePublicKey\n );\n\n /// @notice This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is\n /// successfully published.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded input data.\n event InputPublished(\n uint256 indexed e3Id,\n bytes data,\n uint256 inputHash,\n uint256 index\n );\n\n /// @notice This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3)\n /// is successfully published.\n /// @param e3Id ID of the E3.\n /// @param plaintextOutput ABI encoded plaintext output.\n event PlaintextOutputPublished(uint256 indexed e3Id, bytes plaintextOutput);\n\n /// @notice This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3)\n /// is successfully published.\n /// @param e3Id ID of the E3.\n /// @param ciphertextOutput ABI encoded ciphertext output.\n event CiphertextOutputPublished(\n uint256 indexed e3Id,\n bytes ciphertextOutput\n );\n\n /// @notice This event MUST be emitted any time the `maxDuration` is set.\n /// @param maxDuration The maximum duration of a computation in seconds.\n event MaxDurationSet(uint256 maxDuration);\n\n /// @notice This event MUST be emitted any time the CiphernodeRegistry is set.\n /// @param ciphernodeRegistry The address of the CiphernodeRegistry contract.\n event CiphernodeRegistrySet(address ciphernodeRegistry);\n\n /// @notice The event MUST be emitted any time an encryption scheme is enabled.\n /// @param encryptionSchemeId The ID of the encryption scheme that was enabled.\n event EncryptionSchemeEnabled(bytes32 encryptionSchemeId);\n\n /// @notice This event MUST be emitted any time an encryption scheme is disabled.\n /// @param encryptionSchemeId The ID of the encryption scheme that was disabled.\n event EncryptionSchemeDisabled(bytes32 encryptionSchemeId);\n\n /// @notice This event MUST be emitted any time a E3 Program is enabled.\n /// @param e3Program The address of the E3 Program.\n event E3ProgramEnabled(IE3Program e3Program);\n\n /// @notice This event MUST be emitted any time a E3 Program is disabled.\n /// @param e3Program The address of the E3 Program.\n event E3ProgramDisabled(IE3Program e3Program);\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to request a computation within an Encrypted Execution Environment (E3).\n /// @dev This function MUST emit the E3Requested event.\n /// @param filter IDs of the pool of nodes from which to select the committee.\n /// @param threshold The M/N threshold for the committee.\n /// @param duration The duration of the computation in seconds.\n /// @param e3Program Address of the E3 Program.\n /// @param e3ProgramParams ABI encoded computation parameters.\n /// @param computeProviderParams ABI encoded compute provider parameters.\n /// @return e3Id ID of the E3.\n /// @return e3 The E3 struct.\n function request(\n address filter,\n uint32[2] calldata threshold,\n uint256[2] calldata startWindow,\n uint256 duration,\n IE3Program e3Program,\n bytes memory e3ProgramParams,\n bytes memory computeProviderParams\n ) external payable returns (uint256 e3Id, E3 memory e3);\n\n /// @notice This function should be called to activate an Encrypted Execution Environment (E3) once it has been\n /// initialized and is ready for input.\n /// @dev This function MUST emit the E3Activated event.\n /// @dev This function MUST revert if the given E3 has not yet been requested.\n /// @dev This function MUST revert if the selected node committee has not yet published a public key.\n /// @param e3Id ID of the E3.\n /// @param publicKey Public key of the committee.\n /// @return success True if the E3 was successfully activated.\n function activate(\n uint256 e3Id,\n bytes memory publicKey\n ) external returns (bool success);\n\n /// @notice This function should be called to publish input data for Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the E3 is not yet activated.\n /// @dev This function MUST emit the InputPublished event.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded input data to publish.\n /// @return success True if the input was successfully published.\n function publishInput(\n uint256 e3Id,\n bytes calldata data\n ) external returns (bool success);\n\n /// @notice This function should be called to publish output data for an Encrypted Execution Environment (E3).\n /// @dev This function MUST emit the CiphertextOutputPublished event.\n /// @param e3Id ID of the E3.\n /// @param ciphertextOutput ABI encoded output data to verify.\n /// @param proof ABI encoded data to verify the ciphertextOutput.\n /// @return success True if the output was successfully published.\n function publishCiphertextOutput(\n uint256 e3Id,\n bytes memory ciphertextOutput,\n bytes memory proof\n ) external returns (bool success);\n\n /// @notice This function publishes the plaintext output of an Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the output has not been published.\n /// @dev This function MUST emit the PlaintextOutputPublished event.\n /// @param e3Id ID of the E3.\n /// @param plaintextOutput ABI encoded plaintext output.\n /// @param proof ABI encoded data to verify the plaintextOutput.\n function publishPlaintextOutput(\n uint256 e3Id,\n bytes memory plaintextOutput,\n bytes memory proof\n ) external returns (bool success);\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to set the maximum duration of requested computations.\n /// @param _maxDuration The maximum duration of a computation in seconds.\n /// @return success True if the max duration was successfully set.\n function setMaxDuration(\n uint256 _maxDuration\n ) external returns (bool success);\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the E3 does not exist.\n /// @param e3Id ID of the E3.\n /// @return e3 The struct representing the requested E3.\n function getE3(uint256 e3Id) external view returns (E3 memory e3);\n\n /// @notice This function returns root of the input merkle tree for a given E3.\n /// @dev This function MUST revert if the E3 does not exist.\n /// @param e3Id ID of the E3.\n /// @return root The root of the input merkle tree.\n function getInputRoot(uint256 e3Id) external view returns (uint256 root);\n}\n" + }, + "contracts/interfaces/IInputValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\ninterface IInputValidator {\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\n /// @param params ABI encoded input parameters.\n /// @return input The input data to be published.\n /// @return success Whether the input parameters are valid.\n function validate(\n address sender,\n bytes memory params\n ) external returns (bytes memory input, bool success);\n}\n" + }, + "contracts/interfaces/IRegistryFilter.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\ninterface IRegistryFilter {\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external returns (bool success);\n}\n" + }, + "contracts/registry/CiphernodeRegistryOwnable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { ICiphernodeRegistry } from \"../interfaces/ICiphernodeRegistry.sol\";\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n InternalLeanIMT,\n LeanIMTData\n} from \"@zk-kit/lean-imt.sol/InternalLeanIMT.sol\";\n\ncontract CiphernodeRegistryOwnable is ICiphernodeRegistry, OwnableUpgradeable {\n using InternalLeanIMT for LeanIMTData;\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public enclave;\n uint256 public numCiphernodes;\n LeanIMTData public ciphernodes;\n\n mapping(uint256 e3Id => IRegistryFilter filter) public filters;\n mapping(uint256 e3Id => uint256 root) public roots;\n mapping(uint256 e3Id => bytes32 publicKeyHash) public publicKeyHashes;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyRequested();\n error CommitteeAlreadyPublished();\n error OnlyFilter();\n error CommitteeNotPublished();\n error CiphernodeNotEnabled(address node);\n error OnlyEnclave();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyEnclave() {\n require(msg.sender == enclave, OnlyEnclave());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _enclave) {\n initialize(_owner, _enclave);\n }\n\n function initialize(address _owner, address _enclave) public initializer {\n __Ownable_init(msg.sender);\n setEnclave(_enclave);\n if (_owner != owner()) transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n address filter,\n uint32[2] calldata threshold\n ) external onlyEnclave returns (bool success) {\n require(\n filters[e3Id] == IRegistryFilter(address(0)),\n CommitteeAlreadyRequested()\n );\n filters[e3Id] = IRegistryFilter(filter);\n roots[e3Id] = root();\n\n IRegistryFilter(filter).requestCommittee(e3Id, threshold);\n emit CommitteeRequested(e3Id, filter, threshold);\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n bytes calldata,\n bytes calldata publicKey\n ) external {\n // only to be published by the filter\n require(address(filters[e3Id]) == msg.sender, OnlyFilter());\n\n publicKeyHashes[e3Id] = keccak256(publicKey);\n emit CommitteePublished(e3Id, publicKey);\n }\n\n function addCiphernode(address node) external onlyOwner {\n uint160 ciphernode = uint160(node);\n ciphernodes._insert(ciphernode);\n numCiphernodes++;\n emit CiphernodeAdded(\n node,\n ciphernodes._indexOf(ciphernode),\n numCiphernodes,\n ciphernodes.size\n );\n }\n\n function removeCiphernode(\n address node,\n uint256[] calldata siblingNodes\n ) external onlyOwner {\n uint160 ciphernode = uint160(node);\n uint256 index = ciphernodes._indexOf(ciphernode);\n ciphernodes._remove(ciphernode, siblingNodes);\n numCiphernodes--;\n emit CiphernodeRemoved(node, index, numCiphernodes, ciphernodes.size);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setEnclave(address _enclave) public onlyOwner {\n enclave = _enclave;\n emit EnclaveSet(_enclave);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function committeePublicKey(\n uint256 e3Id\n ) external view returns (bytes32 publicKeyHash) {\n publicKeyHash = publicKeyHashes[e3Id];\n require(publicKeyHash != bytes32(0), CommitteeNotPublished());\n }\n\n function isCiphernodeEligible(address node) external view returns (bool) {\n return isEnabled(node);\n }\n\n function isEnabled(address node) public view returns (bool) {\n return ciphernodes._has(uint160(node));\n }\n\n function root() public view returns (uint256) {\n return (ciphernodes._root());\n }\n\n function rootAt(uint256 e3Id) public view returns (uint256) {\n return roots[e3Id];\n }\n\n function getFilter(uint256 e3Id) public view returns (IRegistryFilter) {\n return filters[e3Id];\n }\n\n function treeSize() public view returns (uint256) {\n return ciphernodes.size;\n }\n}\n" + }, + "contracts/registry/NaiveRegistryFilter.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { ICiphernodeRegistry } from \"../interfaces/ICiphernodeRegistry.sol\";\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ncontract NaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\n struct Committee {\n address[] nodes;\n uint32[2] threshold;\n bytes32 publicKey;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public registry;\n\n mapping(uint256 e3 => Committee committee) public committees;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyExists();\n error CommitteeAlreadyPublished();\n error CommitteeDoesNotExist();\n error CommitteeNotPublished();\n error OnlyRegistry();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyRegistry() {\n require(msg.sender == registry, OnlyRegistry());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _registry) {\n initialize(_owner, _registry);\n }\n\n function initialize(address _owner, address _registry) public initializer {\n __Ownable_init(msg.sender);\n setRegistry(_registry);\n if (_owner != owner()) transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external onlyRegistry returns (bool success) {\n require(committees[e3Id].threshold[1] == 0, CommitteeAlreadyExists());\n committees[e3Id].threshold = threshold;\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n address[] memory nodes,\n bytes memory publicKey\n ) external onlyOwner {\n Committee storage committee = committees[e3Id];\n require(committee.publicKey == bytes32(0), CommitteeAlreadyPublished());\n committee.nodes = nodes;\n committee.publicKey = keccak256(publicKey);\n ICiphernodeRegistry(registry).publishCommittee(\n e3Id,\n abi.encode(nodes),\n publicKey\n );\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setRegistry(address _registry) public onlyOwner {\n registry = _registry;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function getCommittee(\n uint256 e3Id\n ) external view returns (Committee memory) {\n return committees[e3Id];\n }\n}\n" + }, + "contracts/test/MockCiphernodeRegistry.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { ICiphernodeRegistry } from \"../interfaces/ICiphernodeRegistry.sol\";\n\ncontract MockCiphernodeRegistry is ICiphernodeRegistry {\n function requestCommittee(\n uint256,\n address filter,\n uint32[2] calldata\n ) external pure returns (bool success) {\n if (filter == address(2)) {\n success = false;\n } else {\n success = true;\n }\n }\n\n // solhint-disable no-empty-blocks\n function publishCommittee(\n uint256,\n bytes calldata,\n bytes calldata\n ) external {} // solhint-disable-line no-empty-blocks\n\n function committeePublicKey(uint256 e3Id) external pure returns (bytes32) {\n if (e3Id == type(uint256).max) {\n return bytes32(0);\n } else {\n return keccak256(abi.encode(e3Id));\n }\n }\n\n function isCiphernodeEligible(address) external pure returns (bool) {\n return false;\n }\n}\n\ncontract MockCiphernodeRegistryEmptyKey is ICiphernodeRegistry {\n function requestCommittee(\n uint256,\n address filter,\n uint32[2] calldata\n ) external pure returns (bool success) {\n if (filter == address(2)) {\n success = false;\n } else {\n success = true;\n }\n }\n\n // solhint-disable no-empty-blocks\n function publishCommittee(\n uint256,\n bytes calldata,\n bytes calldata\n ) external {} // solhint-disable-line no-empty-blocks\n\n function committeePublicKey(uint256) external pure returns (bytes32) {\n return bytes32(0);\n }\n\n function isCiphernodeEligible(address) external pure returns (bool) {\n return false;\n }\n}\n" + }, + "contracts/test/MockComputeProvider.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport {\n IComputeProvider,\n IDecryptionVerifier\n} from \"../interfaces/IComputeProvider.sol\";\n\ncontract MockComputeProvider is IComputeProvider {\n error invalidParams();\n\n function validate(\n uint256,\n uint256,\n bytes memory params\n ) external pure returns (IDecryptionVerifier decryptionVerifier) {\n require(params.length == 32, invalidParams());\n // solhint-disable no-inline-assembly\n assembly {\n decryptionVerifier := mload(add(params, 32))\n }\n (decryptionVerifier) = abi.decode(params, (IDecryptionVerifier));\n }\n}\n" + }, + "contracts/test/MockDecryptionVerifier.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IDecryptionVerifier } from \"../interfaces/IDecryptionVerifier.sol\";\n\ncontract MockDecryptionVerifier is IDecryptionVerifier {\n function verify(\n uint256,\n bytes32,\n bytes memory data\n ) external pure returns (bool success) {\n data;\n\n if (data.length > 0) success = true;\n }\n}\n" + }, + "contracts/test/MockE3Program.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IE3Program, IInputValidator } from \"../interfaces/IE3Program.sol\";\n\ncontract MockE3Program is IE3Program {\n error invalidParams(bytes e3ProgramParams, bytes computeProviderParams);\n\n bytes32 public constant ENCRYPTION_SCHEME_ID = keccak256(\"fhe.rs:BFV\");\n\n IInputValidator private storageInputValidator;\n\n constructor(IInputValidator _inputValidator) {\n storageInputValidator = _inputValidator;\n }\n\n function setInputValidator(IInputValidator _inputValidator) external {\n storageInputValidator = _inputValidator;\n }\n\n function validate(\n uint256,\n uint256,\n bytes memory e3ProgramParams,\n bytes memory computeProviderParams\n )\n external\n view\n returns (bytes32 encryptionSchemeId, IInputValidator inputValidator)\n {\n require(\n computeProviderParams.length == 32,\n invalidParams(e3ProgramParams, computeProviderParams)\n );\n\n inputValidator = storageInputValidator;\n encryptionSchemeId = ENCRYPTION_SCHEME_ID;\n }\n\n function verify(\n uint256,\n bytes32,\n bytes memory data\n ) external pure returns (bool success) {\n data;\n if (data.length > 0) success = true;\n }\n}\n" + }, + "contracts/test/MockInputValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IInputValidator } from \"../interfaces/IInputValidator.sol\";\n\ncontract MockInputValidator is IInputValidator {\n function validate(\n address,\n bytes memory params\n ) external pure returns (bytes memory input, bool success) {\n input = params;\n\n if (input.length == 3) {\n success = false;\n } else {\n success = true;\n }\n }\n}\n" + }, + "contracts/test/MockRegistryFilter.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.27;\n\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ninterface IRegistry {\n function publishCommittee(\n uint256 e3Id,\n address[] calldata ciphernodes,\n bytes calldata publicKey\n ) external;\n}\n\ncontract MockNaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\n struct Committee {\n address[] nodes;\n uint32[2] threshold;\n bytes publicKey;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public registry;\n\n mapping(uint256 e3 => Committee committee) public committees;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyExists();\n error CommitteeAlreadyPublished();\n error CommitteeDoesNotExist();\n error CommitteeNotPublished();\n error OnlyRegistry();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyRegistry() {\n require(msg.sender == registry, OnlyRegistry());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _enclave) {\n initialize(_owner, _enclave);\n }\n\n function initialize(address _owner, address _registry) public initializer {\n __Ownable_init(msg.sender);\n setRegistry(_registry);\n if (_owner != owner()) transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external onlyRegistry returns (bool success) {\n Committee storage committee = committees[e3Id];\n require(committee.threshold.length == 0, CommitteeAlreadyExists());\n committee.threshold = threshold;\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n address[] memory nodes,\n bytes memory publicKey\n ) external onlyOwner {\n Committee storage committee = committees[e3Id];\n require(\n keccak256(committee.publicKey) == keccak256(hex\"\"),\n CommitteeAlreadyPublished()\n );\n committee.nodes = nodes;\n committee.publicKey = publicKey;\n IRegistry(registry).publishCommittee(e3Id, nodes, publicKey);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setRegistry(address _registry) public onlyOwner {\n registry = _registry;\n }\n}\n" + }, + "poseidon-solidity/PoseidonT3.sol": { + "content": "/// SPDX-License-Identifier: MIT\npragma solidity >=0.7.0;\n\nlibrary PoseidonT3 {\n uint constant M00 = 0x109b7f411ba0e4c9b2b70caf5c36a7b194be7c11ad24378bfedb68592ba8118b;\n uint constant M01 = 0x2969f27eed31a480b9c36c764379dbca2cc8fdd1415c3dded62940bcde0bd771;\n uint constant M02 = 0x143021ec686a3f330d5f9e654638065ce6cd79e28c5b3753326244ee65a1b1a7;\n uint constant M10 = 0x16ed41e13bb9c0c66ae119424fddbcbc9314dc9fdbdeea55d6c64543dc4903e0;\n uint constant M11 = 0x2e2419f9ec02ec394c9871c832963dc1b89d743c8c7b964029b2311687b1fe23;\n uint constant M12 = 0x176cc029695ad02582a70eff08a6fd99d057e12e58e7d7b6b16cdfabc8ee2911;\n\n // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40\n // Inspired by: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js\n function hash(uint[2] memory) public pure returns (uint) {\n assembly {\n let F := 21888242871839275222246405745257275088548364400416034343698204186575808495617\n let M20 := 0x2b90bba00fca0589f617e7dcbfe82e0df706ab640ceb247b791a93b74e36736d\n let M21 := 0x101071f0032379b697315876690f053d148d4e109f5fb065c8aacc55a0f89bfa\n let M22 := 0x19a3fc0a56702bf417ba7fee3802593fa644470307043f7773279cd71d25d5e0\n\n // load the inputs from memory\n let state1 := add(mod(mload(0x80), F), 0x00f1445235f2148c5986587169fc1bcd887b08d4d00868df5696fff40956e864)\n let state2 := add(mod(mload(0xa0), F), 0x08dff3487e8ac99e1f29a058d0fa80b930c728730b7ab36ce879f3890ecf73f5)\n let scratch0 := mulmod(state1, state1, F)\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\n scratch0 := mulmod(state2, state2, F)\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\n scratch0 := add(\n 0x2f27be690fdaee46c3ce28f7532b13c856c35342c84bda6e20966310fadc01d0,\n add(add(15452833169820924772166449970675545095234312153403844297388521437673434406763, mulmod(state1, M10, F)), mulmod(state2, M20, F))\n )\n let scratch1 := add(\n 0x2b2ae1acf68b7b8d2416bebf3d4f6234b763fe04b8043ee48b8327bebca16cf2,\n add(add(18674271267752038776579386132900109523609358935013267566297499497165104279117, mulmod(state1, M11, F)), mulmod(state2, M21, F))\n )\n let scratch2 := add(\n 0x0319d062072bef7ecca5eac06f97d4d55952c175ab6b03eae64b44c7dbf11cfa,\n add(add(14817777843080276494683266178512808687156649753153012854386334860566696099579, mulmod(state1, M12, F)), mulmod(state2, M22, F))\n )\n let state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := mulmod(scratch1, scratch1, F)\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\n state0 := mulmod(scratch2, scratch2, F)\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\n state0 := add(0x28813dcaebaeaa828a376df87af4a63bc8b7bf27ad49c6298ef7b387bf28526d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x2727673b2ccbc903f181bf38e1c1d40d2033865200c352bc150928adddf9cb78, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x234ec45ca27727c2e74abd2b2a1494cd6efbd43e340587d6b8fb9e31e65cc632, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := mulmod(state1, state1, F)\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\n scratch0 := mulmod(state2, state2, F)\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\n scratch0 := add(0x15b52534031ae18f7f862cb2cf7cf760ab10a8150a337b1ccd99ff6e8797d428, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0dc8fad6d9e4b35f5ed9a3d186b79ce38e0e8a8d1b58b132d701d4eecf68d1f6, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x1bcd95ffc211fbca600f705fad3fb567ea4eb378f62e1fec97805518a47e4d9c, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := mulmod(scratch1, scratch1, F)\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\n state0 := mulmod(scratch2, scratch2, F)\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\n state0 := add(0x10520b0ab721cadfe9eff81b016fc34dc76da36c2578937817cb978d069de559, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1f6d48149b8e7f7d9b257d8ed5fbbaf42932498075fed0ace88a9eb81f5627f6, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1d9655f652309014d29e00ef35a2089bfff8dc1c816f0dc9ca34bdb5460c8705, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x04df5a56ff95bcafb051f7b1cd43a99ba731ff67e47032058fe3d4185697cc7d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0672d995f8fff640151b3d290cedaf148690a10a8c8424a7f6ec282b6e4be828, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x099952b414884454b21200d7ffafdd5f0c9a9dcc06f2708e9fc1d8209b5c75b9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x052cba2255dfd00c7c483143ba8d469448e43586a9b4cd9183fd0e843a6b9fa6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0b8badee690adb8eb0bd74712b7999af82de55707251ad7716077cb93c464ddc, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x119b1590f13307af5a1ee651020c07c749c15d60683a8050b963d0a8e4b2bdd1, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x03150b7cd6d5d17b2529d36be0f67b832c4acfc884ef4ee5ce15be0bfb4a8d09, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2cc6182c5e14546e3cf1951f173912355374efb83d80898abe69cb317c9ea565, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x005032551e6378c450cfe129a404b3764218cadedac14e2b92d2cd73111bf0f9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x233237e3289baa34bb147e972ebcb9516469c399fcc069fb88f9da2cc28276b5, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x05c8f4f4ebd4a6e3c980d31674bfbe6323037f21b34ae5a4e80c2d4c24d60280, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x0a7b1db13042d396ba05d818a319f25252bcf35ef3aeed91ee1f09b2590fc65b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2a73b71f9b210cf5b14296572c9d32dbf156e2b086ff47dc5df542365a404ec0, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1ac9b0417abcc9a1935107e9ffc91dc3ec18f2c4dbe7f22976a760bb5c50c460, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x12c0339ae08374823fabb076707ef479269f3e4d6cb104349015ee046dc93fc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x0b7475b102a165ad7f5b18db4e1e704f52900aa3253baac68246682e56e9a28e, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x037c2849e191ca3edb1c5e49f6e8b8917c843e379366f2ea32ab3aa88d7f8448, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x05a6811f8556f014e92674661e217e9bd5206c5c93a07dc145fdb176a716346f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x29a795e7d98028946e947b75d54e9f044076e87a7b2883b47b675ef5f38bd66e, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x20439a0c84b322eb45a3857afc18f5826e8c7382c8a1585c507be199981fd22f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2e0ba8d94d9ecf4a94ec2050c7371ff1bb50f27799a84b6d4a2a6f2a0982c887, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x143fd115ce08fb27ca38eb7cce822b4517822cd2109048d2e6d0ddcca17d71c8, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0c64cbecb1c734b857968dbbdcf813cdf8611659323dbcbfc84323623be9caf1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x028a305847c683f646fca925c163ff5ae74f348d62c2b670f1426cef9403da53, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2e4ef510ff0b6fda5fa940ab4c4380f26a6bcb64d89427b824d6755b5db9e30c, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0081c95bc43384e663d79270c956ce3b8925b4f6d033b078b96384f50579400e, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2ed5f0c91cbd9749187e2fade687e05ee2491b349c039a0bba8a9f4023a0bb38, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x30509991f88da3504bbf374ed5aae2f03448a22c76234c8c990f01f33a735206, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1c3f20fd55409a53221b7c4d49a356b9f0a1119fb2067b41a7529094424ec6ad, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x10b4e7f3ab5df003049514459b6e18eec46bb2213e8e131e170887b47ddcb96c, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2a1982979c3ff7f43ddd543d891c2abddd80f804c077d775039aa3502e43adef, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1c74ee64f15e1db6feddbead56d6d55dba431ebc396c9af95cad0f1315bd5c91, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x07533ec850ba7f98eab9303cace01b4b9e4f2e8b82708cfa9c2fe45a0ae146a0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x21576b438e500449a151e4eeaf17b154285c68f42d42c1808a11abf3764c0750, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x2f17c0559b8fe79608ad5ca193d62f10bce8384c815f0906743d6930836d4a9e, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x2d477e3862d07708a79e8aae946170bc9775a4201318474ae665b0b1b7e2730e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x162f5243967064c390e095577984f291afba2266c38f5abcd89be0f5b2747eab, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2b4cb233ede9ba48264ecd2c8ae50d1ad7a8596a87f29f8a7777a70092393311, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2c8fbcb2dd8573dc1dbaf8f4622854776db2eece6d85c4cf4254e7c35e03b07a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x1d6f347725e4816af2ff453f0cd56b199e1b61e9f601e9ade5e88db870949da9, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x204b0c397f4ebe71ebc2d8b3df5b913df9e6ac02b68d31324cd49af5c4565529, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x0c4cb9dc3c4fd8174f1149b3c63c3c2f9ecb827cd7dc25534ff8fb75bc79c502, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x174ad61a1448c899a25416474f4930301e5c49475279e0639a616ddc45bc7b54, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1a96177bcf4d8d89f759df4ec2f3cde2eaaa28c177cc0fa13a9816d49a38d2ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x066d04b24331d71cd0ef8054bc60c4ff05202c126a233c1a8242ace360b8a30a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x2a4c4fc6ec0b0cf52195782871c6dd3b381cc65f72e02ad527037a62aa1bd804, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x13ab2d136ccf37d447e9f2e14a7cedc95e727f8446f6d9d7e55afc01219fd649, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1121552fca26061619d24d843dc82769c1b04fcec26f55194c2e3e869acc6a9a, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x00ef653322b13d6c889bc81715c37d77a6cd267d595c4a8909a5546c7c97cff1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0e25483e45a665208b261d8ba74051e6400c776d652595d9845aca35d8a397d3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x29f536dcb9dd7682245264659e15d88e395ac3d4dde92d8c46448db979eeba89, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x2a56ef9f2c53febadfda33575dbdbd885a124e2780bbea170e456baace0fa5be, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1c8361c78eb5cf5decfb7a2d17b5c409f2ae2999a46762e8ee416240a8cb9af1, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x151aff5f38b20a0fc0473089aaf0206b83e8e68a764507bfd3d0ab4be74319c5, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x04c6187e41ed881dc1b239c88f7f9d43a9f52fc8c8b6cdd1e76e47615b51f100, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x13b37bd80f4d27fb10d84331f6fb6d534b81c61ed15776449e801b7ddc9c2967, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x01a5c536273c2d9df578bfbd32c17b7a2ce3664c2a52032c9321ceb1c4e8a8e4, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x2ab3561834ca73835ad05f5d7acb950b4a9a2c666b9726da832239065b7c3b02, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1d4d8ec291e720db200fe6d686c0d613acaf6af4e95d3bf69f7ed516a597b646, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x041294d2cc484d228f5784fe7919fd2bb925351240a04b711514c9c80b65af1d, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x154ac98e01708c611c4fa715991f004898f57939d126e392042971dd90e81fc6, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0b339d8acca7d4f83eedd84093aef51050b3684c88f8b0b04524563bc6ea4da4, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x0955e49e6610c94254a4f84cfbab344598f0e71eaff4a7dd81ed95b50839c82e, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x06746a6156eba54426b9e22206f15abca9a6f41e6f535c6f3525401ea0654626, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0f18f5a0ecd1423c496f3820c549c27838e5790e2bd0a196ac917c7ff32077fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x04f6eeca1751f7308ac59eff5beb261e4bb563583ede7bc92a738223d6f76e13, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2b56973364c4c4f5c1a3ec4da3cdce038811eb116fb3e45bc1768d26fc0b3758, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x123769dd49d5b054dcd76b89804b1bcb8e1392b385716a5d83feb65d437f29ef, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2147b424fc48c80a88ee52b91169aacea989f6446471150994257b2fb01c63e9, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x0fdc1f58548b85701a6c5505ea332a29647e6f34ad4243c2ea54ad897cebe54d, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x12373a8251fea004df68abcf0f7786d4bceff28c5dbbe0c3944f685cc0a0b1f2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x21e4f4ea5f35f85bad7ea52ff742c9e8a642756b6af44203dd8a1f35c1a90035, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x16243916d69d2ca3dfb4722224d4c462b57366492f45e90d8a81934f1bc3b147, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1efbe46dd7a578b4f66f9adbc88b4378abc21566e1a0453ca13a4159cac04ac2, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x07ea5e8537cf5dd08886020e23a7f387d468d5525be66f853b672cc96a88969a, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x05a8c4f9968b8aa3b7b478a30f9a5b63650f19a75e7ce11ca9fe16c0b76c00bc, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x20f057712cc21654fbfe59bd345e8dac3f7818c701b9c7882d9d57b72a32e83f, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x04a12ededa9dfd689672f8c67fee31636dcd8e88d01d49019bd90b33eb33db69, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x27e88d8c15f37dcee44f1e5425a51decbd136ce5091a6767e49ec9544ccd101a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2feed17b84285ed9b8a5c8c5e95a41f66e096619a7703223176c41ee433de4d1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x1ed7cc76edf45c7c404241420f729cf394e5942911312a0d6972b8bd53aff2b8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x15742e99b9bfa323157ff8c586f5660eac6783476144cdcadf2874be45466b1a, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1aac285387f65e82c895fc6887ddf40577107454c6ec0317284f033f27d0c785, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x25851c3c845d4790f9ddadbdb6057357832e2e7a49775f71ec75a96554d67c77, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x15a5821565cc2ec2ce78457db197edf353b7ebba2c5523370ddccc3d9f146a67, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2411d57a4813b9980efa7e31a1db5966dcf64f36044277502f15485f28c71727, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x002e6f8d6520cd4713e335b8c0b6d2e647e9a98e12f4cd2558828b5ef6cb4c9b, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x2ff7bc8f4380cde997da00b616b0fcd1af8f0e91e2fe1ed7398834609e0315d2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x00b9831b948525595ee02724471bcd182e9521f6b7bb68f1e93be4febb0d3cbe, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x0a2f53768b8ebf6a86913b0e57c04e011ca408648a4743a87d77adbf0c9c3512, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x00248156142fd0373a479f91ff239e960f599ff7e94be69b7f2a290305e1198d, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x171d5620b87bfb1328cf8c02ab3f0c9a397196aa6a542c2350eb512a2b2bcda9, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x170a4f55536f7dc970087c7c10d6fad760c952172dd54dd99d1045e4ec34a808, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x29aba33f799fe66c2ef3134aea04336ecc37e38c1cd211ba482eca17e2dbfae1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1e9bc179a4fdd758fdd1bb1945088d47e70d114a03f6a0e8b5ba650369e64973, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1dd269799b660fad58f7f4892dfb0b5afeaad869a9c4b44f9c9e1c43bdaf8f09, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x22cdbc8b70117ad1401181d02e15459e7ccd426fe869c7c95d1dd2cb0f24af38, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x0ef042e454771c533a9f57a55c503fcefd3150f52ed94a7cd5ba93b9c7dacefd, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x11609e06ad6c8fe2f287f3036037e8851318e8b08a0359a03b304ffca62e8284, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x1166d9e554616dba9e753eea427c17b7fecd58c076dfe42708b08f5b783aa9af, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x2de52989431a859593413026354413db177fbf4cd2ac0b56f855a888357ee466, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x3006eb4ffc7a85819a6da492f3a8ac1df51aee5b17b8e89d74bf01cf5f71e9ad, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2af41fbb61ba8a80fdcf6fff9e3f6f422993fe8f0a4639f962344c8225145086, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x119e684de476155fe5a6b41a8ebc85db8718ab27889e85e781b214bace4827c3, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x1835b786e2e8925e188bea59ae363537b51248c23828f047cff784b97b3fd800, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x28201a34c594dfa34d794996c6433a20d152bac2a7905c926c40e285ab32eeb6, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x083efd7a27d1751094e80fefaf78b000864c82eb571187724a761f88c22cc4e7, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x0b6f88a3577199526158e61ceea27be811c16df7774dd8519e079564f61fd13b, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x0ec868e6d15e51d9644f66e1d6471a94589511ca00d29e1014390e6ee4254f5b, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2af33e3f866771271ac0c9b3ed2e1142ecd3e74b939cd40d00d937ab84c98591, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x0b520211f904b5e7d09b5d961c6ace7734568c547dd6858b364ce5e47951f178, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x0b2d722d0919a1aad8db58f10062a92ea0c56ac4270e822cca228620188a1d40, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x1f790d4d7f8cf094d980ceb37c2453e957b54a9991ca38bbe0061d1ed6e562d4, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x0171eb95dfbf7d1eaea97cd385f780150885c16235a2a6a8da92ceb01e504233, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x0c2d0e3b5fd57549329bf6885da66b9b790b40defd2c8650762305381b168873, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1162fb28689c27154e5a8228b4e72b377cbcafa589e283c35d3803054407a18d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2f1459b65dee441b64ad386a91e8310f282c5a92a89e19921623ef8249711bc0, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x1e6ff3216b688c3d996d74367d5cd4c1bc489d46754eb712c243f70d1b53cfbb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x01ca8be73832b8d0681487d27d157802d741a6f36cdc2a0576881f9326478875, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1f7735706ffe9fc586f976d5bdf223dc680286080b10cea00b9b5de315f9650e, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2522b60f4ea3307640a0c2dce041fba921ac10a3d5f096ef4745ca838285f019, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x23f0bee001b1029d5255075ddc957f833418cad4f52b6c3f8ce16c235572575b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2bc1ae8b8ddbb81fcaac2d44555ed5685d142633e9df905f66d9401093082d59, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x0f9406b8296564a37304507b8dba3ed162371273a07b1fc98011fcd6ad72205f, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x2360a8eb0cc7defa67b72998de90714e17e75b174a52ee4acb126c8cd995f0a8, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x15871a5cddead976804c803cbaef255eb4815a5e96df8b006dcbbc2767f88948, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x193a56766998ee9e0a8652dd2f3b1da0362f4f54f72379544f957ccdeefb420f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x2a394a43934f86982f9be56ff4fab1703b2e63c8ad334834e4309805e777ae0f, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x1859954cfeb8695f3e8b635dcb345192892cd11223443ba7b4166e8876c0d142, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x04e1181763050e58013444dbcb99f1902b11bc25d90bbdca408d3819f4fed32b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0fdb253dee83869d40c335ea64de8c5bb10eb82db08b5e8b1f5e5552bfd05f23, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x058cbe8a9a5027bdaa4efb623adead6275f08686f1c08984a9d7c5bae9b4f1c0, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x1382edce9971e186497eadb1aeb1f52b23b4b83bef023ab0d15228b4cceca59a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x03464990f045c6ee0819ca51fd11b0be7f61b8eb99f14b77e1e6634601d9e8b5, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x23f7bfc8720dc296fff33b41f98ff83c6fcab4605db2eb5aaa5bc137aeb70a58, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x0a59a158e3eec2117e6e94e7f0e9decf18c3ffd5e1531a9219636158bbaf62f2, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x06ec54c80381c052b58bf23b312ffd3ce2c4eba065420af8f4c23ed0075fd07b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x118872dc832e0eb5476b56648e867ec8b09340f7a7bcb1b4962f0ff9ed1f9d01, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x13d69fa127d834165ad5c7cba7ad59ed52e0b0f0e42d7fea95e1906b520921b1, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x169a177f63ea681270b1c6877a73d21bde143942fb71dc55fd8a49f19f10c77b, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x04ef51591c6ead97ef42f287adce40d93abeb032b922f66ffb7e9a5a7450544d, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x256e175a1dc079390ecd7ca703fb2e3b19ec61805d4f03ced5f45ee6dd0f69ec, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x30102d28636abd5fe5f2af412ff6004f75cc360d3205dd2da002813d3e2ceeb2, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x10998e42dfcd3bbf1c0714bc73eb1bf40443a3fa99bef4a31fd31be182fcc792, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x193edd8e9fcf3d7625fa7d24b598a1d89f3362eaf4d582efecad76f879e36860, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x18168afd34f2d915d0368ce80b7b3347d1c7a561ce611425f2664d7aa51f0b5d, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x29383c01ebd3b6ab0c017656ebe658b6a328ec77bc33626e29e2e95b33ea6111, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x10646d2f2603de39a1f4ae5e7771a64a702db6e86fb76ab600bf573f9010c711, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0beb5e07d1b27145f575f1395a55bf132f90c25b40da7b3864d0242dcb1117fb, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x16d685252078c133dc0d3ecad62b5c8830f95bb2e54b59abdffbf018d96fa336, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x0a6abd1d833938f33c74154e0404b4b40a555bbbec21ddfafd672dd62047f01a, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1a679f5d36eb7b5c8ea12a4c2dedc8feb12dffeec450317270a6f19b34cf1860, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x0980fb233bd456c23974d50e0ebfde4726a423eada4e8f6ffbc7592e3f1b93d6, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x161b42232e61b84cbf1810af93a38fc0cece3d5628c9282003ebacb5c312c72b, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0ada10a90c7f0520950f7d47a60d5e6a493f09787f1564e5d09203db47de1a0b, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1a730d372310ba82320345a29ac4238ed3f07a8a2b4e121bb50ddb9af407f451, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x2c8120f268ef054f817064c369dda7ea908377feaba5c4dffbda10ef58e8c556, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1c7c8824f758753fa57c00789c684217b930e95313bcb73e6e7b8649a4968f70, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x2cd9ed31f5f8691c8e39e4077a74faa0f400ad8b491eb3f7b47b27fa3fd1cf77, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x23ff4f9d46813457cf60d92f57618399a5e022ac321ca550854ae23918a22eea, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x09945a5d147a4f66ceece6405dddd9d0af5a2c5103529407dff1ea58f180426d, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x188d9c528025d4c2b67660c6b771b90f7c7da6eaa29d3f268a6dd223ec6fc630, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x3050e37996596b7f81f68311431d8734dba7d926d3633595e0c0d8ddf4f0f47f, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x15af1169396830a91600ca8102c35c426ceae5461e3f95d89d829518d30afd78, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x1da6d09885432ea9a06d9f37f873d985dae933e351466b2904284da3320d8acc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := add(0x2796ea90d269af29f5f8acf33921124e4e4fad3dbe658945e546ee411ddaa9cb, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x202d7dd1da0f6b4b0325c8b3307742f01e15612ec8e9304a7cb0319e01d32d60, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x096d6790d05bb759156a952ba263d672a2d7f9c788f4c831a29dace4c0f8be5f, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := add(0x054efa1f65b0fce283808965275d877b438da23ce5b13e1963798cb1447d25a4, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x1b162f83d917e93edb3308c29802deb9d8aa690113b2e14864ccf6e18e4165f1, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x21e5241e12564dd6fd9f1cdd2a0de39eedfefc1466cc568ec5ceb745a0506edc, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := mulmod(scratch1, scratch1, F)\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\n state0 := mulmod(scratch2, scratch2, F)\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\n state0 := add(0x1cfb5662e8cf5ac9226a80ee17b36abecb73ab5f87e161927b4349e10e4bdf08, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x0f21177e302a771bbae6d8d1ecb373b62c99af346220ac0129c53f666eb24100, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1671522374606992affb0dd7f71b12bec4236aede6290546bcef7e1f515c2320, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := mulmod(state1, state1, F)\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\n scratch0 := mulmod(state2, state2, F)\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\n scratch0 := add(0x0fa3ec5b9488259c2eb4cf24501bfad9be2ec9e42c5cc8ccd419d2a692cad870, add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)))\n scratch1 := add(0x193c0e04e0bd298357cb266c1506080ed36edce85c648cc085e8c57b1ab54bba, add(add(mulmod(state0, M01, F), mulmod(state1, M11, F)), mulmod(state2, M21, F)))\n scratch2 := add(0x102adf8ef74735a27e9128306dcbc3c99f6f7291cd406578ce14ea2adaba68f8, add(add(mulmod(state0, M02, F), mulmod(state1, M12, F)), mulmod(state2, M22, F)))\n state0 := mulmod(scratch0, scratch0, F)\n scratch0 := mulmod(mulmod(state0, state0, F), scratch0, F)\n state0 := mulmod(scratch1, scratch1, F)\n scratch1 := mulmod(mulmod(state0, state0, F), scratch1, F)\n state0 := mulmod(scratch2, scratch2, F)\n scratch2 := mulmod(mulmod(state0, state0, F), scratch2, F)\n state0 := add(0x0fe0af7858e49859e2a54d6f1ad945b1316aa24bfbdd23ae40a6d0cb70c3eab1, add(add(mulmod(scratch0, M00, F), mulmod(scratch1, M10, F)), mulmod(scratch2, M20, F)))\n state1 := add(0x216f6717bbc7dedb08536a2220843f4e2da5f1daa9ebdefde8a5ea7344798d22, add(add(mulmod(scratch0, M01, F), mulmod(scratch1, M11, F)), mulmod(scratch2, M21, F)))\n state2 := add(0x1da55cc900f0d21f4a3e694391918a1b3c23b2ac773c6b3ef88e2e4228325161, add(add(mulmod(scratch0, M02, F), mulmod(scratch1, M12, F)), mulmod(scratch2, M22, F)))\n scratch0 := mulmod(state0, state0, F)\n state0 := mulmod(mulmod(scratch0, scratch0, F), state0, F)\n scratch0 := mulmod(state1, state1, F)\n state1 := mulmod(mulmod(scratch0, scratch0, F), state1, F)\n scratch0 := mulmod(state2, state2, F)\n state2 := mulmod(mulmod(scratch0, scratch0, F), state2, F)\n\n mstore(0x0, mod(add(add(mulmod(state0, M00, F), mulmod(state1, M10, F)), mulmod(state2, M20, F)), F))\n\n return(0, 0x20)\n }\n }\n}\n" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "viaIR": true, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/packages/evm/deployments/sepolia/solcInputs/d0e6e4f19028714f394c36db62dff2be.json b/packages/evm/deployments/sepolia/solcInputs/d0e6e4f19028714f394c36db62dff2be.json deleted file mode 100644 index eaf4c996..00000000 --- a/packages/evm/deployments/sepolia/solcInputs/d0e6e4f19028714f394c36db62dff2be.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n assembly {\n $.slot := INITIALIZABLE_STORAGE\n }\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" - }, - "contracts/Enclave.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport {\n IEnclave,\n E3,\n IComputationModule,\n IExecutionModule\n} from \"./interfaces/IEnclave.sol\";\nimport { ICyphernodeRegistry } from \"./interfaces/ICyphernodeRegistry.sol\";\nimport { IInputValidator } from \"./interfaces/IInputValidator.sol\";\nimport { IOutputVerifier } from \"./interfaces/IOutputVerifier.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ncontract Enclave is IEnclave, OwnableUpgradeable {\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n ICyphernodeRegistry public cyphernodeRegistry; // address of the Cyphernode registry.\n uint256 public maxDuration; // maximum duration of a computation in seconds.\n uint256 public nexte3Id; // ID of the next E3.\n uint256 public requests; // total number of requests made to Enclave.\n\n // TODO: should computation and execution modules be explicitly allowed?\n // My intuition is that an allowlist is required since they impose slashing conditions.\n // But perhaps this is one place where node pools might be utilized, allowing nodes to\n // opt in to being selected for specific computations, along with the corresponding slashing conditions.\n // This would reduce the governance overhead for Enclave.\n\n // Mapping of allowed computation modules.\n mapping(IComputationModule computationModule => bool allowed)\n public computationModules;\n\n // Mapping of allowed execution modules.\n mapping(IExecutionModule executionModule => bool allowed)\n public executionModules;\n\n // Mapping of E3s.\n mapping(uint256 id => E3 e3) public e3s;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeSelectionFailed();\n error ComputationModuleNotAllowed(IComputationModule computationModule);\n error E3AlreadyActivated(uint256 e3Id);\n error E3Expired();\n error E3NotActivated(uint256 e3Id);\n error E3NotReady();\n error E3DoesNotExist(uint256 e3Id);\n error ModuleAlreadyEnabled(address module);\n error ModuleNotEnabled(address module);\n error InputDeadlinePassed(uint256 e3Id, uint256 expiration);\n error InputDeadlineNotPassed(uint256 e3Id, uint256 expiration);\n error InvalidComputation();\n error InvalidExecutionModuleSetup();\n error InvalidCyphernodeRegistry(ICyphernodeRegistry cyphernodeRegistry);\n error InvalidInput();\n error InvalidDuration(uint256 duration);\n error InvalidOutput(bytes output);\n error InvalidStartWindow();\n error InvalidThreshold(uint32[2] threshold);\n error CiphertextOutputAlreadyPublished(uint256 e3Id);\n error CiphertextOutputNotPublished(uint256 e3Id);\n error PaymentRequired(uint256 value);\n error PlaintextOutputAlreadyPublished(uint256 e3Id);\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @param _owner The owner of this contract\n /// @param _maxDuration The maximum duration of a computation in seconds\n constructor(\n address _owner,\n ICyphernodeRegistry _cyphernodeRegistry,\n uint256 _maxDuration\n ) {\n initialize(_owner, _cyphernodeRegistry, _maxDuration);\n }\n\n /// @param _owner The owner of this contract\n /// @param _maxDuration The maximum duration of a computation in seconds\n function initialize(\n address _owner,\n ICyphernodeRegistry _cyphernodeRegistry,\n uint256 _maxDuration\n ) public initializer {\n __Ownable_init(msg.sender);\n setMaxDuration(_maxDuration);\n setCyphernodeRegistry(_cyphernodeRegistry);\n if (_owner != owner()) transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function request(\n address filter,\n uint32[2] calldata threshold,\n uint256[2] calldata startWindow,\n uint256 duration,\n IComputationModule computationModule,\n bytes memory computationParams,\n IExecutionModule executionModule,\n bytes memory emParams\n ) external payable returns (uint256 e3Id, E3 memory e3) {\n // TODO: allow for other payment methods or only native tokens?\n // TODO: should payment checks be somewhere else? Perhaps in the computation module or cyphernode registry?\n require(msg.value > 0, PaymentRequired(msg.value));\n require(\n threshold[1] >= threshold[0] && threshold[0] > 0,\n InvalidThreshold(threshold)\n );\n require(\n // TODO: do we need a minimum start window to allow time for committee selection?\n startWindow[1] >= startWindow[0] &&\n startWindow[1] >= block.timestamp,\n InvalidStartWindow()\n );\n require(\n duration > 0 && duration <= maxDuration,\n InvalidDuration(duration)\n );\n require(\n computationModules[computationModule],\n ComputationModuleNotAllowed(computationModule)\n );\n require(\n executionModules[executionModule],\n ModuleNotEnabled(address(executionModule))\n );\n\n // TODO: should IDs be incremental or produced deterministically?\n e3Id = nexte3Id;\n nexte3Id++;\n\n IInputValidator inputValidator = computationModule.validate(\n computationParams\n );\n require(address(inputValidator) != address(0), InvalidComputation());\n\n // TODO: validate that the requested computation can be performed by the given execution module.\n IOutputVerifier outputVerifier = executionModule.validate(emParams);\n require(\n address(outputVerifier) != address(0),\n InvalidExecutionModuleSetup()\n );\n\n e3 = E3({\n threshold: threshold,\n startWindow: startWindow,\n duration: duration,\n expiration: 0,\n computationModule: computationModule,\n executionModule: executionModule,\n inputValidator: inputValidator,\n outputVerifier: outputVerifier,\n committeePublicKey: hex\"\",\n inputs: new bytes[](0),\n ciphertextOutput: hex\"\",\n plaintextOutput: hex\"\"\n });\n e3s[e3Id] = e3;\n\n require(\n cyphernodeRegistry.requestCommittee(e3Id, filter, threshold),\n CommitteeSelectionFailed()\n );\n\n emit E3Requested(\n e3Id,\n e3s[e3Id],\n filter,\n computationModule,\n executionModule\n );\n }\n\n function activate(uint256 e3Id) external returns (bool success) {\n // Note: we could load this into a storage pointer, and do the sets there\n // Requires a mew internal _getter that returns storage\n E3 memory e3 = getE3(e3Id);\n require(e3.expiration == 0, E3AlreadyActivated(e3Id));\n require(e3.startWindow[0] <= block.timestamp, E3NotReady());\n // TODO: handle what happens to the payment if the start window has passed.\n require(e3.startWindow[1] >= block.timestamp, E3Expired());\n\n bytes memory publicKey = cyphernodeRegistry.committeePublicKey(e3Id);\n // Note: This check feels weird\n require(publicKey.length > 0, CommitteeSelectionFailed());\n\n e3s[e3Id].expiration = block.timestamp + e3.duration;\n e3s[e3Id].committeePublicKey = publicKey;\n\n emit E3Activated(e3Id, e3.expiration, e3.committeePublicKey);\n\n return true;\n }\n\n function publishInput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n // TODO: should we have an input window, including both a start and end timestamp?\n require(\n e3.expiration > block.timestamp,\n InputDeadlinePassed(e3Id, e3.expiration)\n );\n bytes memory input;\n (input, success) = e3.inputValidator.validate(msg.sender, data);\n require(success, InvalidInput());\n // TODO: probably better to accumulate inputs, rather than just dumping them in storage.\n e3s[e3Id].inputs.push(input);\n emit InputPublished(e3Id, input);\n }\n\n function publishCiphertextOutput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n require(\n e3.expiration <= block.timestamp,\n InputDeadlineNotPassed(e3Id, e3.expiration)\n );\n // TODO: should the output verifier be able to change its mind?\n //i.e. should we be able to call this multiple times?\n require(\n e3.ciphertextOutput.length == 0,\n CiphertextOutputAlreadyPublished(e3Id)\n );\n bytes memory output;\n (output, success) = e3.outputVerifier.verify(e3Id, data);\n require(success, InvalidOutput(output));\n e3s[e3Id].ciphertextOutput = output;\n\n emit CiphertextOutputPublished(e3Id, output);\n }\n\n function publishPlaintextOutput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success) {\n E3 memory e3 = getE3(e3Id);\n // Note: if we make 0 a no expiration, this has to be refactored\n require(e3.expiration > 0, E3NotActivated(e3Id));\n require(\n e3.ciphertextOutput.length > 0,\n CiphertextOutputNotPublished(e3Id)\n );\n require(\n e3.plaintextOutput.length == 0,\n PlaintextOutputAlreadyPublished(e3Id)\n );\n bytes memory output;\n (output, success) = e3.computationModule.verify(e3Id, data);\n require(success, InvalidOutput(output));\n e3s[e3Id].plaintextOutput = output;\n\n emit PlaintextOutputPublished(e3Id, output);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setMaxDuration(\n uint256 _maxDuration\n ) public onlyOwner returns (bool success) {\n maxDuration = _maxDuration;\n success = true;\n emit MaxDurationSet(_maxDuration);\n }\n\n function setCyphernodeRegistry(\n ICyphernodeRegistry _cyphernodeRegistry\n ) public onlyOwner returns (bool success) {\n require(\n address(_cyphernodeRegistry) != address(0) &&\n _cyphernodeRegistry != cyphernodeRegistry,\n InvalidCyphernodeRegistry(_cyphernodeRegistry)\n );\n cyphernodeRegistry = _cyphernodeRegistry;\n success = true;\n emit CyphernodeRegistrySet(address(_cyphernodeRegistry));\n }\n\n function enableComputationModule(\n IComputationModule computationModule\n ) public onlyOwner returns (bool success) {\n require(\n !computationModules[computationModule],\n ModuleAlreadyEnabled(address(computationModule))\n );\n computationModules[computationModule] = true;\n success = true;\n emit ComputationModuleEnabled(computationModule);\n }\n\n function enableExecutionModule(\n IExecutionModule executionModule\n ) public onlyOwner returns (bool success) {\n require(\n !executionModules[executionModule],\n ModuleAlreadyEnabled(address(executionModule))\n );\n executionModules[executionModule] = true;\n success = true;\n emit ExecutionModuleEnabled(executionModule);\n }\n\n function disableComputationModule(\n IComputationModule computationModule\n ) public onlyOwner returns (bool success) {\n require(\n computationModules[computationModule],\n ModuleNotEnabled(address(computationModule))\n );\n delete computationModules[computationModule];\n success = true;\n emit ComputationModuleDisabled(computationModule);\n }\n\n function disableExecutionModule(\n IExecutionModule executionModule\n ) public onlyOwner returns (bool success) {\n require(\n executionModules[executionModule],\n ModuleNotEnabled(address(executionModule))\n );\n delete executionModules[executionModule];\n success = true;\n emit ExecutionModuleDisabled(executionModule);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function getE3(uint256 e3Id) public view returns (E3 memory e3) {\n e3 = e3s[e3Id];\n require(\n e3.computationModule != IComputationModule(address(0)),\n E3DoesNotExist(e3Id)\n );\n }\n}\n" - }, - "contracts/interfaces/IComputationModule.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IInputValidator } from \"./IInputValidator.sol\";\n\ninterface IComputationModule {\n /// @notice This function should be called by the Enclave contract to validate the computation parameters.\n /// @param params ABI encoded computation parameters.\n /// @return inputValidator The input validator to be used for the computation.\n function validate(\n bytes calldata params\n ) external returns (IInputValidator inputValidator);\n\n /// @notice This function should be called by the Enclave contract to verify the decrypted output of an E3.\n /// @param e3Id ID of the E3.\n /// @param outputData ABI encoded output data to be verified.\n /// @return output The output data to be published.\n /// @return success Whether the output data is valid.\n function verify(\n uint256 e3Id,\n bytes memory outputData\n ) external returns (bytes memory output, bool success);\n}\n" - }, - "contracts/interfaces/ICyphernodeRegistry.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\ninterface ICyphernodeRegistry {\n /// @notice This event MUST be emitted when a committee is selected for an E3.\n /// @param e3Id ID of the E3 for which the committee was selected.\n /// @param filter Address of the contract that will coordinate committee selection.\n /// @param threshold The M/N threshold for the committee.\n event CommitteeRequested(\n uint256 indexed e3Id,\n address filter,\n uint32[2] threshold\n );\n\n /// @notice This event MUST be emitted when a committee is selected for an E3.\n /// @param e3Id ID of the E3 for which the committee was selected.\n /// @param publicKey Public key of the committee.\n event CommitteePublished(uint256 indexed e3Id, bytes publicKey);\n\n /// @notice This event MUST be emitted when `enclave` is set.\n /// @param enclave Address of the enclave contract.\n event EnclaveSet(address indexed enclave);\n\n /// @notice This event MUST be emitted when a cyphernode is added to the registry.\n event CyphernodeAdded(address indexed node);\n\n /// @notice This event MUST be emitted when a cyphernode is removed from the registry.\n event CyphernodeRemoved(address indexed node);\n\n function isCyphernodeEligible(address cyphernode) external returns (bool);\n\n /// @notice Initiates the committee selection process for a specified E3.\n /// @dev This function MUST revert when not called by the Enclave contract.\n /// @param e3Id ID of the E3 for which to select the committee.\n /// @param filter The address of the filter responsible for the committee selection process.\n /// @param threshold The M/N threshold for the committee.\n /// @return success True if committee selection was successfully initiated.\n function requestCommittee(\n uint256 e3Id,\n address filter,\n uint32[2] calldata threshold\n ) external returns (bool success);\n\n /// @notice Publishes the public key resulting from the committee selection process.\n /// @dev This function MUST revert if not called by the previously selected filter.\n /// @param e3Id ID of the E3 for which to select the committee.\n /// @param publicKey The public key generated by the selected committee.\n function publishCommittee(\n uint256 e3Id,\n bytes calldata proof,\n bytes calldata publicKey\n ) external;\n\n /// @notice This function should be called by the Enclave contract to get the public key of a committee.\n /// @dev This function MUST revert if no committee has been requested for the given E3.\n /// @dev This function MUST revert if the committee has not yet published a public key.\n /// @param e3Id ID of the E3 for which to get the committee public key.\n /// @return publicKey The public key of the committee.\n function committeePublicKey(\n uint256 e3Id\n ) external view returns (bytes memory);\n}\n" - }, - "contracts/interfaces/IE3.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IInputValidator } from \"./IInputValidator.sol\";\nimport { IExecutionModule } from \"./IExecutionModule.sol\";\nimport { IComputationModule } from \"./IComputationModule.sol\";\nimport { IOutputVerifier } from \"./IOutputVerifier.sol\";\n\n/// @title E3 struct\n/// @notice This struct represents an E3 computation.\n/// @param threshold M/N threshold for the committee.\n/// @param startWindow Start window for the computation: index zero is minimum, index 1 is the maxium.\n/// @param duration Duration of the E3.\n/// @param expiration Timestamp when committee duties expire.\n/// @param computationModule Address of the computation module contract.\n/// @param executionModule Address of the execution module contract.\n/// @param inputValidator Address of the input validator contract.\n/// @param outputVerifier Address of the output verifier contract.\n/// @param committeeId ID of the selected committee.\n/// @param ciphertextOutput Encrypted output data.\n/// @param plaintextOutput Decrypted output data.\nstruct E3 {\n uint32[2] threshold;\n uint256[2] startWindow;\n uint256 duration;\n uint256 expiration;\n IComputationModule computationModule;\n IExecutionModule executionModule;\n IInputValidator inputValidator;\n IOutputVerifier outputVerifier;\n bytes committeePublicKey;\n bytes[] inputs;\n bytes ciphertextOutput;\n bytes plaintextOutput;\n}\n" - }, - "contracts/interfaces/IEnclave.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { E3, IComputationModule, IExecutionModule } from \"./IE3.sol\";\n\ninterface IEnclave {\n ////////////////////////////////////////////////////////////\n // //\n // Events //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully requested.\n /// @param e3Id ID of the E3.\n /// @param e3 Details of the E3.\n /// @param filter Address of the pool of nodes from which the Cypher Node committee was selected.\n /// @param computationModule Address of the Computation module selected.\n /// @param executionModule Address of the execution module selected.\n event E3Requested(\n uint256 e3Id,\n E3 e3,\n address filter,\n IComputationModule indexed computationModule,\n IExecutionModule indexed executionModule\n );\n\n /// @notice This event MUST be emitted when an Encrypted Execution Environment (E3) is successfully activated.\n /// @param e3Id ID of the E3.\n /// @param expiration Timestamp when committee duties expire.\n /// @param committeePublicKey Public key of the committee.\n event E3Activated(\n uint256 e3Id,\n uint256 expiration,\n bytes committeePublicKey\n );\n\n /// @notice This event MUST be emitted when an input to an Encrypted Execution Environment (E3) is\n /// successfully published.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded input data.\n event InputPublished(uint256 indexed e3Id, bytes data);\n\n /// @notice This event MUST be emitted when the plaintext output of an Encrypted Execution Environment (E3)\n /// is successfully published.\n /// @param e3Id ID of the E3.\n /// @param plaintextOutput ABI encoded plaintext output.\n event PlaintextOutputPublished(uint256 indexed e3Id, bytes plaintextOutput);\n\n /// @notice This event MUST be emitted when the ciphertext output of an Encrypted Execution Environment (E3)\n /// is successfully published.\n /// @param e3Id ID of the E3.\n /// @param ciphertextOutput ABI encoded ciphertext output.\n event CiphertextOutputPublished(\n uint256 indexed e3Id,\n bytes ciphertextOutput\n );\n\n /// @notice This event MUST be emitted any time the `maxDuration` is set.\n /// @param maxDuration The maximum duration of a computation in seconds.\n event MaxDurationSet(uint256 maxDuration);\n\n /// @notice This event MUST be emitted any time the CyphernodeRegistry is set.\n /// @param cyphernodeRegistry The address of the CyphernodeRegistry contract.\n event CyphernodeRegistrySet(address cyphernodeRegistry);\n\n /// @notice This event MUST be emitted any time a computation module is enabled.\n /// @param computationModule The address of the computation module.\n event ComputationModuleEnabled(IComputationModule computationModule);\n\n /// @notice This event MUST be emitted any time a computation module is disabled.\n /// @param computationModule The address of the computation module.\n event ComputationModuleDisabled(IComputationModule computationModule);\n\n /// @notice This event MUST be emitted any time an execution module is enabled.\n /// @param executionModule The address of the execution module.\n event ExecutionModuleEnabled(IExecutionModule executionModule);\n\n /// @notice This event MUST be emitted any time an execution module is disabled.\n /// @param executionModule The address of the execution module.\n event ExecutionModuleDisabled(IExecutionModule executionModule);\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to request a computation within an Encrypted Execution Environment (E3).\n /// @dev This function MUST emit the E3Requested event.\n /// @param filter IDs of the pool of nodes from which to select the committee.\n /// @param threshold The M/N threshold for the committee.\n /// @param duration The duration of the computation in seconds.\n /// @param computationModule Address of the computation module.\n /// @param computationParams ABI encoded computation parameters.\n /// @param executionModule Address of the execution module.\n /// @param emParams ABI encoded execution module parameters.\n /// @return e3Id ID of the E3.\n /// @return e3 The E3 struct.\n function request(\n address filter,\n uint32[2] calldata threshold,\n uint256[2] calldata startWindow,\n uint256 duration,\n IComputationModule computationModule,\n bytes memory computationParams,\n IExecutionModule executionModule,\n bytes memory emParams\n ) external payable returns (uint256 e3Id, E3 memory e3);\n\n /// @notice This function should be called to activate an Encrypted Execution Environment (E3) once it has been\n /// initialized and is ready for input.\n /// @dev This function MUST emit the E3Activated event.\n /// @dev This function MUST revert if the given E3 has not yet been requested.\n /// @dev This function MUST revert if the selected node committee has not yet published a public key.\n /// @param e3Id ID of the E3.\n function activate(uint256 e3Id) external returns (bool success);\n\n /// @notice This function should be called to publish input data for Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the E3 is not yet activated.\n /// @dev This function MUST emit the InputPublished event.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded input data to publish.\n /// @return success True if the input was successfully published.\n function publishInput(\n uint256 e3Id,\n bytes calldata data\n ) external returns (bool success);\n\n /// @notice This function should be called to publish output data for an Encrypted Execution Environment (E3).\n /// @dev This function MUST emit the CiphertextOutputPublished event.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded output data to verify.\n /// @return success True if the output was successfully published.\n function publishCiphertextOutput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success);\n\n /// @notice This function publishes the plaintext output of an Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the output has not been published.\n /// @dev This function MUST emit the PlaintextOutputPublished event.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded output data to decrypt.\n /// @return success True if the output was successfully decrypted.\n function publishPlaintextOutput(\n uint256 e3Id,\n bytes memory data\n ) external returns (bool success);\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to set the maximum duration of requested computations.\n /// @param _maxDuration The maximum duration of a computation in seconds.\n /// @return success True if the max duration was successfully set.\n function setMaxDuration(\n uint256 _maxDuration\n ) external returns (bool success);\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n /// @notice This function should be called to retrieve the details of an Encrypted Execution Environment (E3).\n /// @dev This function MUST revert if the E3 does not exist.\n /// @param e3Id ID of the E3.\n /// @return e3 The struct representing the requested E3.\n function getE3(uint256 e3Id) external view returns (E3 memory e3);\n}\n" - }, - "contracts/interfaces/IExecutionModule.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IOutputVerifier } from \"./IOutputVerifier.sol\";\n\ninterface IExecutionModule {\n /// @notice This function should be called by the Enclave contract to validate the execution module parameters.\n /// @param params ABI encoded execution module parameters.\n function validate(\n bytes calldata params\n ) external returns (IOutputVerifier outputVerifier);\n}\n" - }, - "contracts/interfaces/IInputValidator.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\ninterface IInputValidator {\n /// @notice This function should be called by the Enclave contract to validate the input parameters.\n /// @param params ABI encoded input parameters.\n /// @return input The input data to be published.\n /// @return success Whether the input parameters are valid.\n function validate(\n address sender,\n bytes memory params\n ) external returns (bytes memory input, bool success);\n}\n" - }, - "contracts/interfaces/IOutputVerifier.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\ninterface IOutputVerifier {\n /// @notice This function should be called by the Enclave contract to verify the output of a computation.\n /// @param e3Id ID of the E3.\n /// @param data ABI encoded output data to be verified.\n /// @return output Ciphertext output of the given computation.\n function verify(\n uint256 e3Id,\n bytes memory data\n ) external view returns (bytes memory output, bool success);\n}\n" - }, - "contracts/interfaces/IRegistryFilter.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\ninterface IRegistryFilter {\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external returns (bool success);\n}\n" - }, - "contracts/registry/CyphernodeRegistryOwnable.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { ICyphernodeRegistry } from \"../interfaces/ICyphernodeRegistry.sol\";\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ncontract CyphernodeRegistryOwnable is ICyphernodeRegistry, OwnableUpgradeable {\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public enclave;\n\n mapping(address cyphernode => bool isEnabled) public isEnabled;\n\n mapping(uint256 e3Id => IRegistryFilter filter) public requests;\n mapping(uint256 e3Id => bytes publicKey) public publicKeys;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyRequested();\n error CommitteeAlreadyPublished();\n error CommitteeDoesNotExist();\n error CommitteeNotPublished();\n error CyphernodeNotEnabled(address node);\n error OnlyEnclave();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyEnclave() {\n require(msg.sender == enclave, OnlyEnclave());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _enclave) {\n initialize(_owner, _enclave);\n }\n\n function initialize(address _owner, address _enclave) public initializer {\n __Ownable_init(msg.sender);\n setEnclave(_enclave);\n transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n address filter,\n uint32[2] calldata threshold\n ) external onlyEnclave returns (bool success) {\n require(\n requests[e3Id] == IRegistryFilter(address(0)),\n CommitteeAlreadyRequested()\n );\n requests[e3Id] = IRegistryFilter(filter);\n\n IRegistryFilter(filter).requestCommittee(e3Id, threshold);\n emit CommitteeRequested(e3Id, filter, threshold);\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n bytes calldata,\n bytes calldata publicKey\n ) external {\n // only to be published by the filter\n require(address(requests[e3Id]) == msg.sender, CommitteeDoesNotExist());\n\n // for (uint256 i = 0; i < cyphernodes.length; i++) {\n // require(\n // isEnabled[cyphernodes[i]] == true,\n // CyphernodeNotEnabled(cyphernodes[i])\n // );\n // }\n\n publicKeys[e3Id] = publicKey;\n emit CommitteePublished(e3Id, publicKey);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setEnclave(address _enclave) public onlyOwner {\n enclave = _enclave;\n emit EnclaveSet(_enclave);\n }\n\n function addCyphernode(address node) external onlyOwner {\n isEnabled[node] = true;\n emit CyphernodeAdded(node);\n }\n\n function removeCyphernode(address node) external onlyOwner {\n isEnabled[node] = false;\n emit CyphernodeRemoved(node);\n }\n\n function isCyphernodeEligible(address node) external view returns (bool) {\n return isEnabled[node];\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Get Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function committeePublicKey(\n uint256 e3Id\n ) external view returns (bytes memory publicKey) {\n publicKey = publicKeys[e3Id];\n require(publicKey.length > 0, CommitteeNotPublished());\n }\n}\n" - }, - "contracts/registry/NaiveRegistryFilter.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { ICyphernodeRegistry } from \"../interfaces/ICyphernodeRegistry.sol\";\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ncontract NaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\n struct Committee {\n address[] nodes;\n uint32[2] threshold;\n bytes publicKey;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public registry;\n\n mapping(uint256 e3 => Committee committee) public committees;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyExists();\n error CommitteeAlreadyPublished();\n error CommitteeDoesNotExist();\n error CommitteeNotPublished();\n error OnlyRegistry();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyRegistry() {\n require(msg.sender == registry, OnlyRegistry());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _enclave) {\n initialize(_owner, _enclave);\n }\n\n function initialize(address _owner, address _registry) public initializer {\n __Ownable_init(msg.sender);\n setRegistry(_registry);\n transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external onlyRegistry returns (bool success) {\n Committee storage committee = committees[e3Id];\n require(committee.threshold.length == 0, CommitteeAlreadyExists());\n committee.threshold = threshold;\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n address[] memory nodes,\n bytes memory publicKey\n ) external onlyOwner {\n Committee storage committee = committees[e3Id];\n require(\n keccak256(committee.publicKey) == keccak256(hex\"\"),\n CommitteeAlreadyPublished()\n );\n committee.nodes = nodes;\n committee.publicKey = publicKey;\n ICyphernodeRegistry(registry).publishCommittee(\n e3Id,\n abi.encode(nodes),\n publicKey\n );\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setRegistry(address _registry) public onlyOwner {\n registry = _registry;\n }\n}\n" - }, - "contracts/test/MockComputationModule.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport {\n IComputationModule,\n IInputValidator\n} from \"../interfaces/IComputationModule.sol\";\n\ncontract MockComputationModule is IComputationModule {\n error invalidParams(bytes params);\n\n function validate(\n bytes memory params\n ) external pure returns (IInputValidator inputValidator) {\n require(params.length == 32, \"invalid params\");\n // solhint-disable no-inline-assembly\n assembly {\n inputValidator := mload(add(params, 32))\n }\n }\n\n function verify(\n uint256,\n bytes memory data\n ) external pure returns (bytes memory output, bool success) {\n output = data;\n if (output.length > 0) success = true;\n }\n}\n" - }, - "contracts/test/MockCyphernodeRegistry.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { ICyphernodeRegistry } from \"../interfaces/ICyphernodeRegistry.sol\";\n\ncontract MockCyphernodeRegistry is ICyphernodeRegistry {\n function requestCommittee(\n uint256,\n address filter,\n uint32[2] calldata\n ) external pure returns (bool success) {\n if (filter == address(2)) {\n success = false;\n } else {\n success = true;\n }\n }\n\n function publishCommittee(\n uint256,\n bytes calldata,\n bytes calldata\n ) external {} // solhint-disable-line no-empty-blocks\n\n function committeePublicKey(\n uint256 e3Id\n ) external pure returns (bytes memory) {\n if (e3Id == type(uint256).max) {\n return hex\"\";\n } else {\n return abi.encodePacked(keccak256(abi.encode(e3Id)));\n }\n }\n\n function isCyphernodeEligible(address) external pure returns (bool) {\n return false;\n }\n}\n\ncontract MockCyphernodeRegistryEmptyKey is ICyphernodeRegistry {\n function requestCommittee(\n uint256,\n address filter,\n uint32[2] calldata\n ) external pure returns (bool success) {\n if (filter == address(2)) {\n success = false;\n } else {\n success = true;\n }\n }\n\n function publishCommittee(\n uint256,\n bytes calldata,\n bytes calldata\n ) external {} // solhint-disable-line no-empty-blocks\n\n function committeePublicKey(uint256) external pure returns (bytes memory) {\n return hex\"\";\n }\n\n function isCyphernodeEligible(address) external pure returns (bool) {\n return false;\n }\n}\n" - }, - "contracts/test/MockExecutionModule.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport {\n IExecutionModule,\n IOutputVerifier\n} from \"../interfaces/IExecutionModule.sol\";\n\ncontract MockExecutionModule is IExecutionModule {\n error invalidParams();\n\n function validate(\n bytes memory params\n ) external pure returns (IOutputVerifier outputVerifier) {\n require(params.length == 32, invalidParams());\n // solhint-disable no-inline-assembly\n assembly {\n outputVerifier := mload(add(params, 32))\n }\n (outputVerifier) = abi.decode(params, (IOutputVerifier));\n }\n}\n" - }, - "contracts/test/MockInputValidator.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IInputValidator } from \"../interfaces/IInputValidator.sol\";\n\ncontract MockInputValidator is IInputValidator {\n function validate(\n address,\n bytes memory params\n ) external pure returns (bytes memory input, bool success) {\n input = params;\n\n if (input.length == 3) {\n success = false;\n } else {\n success = true;\n }\n }\n}\n" - }, - "contracts/test/MockOutputVerifier.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IOutputVerifier } from \"../interfaces/IOutputVerifier.sol\";\n\ncontract MockOutputVerifier is IOutputVerifier {\n function verify(\n uint256,\n bytes memory data\n ) external pure returns (bytes memory output, bool success) {\n output = data;\n\n if (output.length > 0) success = true;\n }\n}\n" - }, - "contracts/test/MockRegistryFilter.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.26;\n\nimport { IRegistryFilter } from \"../interfaces/IRegistryFilter.sol\";\nimport {\n OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ninterface IRegistry {\n function publishCommittee(\n uint256 e3Id,\n address[] calldata cyphernodes,\n bytes calldata publicKey\n ) external;\n}\n\ncontract NaiveRegistryFilter is IRegistryFilter, OwnableUpgradeable {\n struct Committee {\n address[] nodes;\n uint32[2] threshold;\n bytes publicKey;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Storage Variables //\n // //\n ////////////////////////////////////////////////////////////\n\n address public registry;\n\n mapping(uint256 e3 => Committee committee) public committees;\n\n ////////////////////////////////////////////////////////////\n // //\n // Errors //\n // //\n ////////////////////////////////////////////////////////////\n\n error CommitteeAlreadyExists();\n error CommitteeAlreadyPublished();\n error CommitteeDoesNotExist();\n error CommitteeNotPublished();\n error OnlyRegistry();\n\n ////////////////////////////////////////////////////////////\n // //\n // Modifiers //\n // //\n ////////////////////////////////////////////////////////////\n\n modifier onlyRegistry() {\n require(msg.sender == registry, OnlyRegistry());\n _;\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Initialization //\n // //\n ////////////////////////////////////////////////////////////\n\n constructor(address _owner, address _enclave) {\n initialize(_owner, _enclave);\n }\n\n function initialize(address _owner, address _registry) public initializer {\n __Ownable_init(msg.sender);\n setRegistry(_registry);\n transferOwnership(_owner);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Core Entrypoints //\n // //\n ////////////////////////////////////////////////////////////\n\n function requestCommittee(\n uint256 e3Id,\n uint32[2] calldata threshold\n ) external onlyRegistry returns (bool success) {\n Committee storage committee = committees[e3Id];\n require(committee.threshold.length == 0, CommitteeAlreadyExists());\n committee.threshold = threshold;\n success = true;\n }\n\n function publishCommittee(\n uint256 e3Id,\n address[] memory nodes,\n bytes memory publicKey\n ) external onlyOwner {\n Committee storage committee = committees[e3Id];\n require(\n keccak256(committee.publicKey) == keccak256(hex\"\"),\n CommitteeAlreadyPublished()\n );\n committee.nodes = nodes;\n committee.publicKey = publicKey;\n IRegistry(registry).publishCommittee(e3Id, nodes, publicKey);\n }\n\n ////////////////////////////////////////////////////////////\n // //\n // Set Functions //\n // //\n ////////////////////////////////////////////////////////////\n\n function setRegistry(address _registry) public onlyOwner {\n registry = _registry;\n }\n}\n" - } - }, - "settings": { - "metadata": { - "bytecodeHash": "none", - "useLiteralContent": true - }, - "optimizer": { - "enabled": true, - "runs": 800 - }, - "viaIR": true, - "evmVersion": "paris", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": ["ast"] - } - } - } -} From e88e4f72e5154131560fdf91fea9abd6549dc61a Mon Sep 17 00:00:00 2001 From: samepant Date: Tue, 1 Oct 2024 15:26:48 -0400 Subject: [PATCH 2/3] bump evm version --- packages/evm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/evm/package.json b/packages/evm/package.json index e63a8488..c561af84 100644 --- a/packages/evm/package.json +++ b/packages/evm/package.json @@ -1,7 +1,7 @@ { "name": "@gnosis-guild/enclave", "description": "Enclave is an open-source protocol for Encrypted Execution Environments (E3).", - "version": "0.0.3", + "version": "0.0.4", "license": "LGPL-3.0-only", "author": { "name": "gnosisguild", From 624287088d688b5b9f6c11011016b0c754cad911 Mon Sep 17 00:00:00 2001 From: samepant Date: Tue, 1 Oct 2024 15:30:55 -0400 Subject: [PATCH 3/3] prettier: ignore deployment files --- packages/evm/.prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/evm/.prettierignore b/packages/evm/.prettierignore index 68476e13..c3995b0d 100644 --- a/packages/evm/.prettierignore +++ b/packages/evm/.prettierignore @@ -9,6 +9,7 @@ coverage dist node_modules types +deployments # files *.env