UNPKG

secretstore-contracts

Version:

Secret Store permissioning and service contracts collection and toolkit.

534 lines (533 loc) 464 kB
{ "contractName": "SecretStoreServerKeyGenerationService", "abi": [ { "constant": true, "inputs": [], "name": "maxServerKeyGenerationRequests", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "keyServer", "type": "address" } ], "name": "requireKeyServer", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "serverKeyGenerationFee", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "keyServersCount", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "drain", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "name": "keyServerSetAddressInit", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "serverKeyId", "type": "bytes32" }, { "indexed": false, "name": "author", "type": "address" }, { "indexed": false, "name": "threshold", "type": "uint8" } ], "name": "ServerKeyGenerationRequested", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "serverKeyId", "type": "bytes32" }, { "indexed": false, "name": "serverKeyPublic", "type": "bytes" } ], "name": "ServerKeyGenerated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "serverKeyId", "type": "bytes32" } ], "name": "ServerKeyGenerationError", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": false, "inputs": [ { "name": "serverKeyId", "type": "bytes32" }, { "name": "threshold", "type": "uint8" } ], "name": "generateServerKey", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "serverKeyId", "type": "bytes32" }, { "name": "serverKeyPublic", "type": "bytes" } ], "name": "serverKeyGenerated", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "serverKeyId", "type": "bytes32" } ], "name": "serverKeyGenerationError", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "serverKeyGenerationRequestsCount", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "index", "type": "uint256" } ], "name": "getServerKeyGenerationRequest", "outputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "address" }, { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "serverKeyId", "type": "bytes32" }, { "name": "keyServer", "type": "address" } ], "name": "isServerKeyGenerationResponseRequired", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "newFee", "type": "uint256" } ], "name": "setServerKeyGenerationFee", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "newLimit", "type": "uint256" } ], "name": "setMaxServerKeyGenerationRequests", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "serverKeyId", "type": "bytes32" } ], "name": "deleteServerKeyGenerationRequest", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50604051602080611346833981016040819052905160008054600160a060020a031916331780825591928392600160a060020a031691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360018054600160a060020a031916600160a060020a0392909216919091179055506702c68af0bb1400006004908155600555611299806100ad6000396000f3006080604052600436106100e25763ffffffff60e060020a60003504166317dd3d88811461015857806318c296e814610172578063195a40f2146101995780632b4f030a146101ae5780633eaf9b28146101e55780633fbd7ecd146101fa578063410021f3146102125780635aa8404c1461022a57806364124c861461023f578063715018a61461027d5780638da5cb5b146102925780638f32d59b146102c35780639890220b146102ec578063b8020be514610301578063e54dcfff14610312578063ebbcc2e11461032a578063ec6b03601461034e578063f2fde38b14610372575b6040805160e560020a62461bcd02815260206004820152602260248201527f446972656374207061796d656e747320617265206e6f7420737570706f72746560448201527f642e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b34801561016457600080fd5b50610170600435610393565b005b34801561017e57600080fd5b506101876103f0565b60408051918252519081900360200190f35b3480156101a557600080fd5b506101876103f6565b3480156101ba57600080fd5b506101cf600160a060020a03600435166103fd565b6040805160ff9092168252519081900360200190f35b3480156101f157600080fd5b5061018761049a565b34801561020657600080fd5b506101706004356104a0565b34801561021e57600080fd5b506101706004356104df565b34801561023657600080fd5b506101cf6104f7565b34801561024b57600080fd5b50610257600435610587565b60408051938452600160a060020a03909216602084015282820152519081900360600190f35b34801561028957600080fd5b506101706105db565b34801561029e57600080fd5b506102a7610645565b60408051600160a060020a039092168252519081900360200190f35b3480156102cf57600080fd5b506102d8610654565b604080519115158252519081900360200190f35b3480156102f857600080fd5b50610170610665565b61017060043560ff60243516610707565b34801561031e57600080fd5b50610170600435610993565b34801561033657600080fd5b506101706004803590602480359081019101356109ab565b34801561035a57600080fd5b506102d8600435600160a060020a0360243516610b6c565b34801561037e57600080fd5b50610170600160a060020a0360043516610ba5565b600061039d610654565b15156103a857600080fd5b5060008181526006602052604090206103c18282610bc4565b60405182907fc79a8674b4a757f1b4372e9f51be17ee6d43b631ca0a97b477580f18fc76e1b890600090a25050565b60055481565b6007545b90565b600154604080517f287fb40c000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151600093929092169163287fb40c9160248082019260209290919082900301818787803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050506040513d602081101561049257600080fd5b505192915050565b60045481565b60006104ab336103fd565b505060008181526006602052604090208054600160a060020a031615156104d1576104db565b6103c18282610bc4565b5050565b6104e7610654565b15156104f257600080fd5b600455565b600154604080517f5560c9650000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691635560c96591600480830192602092919082900301818787803b15801561055657600080fd5b505af115801561056a573d6000803e3d6000fd5b505050506040513d602081101561058057600080fd5b5051905090565b600080600080600060078681548110151561059e57fe5b6000918252602080832091909101548083526006909152604090912080546001909101549198600160a060020a0390911697509095509350505050565b6105e3610654565b15156105ee57600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031690565b600054600160a060020a0316331490565b336000908152600260205260409020548015156106cc576040805160e560020a62461bcd02815260206004820152600d60248201527f42616c616e636520697320302e00000000000000000000000000000000000000604482015290519081900360640190fd5b336000818152600260205260408082208290555183156108fc0291849190818181858888f193505050501580156104db573d6000803e3d6000fd5b6000600454803410151515610766576040805160e560020a62461bcd02815260206004820181905260248201527f5472616e73616374696f6e2076616c7565206973206e6f7420656e6f7567682e604482015290519081900360640190fd5b61076e6104f7565b60ff168360010160ff16111515156107d0576040805160e560020a62461bcd02815260206004820152601560248201527f5468726573686f6c6420697320696e76616c69642e0000000000000000000000604482015290519081900360640190fd5b60055460075410610851576040805160e560020a62461bcd02815260206004820152602360248201527f4d6178696d756d206e756d626572206f6620726571756573747320726561636860448201527f65642e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526006602052604090208054909250600160a060020a0316156108e8576040805160e560020a62461bcd02815260206004820152602560248201527f5265717565737420617574686f7220616464726573732063616e6e6f7420626560448201527f203078302e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108f0610c49565b815473ffffffffffffffffffffffffffffffffffffffff191633908117835560ff841660018085018290556007805491820181556000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880186905560408051878152602081019390935282810191909152517f7e7d18cca7d509b32b27d10d4c0f1dfed4d779294388818f23941d13450dacb19181900360600190a150505050565b61099b610654565b15156109a657600080fd5b600555565b60008060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437505084516040149350610a3c92505050576040805160e560020a62461bcd02815260206004820152601860248201527f5075626c6963206b6579206973206e6f742076616c69642e0000000000000000604482015290519081900360640190fd5b60008881526006602052604090208054909550600160a060020a03161515610a6357610b62565b610a6c336103fd565b935086866040518083838082843782019150509250505060405180910390209250610aa685600201856001610a9f6104f7565b0386610e0b565b91506001826002811115610ab657fe5b1415610ac157610b62565b610acb8886610bc4565b6000826002811115610ad957fe5b1415610b3657604080516020808252810188905289917f20da9149b09a59e39dbfed5cfa1e68c9d9984736b0f73a0b1d9f7a063f093fc5918a918a91908190810184848082843760405192018290039550909350505050a2610b62565b60405188907fc79a8674b4a757f1b4372e9f51be17ee6d43b631ca0a97b477580f18fc76e1b890600090a25b5050505050505050565b6000806000610b7a846103fd565b60008681526006602052604090209092509050610b9a6002820183610fd0565b92505b505092915050565b610bad610654565b1515610bb857600080fd5b610bc18161107f565b50565b610bd0816002016110fc565b60008281526006602081905260408220805473ffffffffffffffffffffffffffffffffffffffff1916815560018101839055600281018381556003820184905560048201805460ff199081169091559282018054909316909255919081610c3a6007850182611211565b505050506104db60078361114d565b600080600080600080610c5a6104f7565b95503494508560ff1685811515610c6d57fe5b049350600092505b6001860360ff168360ff161015610d4c57600154604080517fc66198dc00000000000000000000000000000000000000000000000000000000815260ff861660048201529051600160a060020a039092169163c66198dc916024808201926020929091908290030181600087803b158015610cef57600080fd5b505af1158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051600160a060020a03811660009081526002602052604090208054860190559484900394600193909301929150610c75565b600154604080517fc66198dc00000000000000000000000000000000000000000000000000000000815260ff6000198a011660048201529051600160a060020a039092169163c66198dc916024808201926020929091908290030181600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b5051600160a060020a0316600090815260026020526040902080549095019094555050505050565b6000806000806000600160009054906101000a9004600160a060020a0316600160a060020a0316636452e8216040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610e6657600080fd5b505af1158015610e7a573d6000803e3d6000fd5b505050506040513d6020811015610e9057600080fd5b505160028a015490945060ff161515610eab57838955610ebd565b88548414610ebd57610ebd89856111d5565b600189015460ff891660020a9350831615610edb5760019450610fc4565b600086815260038a016020526040902080546001808c0180548717905560028c01805460ff8181168401811660ff199283161790925584549382168301918216931683179093559193501415610f465760058901805460018101825560009182526020909120018690555b600489015460ff90811690831610610f865760048901805460ff191660ff848116919091179091556000198301811690881611610f865760009450610fc4565b600289015460ff16610f966104f7565b60048b0154919003915060001960ff91821683010181169088161115610fbf5760029450610fc4565b600194505b50505050949350505050565b6000806000600160009054906101000a9004600160a060020a0316600160a060020a0316636452e8216040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561102857600080fd5b505af115801561103c573d6000803e3d6000fd5b505050506040513d602081101561105257600080fd5b5051855490925082146110685760019250610b9d565b5050506001919091015460ff90911660020a161590565b600160a060020a038116151561109457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005b60058201548110156104db57816003016000836005018381548110151561112257fe5b600091825260208083209091015483528201929092526040019020805460ff191690556001016110ff565b60005b82548110156111d0578254829084908390811061116957fe5b60009182526020909120015414156111c85782548390600019810190811061118d57fe5b906000526020600020015483828154811015156111a657fe5b6000918252602090912001558254600019016111c2848261122f565b506111d0565b600101611150565b505050565b6111de826110fc565b80825560006001830181905560028301805460ff1990811690915560048401805490911690556111d0600584018261122f565b5080546000825590600052602060002090810190610bc1919061124f565b8154818355818111156111d0576000838152602090206111d09181019083015b6103fa91905b808211156112695760008155600101611255565b50905600a165627a7a7230582079f88406ec5bdf83bdc93db125d72c738e4a32d498e2db3b3129d67fc4af02df0029", "deployedBytecode": "0x6080604052600436106100e25763ffffffff60e060020a60003504166317dd3d88811461015857806318c296e814610172578063195a40f2146101995780632b4f030a146101ae5780633eaf9b28146101e55780633fbd7ecd146101fa578063410021f3146102125780635aa8404c1461022a57806364124c861461023f578063715018a61461027d5780638da5cb5b146102925780638f32d59b146102c35780639890220b146102ec578063b8020be514610301578063e54dcfff14610312578063ebbcc2e11461032a578063ec6b03601461034e578063f2fde38b14610372575b6040805160e560020a62461bcd02815260206004820152602260248201527f446972656374207061796d656e747320617265206e6f7420737570706f72746560448201527f642e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b34801561016457600080fd5b50610170600435610393565b005b34801561017e57600080fd5b506101876103f0565b60408051918252519081900360200190f35b3480156101a557600080fd5b506101876103f6565b3480156101ba57600080fd5b506101cf600160a060020a03600435166103fd565b6040805160ff9092168252519081900360200190f35b3480156101f157600080fd5b5061018761049a565b34801561020657600080fd5b506101706004356104a0565b34801561021e57600080fd5b506101706004356104df565b34801561023657600080fd5b506101cf6104f7565b34801561024b57600080fd5b50610257600435610587565b60408051938452600160a060020a03909216602084015282820152519081900360600190f35b34801561028957600080fd5b506101706105db565b34801561029e57600080fd5b506102a7610645565b60408051600160a060020a039092168252519081900360200190f35b3480156102cf57600080fd5b506102d8610654565b604080519115158252519081900360200190f35b3480156102f857600080fd5b50610170610665565b61017060043560ff60243516610707565b34801561031e57600080fd5b50610170600435610993565b34801561033657600080fd5b506101706004803590602480359081019101356109ab565b34801561035a57600080fd5b506102d8600435600160a060020a0360243516610b6c565b34801561037e57600080fd5b50610170600160a060020a0360043516610ba5565b600061039d610654565b15156103a857600080fd5b5060008181526006602052604090206103c18282610bc4565b60405182907fc79a8674b4a757f1b4372e9f51be17ee6d43b631ca0a97b477580f18fc76e1b890600090a25050565b60055481565b6007545b90565b600154604080517f287fb40c000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151600093929092169163287fb40c9160248082019260209290919082900301818787803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050506040513d602081101561049257600080fd5b505192915050565b60045481565b60006104ab336103fd565b505060008181526006602052604090208054600160a060020a031615156104d1576104db565b6103c18282610bc4565b5050565b6104e7610654565b15156104f257600080fd5b600455565b600154604080517f5560c9650000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691635560c96591600480830192602092919082900301818787803b15801561055657600080fd5b505af115801561056a573d6000803e3d6000fd5b505050506040513d602081101561058057600080fd5b5051905090565b600080600080600060078681548110151561059e57fe5b6000918252602080832091909101548083526006909152604090912080546001909101549198600160a060020a0390911697509095509350505050565b6105e3610654565b15156105ee57600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031690565b600054600160a060020a0316331490565b336000908152600260205260409020548015156106cc576040805160e560020a62461bcd02815260206004820152600d60248201527f42616c616e636520697320302e00000000000000000000000000000000000000604482015290519081900360640190fd5b336000818152600260205260408082208290555183156108fc0291849190818181858888f193505050501580156104db573d6000803e3d6000fd5b6000600454803410151515610766576040805160e560020a62461bcd02815260206004820181905260248201527f5472616e73616374696f6e2076616c7565206973206e6f7420656e6f7567682e604482015290519081900360640190fd5b61076e6104f7565b60ff168360010160ff16111515156107d0576040805160e560020a62461bcd02815260206004820152601560248201527f5468726573686f6c6420697320696e76616c69642e0000000000000000000000604482015290519081900360640190fd5b60055460075410610851576040805160e560020a62461bcd02815260206004820152602360248201527f4d6178696d756d206e756d626572206f6620726571756573747320726561636860448201527f65642e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526006602052604090208054909250600160a060020a0316156108e8576040805160e560020a62461bcd02815260206004820152602560248201527f5265717565737420617574686f7220616464726573732063616e6e6f7420626560448201527f203078302e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108f0610c49565b815473ffffffffffffffffffffffffffffffffffffffff191633908117835560ff841660018085018290556007805491820181556000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880186905560408051878152602081019390935282810191909152517f7e7d18cca7d509b32b27d10d4c0f1dfed4d779294388818f23941d13450dacb19181900360600190a150505050565b61099b610654565b15156109a657600080fd5b600555565b60008060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437505084516040149350610a3c92505050576040805160e560020a62461bcd02815260206004820152601860248201527f5075626c6963206b6579206973206e6f742076616c69642e0000000000000000604482015290519081900360640190fd5b60008881526006602052604090208054909550600160a060020a03161515610a6357610b62565b610a6c336103fd565b935086866040518083838082843782019150509250505060405180910390209250610aa685600201856001610a9f6104f7565b0386610e0b565b91506001826002811115610ab657fe5b1415610ac157610b62565b610acb8886610bc4565b6000826002811115610ad957fe5b1415610b3657604080516020808252810188905289917f20da9149b09a59e39dbfed5cfa1e68c9d9984736b0f73a0b1d9f7a063f093fc5918a918a91908190810184848082843760405192018290039550909350505050a2610b62565b60405188907fc79a8674b4a757f1b4372e9f51be17ee6d43b631ca0a97b477580f18fc76e1b890600090a25b5050505050505050565b6000806000610b7a846103fd565b60008681526006602052604090209092509050610b9a6002820183610fd0565b92505b505092915050565b610bad610654565b1515610bb857600080fd5b610bc18161107f565b50565b610bd0816002016110fc565b60008281526006602081905260408220805473ffffffffffffffffffffffffffffffffffffffff1916815560018101839055600281018381556003820184905560048201805460ff199081169091559282018054909316909255919081610c3a6007850182611211565b505050506104db60078361114d565b600080600080600080610c5a6104f7565b95503494508560ff1685811515610c6d57fe5b049350600092505b6001860360ff168360ff161015610d4c57600154604080517fc66198dc00000000000000000000000000000000000000000000000000000000815260ff861660048201529051600160a060020a039092169163c66198dc916024808201926020929091908290030181600087803b158015610cef57600080fd5b505af1158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051600160a060020a03811660009081526002602052604090208054860190559484900394600193909301929150610c75565b600154604080517fc66198dc00000000000000000000000000000000000000000000000000000000815260ff6000198a011660048201529051600160a060020a039092169163c66198dc916024808201926020929091908290030181600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b5051600160a060020a0316600090815260026020526040902080549095019094555050505050565b6000806000806000600160009054906101000a9004600160a060020a0316600160a060020a0316636452e8216040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610e6657600080fd5b505af1158015610e7a573d6000803e3d6000fd5b505050506040513d6020811015610e9057600080fd5b505160028a015490945060ff161515610eab57838955610ebd565b88548414610ebd57610ebd89856111d5565b600189015460ff891660020a9350831615610edb5760019450610fc4565b600086815260038a016020526040902080546001808c0180548717905560028c01805460ff8181168401811660ff199283161790925584549382168301918216931683179093559193501415610f465760058901805460018101825560009182526020909120018690555b600489015460ff90811690831610610f865760048901805460ff191660ff848116919091179091556000198301811690881611610f865760009450610fc4565b600289015460ff16610f966104f7565b60048b0154919003915060001960ff91821683010181169088161115610fbf5760029450610fc4565b600194505b50505050949350505050565b6000806000600160009054906101000a9004600160a060020a0316600160a060020a0316636452e8216040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561102857600080fd5b505af115801561103c573d6000803e3d6000fd5b505050506040513d602081101561105257600080fd5b5051855490925082146110685760019250610b9d565b5050506001919091015460ff90911660020a161590565b600160a060020a038116151561109457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005b60058201548110156104db57816003016000836005018381548110151561112257fe5b600091825260208083209091015483528201929092526040019020805460ff191690556001016110ff565b60005b82548110156111d0578254829084908390811061116957fe5b60009182526020909120015414156111c85782548390600019810190811061118d57fe5b906000526020600020015483828154811015156111a657fe5b6000918252602090912001558254600019016111c2848261122f565b506111d0565b600101611150565b505050565b6111de826110fc565b80825560006001830181905560028301805460ff1990811690915560048401805490911690556111d0600584018261122f565b5080546000825590600052602060002090810190610bc1919061124f565b8154818355818111156111d0576000838152602090206111d09181019083015b6103fa91905b808211156112695760008155600101611255565b50905600a165627a7a7230582079f88406ec5bdf83bdc93db125d72c738e4a32d498e2db3b3129d67fc4af02df0029", "sourceMap": "890:6920:6:-;;;1631:196;8:9:-1;5:2;;;30:1;27;20:12;5:2;1631:196:6;;;;;;;;;;;;;;;;509:6:12;:19;;-1:-1:-1;;;;;;509:19:12;518:10;509:19;;;;1631:196:6;;;;-1:-1:-1;;;;;572:6:12;;509;539:40;;509:6;;539:40;2548:19:8;:45;;-1:-1:-1;;;;;;2548:45:8;-1:-1:-1;;;;;2548:45:8;;;;;;;;;;-1:-1:-1;1766:10:6;1741:22;:35;;;1786:30;:34;890:6920;;;-1:-1:-1;890:6920:6;;", "deployedSourceMap": "890:6920:6:-;;;;;;;;;-1:-1:-1;;;890:6920:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1946:44;;;-1:-1:-1;;;;;1946:44:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6604:318;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6604:318:6;;;;;;;7538:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7538:45:6;;;;;;;;;;;;;;;;;;;;5059:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5059:138:6;;;;2843:166:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2843:166:8;-1:-1:-1;;;;;2843:166:8;;;;;;;;;;;;;;;;;;;;;;;;7348:37:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7348:37:6;;;;4353:639;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4353:639:6;;;;;6204:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6204:136:6;;;;;2644:140:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2644:140:8;;;;5313:387:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5313:387:6;;;;;;;;;;;;-1:-1:-1;;;;;5313:387:6;;;;;;;;;;;;;;;;;;;;1273:127:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1273:127:12;;;;639:70;;8:9:-1;5:2;;;30:1;27;20:12;5:2;639:70:12;;;;;;;;-1:-1:-1;;;;;639:70:12;;;;;;;;;;;;;;926:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;926:83:12;;;;;;;;;;;;;;;;;;;;;;3059:199:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3059:199:8;;;;2123:867:6;;;;;;;;;;6396:156;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6396:156:6;;;;;3054:1230;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3054:1230:6;;;;;;;;;;;;;;;;5772:348;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5772:348:6;;;-1:-1:-1;;;;;5772:348:6;;;;;1561:101:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1561:101:12;-1:-1:-1;;;;;1561:101:12;;;;;6604:318:6;6714:42;824:9:12;:7;:9::i;:::-;816:18;;;;;;;;-1:-1:-1;6759:40:6;;;;:27;:40;;;;;6809:53;6787:11;6759:40;6809:31;:53::i;:::-;6878:37;;6903:11;;6878:37;;;;;6604:318;;:::o;7538:45::-;;;;:::o;5059:138::-;5152:31;:38;5059:138;;:::o;2843:166:8:-;2946:19;;2933:69;;;;;;-1:-1:-1;;;;;2933:69:8;;;;;;;;;2909:5;;2946:19;;;;;2933:58;;:69;;;;;;;;;;;;;;;2909:5;2946:19;2933:69;;;5:2:-1;;;;30:1;27;20:12;5:2;2933:69:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2933:69:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2933:69:8;;2843:166;-1:-1:-1;;2843:166:8:o;7348:37:6:-;;;;:::o;4353:639::-;4556:42;4476:28;4493:10;4476:16;:28::i;:::-;-1:-1:-1;;4601:40:6;;;;:27;:40;;;;;4655:14;;-1:-1:-1;;;;;4655:14:6;:28;4651:65;;;4699:7;;4651:65;4880:53;4912:11;4925:7;4880:31;:53::i;4353:639::-;;;:::o;6204:136::-;824:9:12;:7;:9::i;:::-;816:18;;;;;;;;6302:22:6;:31;6204:136::o;2644:140:8:-;2729:19;;2716:61;;;;;;;;2692:5;;-1:-1:-1;;;;;2729:19:8;;2716:59;;:61;;;;;;;;;;;;;;2692:5;2729:19;2716:61;;;5:2:-1;;;;30:1;27;20:12;5:2;2716:61:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2716:61:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2716:61:8;;-1:-1:-1;2644:140:8;:::o;5313:387:6:-;5390:7;5399;5408;5427:19;5497:42;5449:31;5481:5;5449:38;;;;;;;;;;;;;;;;;;;;;;;5542:40;;;:27;:40;;;;;;;5638:14;;;5666:17;;;;5449:38;;-1:-1:-1;;;;;5638:14:6;;;;-1:-1:-1;5666:17:6;;-1:-1:-1;5313:387:6;-1:-1:-1;;;;5313:387:6:o;1273:127:12:-;824:9;:7;:9::i;:::-;816:18;;;;;;;;1367:1;1351:6;;1330:40;;-1:-1:-1;;;;;1351:6:12;;;;1330:40;;1367:1;;1330:40;1393:1;1376:19;;-1:-1:-1;;1376:19:12;;;1273:127::o;639:70::-;676:7;698:6;-1:-1:-1;;;;;698:6:12;639:70;:::o;926:83::-;965:4;998:6;-1:-1:-1;;;;;998:6:12;984:10;:20;;926:83::o;3059:199:8:-;3120:10;3093:15;3111:20;;;:8;:20;;;;;;3149:12;;;3141:38;;;;;-1:-1:-1;;;;;3141:38:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3198:10;3212:1;3189:20;;;:8;:20;;;;;;:24;;;3223:28;;;;;;3243:7;;3223:28;;3212:1;3223:28;3243:7;3198:10;3223:28;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;2123:867:6;2575:42;2225:22;;2216:6:8;2203:9;:19;;2195:64;;;;;;;-1:-1:-1;;;;;2195:64:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2348:17:6;:15;:17::i;:::-;2331:34;;:9;2343:1;2331:13;:34;;;;2323:68;;;;;;;-1:-1:-1;;;;;2323:68:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2494:30;;2453:31;:38;:71;2445:119;;;;;-1:-1:-1;;;;;2445:119:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2620:40;;;;:27;:40;;;;;2678:14;;2620:40;;-1:-1:-1;;;;;;2678:14:6;:28;2670:78;;;;;-1:-1:-1;;;;;2670:78:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2758:9;:7;:9::i;:::-;2778:27;;-1:-1:-1;;2778:27:6;2795:10;2778:27;;;;;2815:29;;;2778:27;2815:17;;;:29;;;2854:31;27:10:-1;;23:18;;;45:23;;2778:14:6;2854:49;;;;;;2919:64;;;;;;2854:49;2919:64;;;;;;;;;;;;;;;;;;;;;;;2123:867;;;;:::o;6396:156::-;824:9:12;:7;:9::i;:::-;816:18;;;;;;;;6504:30:6;:41;6396:156::o;3054:1230::-;3215:42;3468:20;3529:16;3584:31;3147:15;;2332:125:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2388:16:8;;2408:2;2388:22;;-1:-1:-1;2380:59:8;;-1:-1:-1;;;2380:59:8;;;;-1:-1:-1;;;;;2380:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3260:40:6;;;;:27;:40;;;;;3314:14;;3260:40;;-1:-1:-1;;;;;;3314:14:6;:28;3310:65;;;3358:7;;3310:65;3491:28;3508:10;3491:16;:28::i;:::-;3468:51;;3558:15;;3548:26;;;;;;;;;;;;;;;;;;;;;;;;;3529:45;;3618:131;3646:7;:17;;3677:14;3725:1;3705:17;:15;:17::i;:::-;:21;3740:8;3618:14;:131::i;:::-;3584:165;-1:-1:-1;3835:27:6;3816:15;:46;;;;;;;;;3812:106;;;3901:7;;3812:106;3969:53;4001:11;4014:7;3969:31;:53::i;:::-;4055:25;4036:15;:44;;;;;;;;;4032:246;;;4114:48;;;;;;;;;;;;4133:11;;4114:48;;4146:15;;;;4114:48;;;;;4146:15;;;;4114:48;;;;;;;;;;-1:-1:-1;4114:48:6;;-1:-1:-1;;;;4114:48:6;4032:246;;;4230:37;;4255:11;;4230:37;;;;;4032:246;3054:1230;;;;;;;;:::o;5772:348::-;5882:4;5898:20;5958:42;5921:27;5938:9;5921:16;:27::i;:::-;6003:40;;;;:27;:40;;;;;5898:50;;-1:-1:-1;6003:40:6;-1:-1:-1;6060:53:6;6079:17;;;5898:50;6060:18;:53::i;:::-;6053:60;;5772:348;;;;;;;:::o;1561:101:12:-;824:9;:7;:9::i;:::-;816:18;;;;;;;;1629:28;1648:8;1629:18;:28::i;:::-;1561:101;:::o;7013:294:6:-;7137:33;7152:7;:17;;7137:14;:33::i;:::-;7187:40;;;;:27;:40;;;;;;;7180:47;;-1:-1:-1;;7180:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7180:47:6;;;;;;;;;;;;;;;;;7187:40;;;7180:47;;;;7187:40;7180:47;:::i;:::-;;;;;7238:62;7255:31;7288:11;7238:16;:62::i;3326:521:8:-;3364:11;3405:14;3441:13;3486:7;3533:17;3709:21;3378:17;:15;:17::i;:::-;3364:31;;3422:9;3405:26;;3466:5;3457:14;;:6;:14;;;;;;;;3441:30;;3496:1;3486:11;;3481:218;3511:1;3503:5;:9;3499:13;;:1;:13;;;3481:218;;;3566:19;;3553:56;;;;;;;;;;;;;;;-1:-1:-1;;;;;3566:19:8;;;;3553:53;;:56;;;;;;;;;;;;;;;3566:19;;3553:56;;;5:2:-1;;;;30:1;27;20:12;5:2;3553:56:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3553:56:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3553:56:8;-1:-1:-1;;;;;3623:19:8;;;;;;:8;3553:56;3623:19;;;;:28;;;;;;3674:14;;;;;-1:-1:-1;3514:3:8;;;;;3553:56;-1:-1:-1;3481:218:8;;;3746:19;;3733:64;;;;;;;-1:-1:-1;;3787:9:8;;3733:64;;;;;;;-1:-1:-1;;;;;3746:19:8;;;;3733:53;;:64;;;;;;;;;;;;;;;3746:19;;3733:64;;;5:2:-1;;;;30:1;27;20:12;5:2;3733:64:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3733:64:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3733:64:8;-1:-1:-1;;;;;3807:23:8;;;;;:8;3733:64;3807:23;;;;:33;;;;;;;;-1:-1:-1;;;;;3326:521:8:o;4584:1938::-;4752:15;4874:31;5313:21;5535;6259:20;4921:19;;;;;;;;;-1:-1:-1;;;;;4921:19:8;-1:-1:-1;;;;;4908:54:8;;:56;;;;;-1:-1:-1;;;4908:56:8;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4908:56:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4908:56:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4908:56:8;4978:34;;;;4908:56;;-1:-1:-1;4978:34:8;;:39;4974:276;;;5033:59;;;4974:276;;;5113:33;;:60;;5109:141;;5189:50;5204:9;5215:23;5189:14;:50::i;:::-;5346:1;5382:33;;;5338:28;;;;;;-1:-1:-1;5382:49:8;;5381:56;5377:121;;5460:27;5453:34;;;;5377:121;5559:36;;;;:26;;;:36;;;;;;;;5609:33;;;:50;;;;;;5669:34;;;:39;;5559:36;5669:39;;;;;;;-1:-1:-1;;5669:39:8;;;;;;;5718:54;;5559:36;;;:40;;5718:54;;;;;;;;;;5559:40;;-1:-1:-1;5786:20:8;5782:85;;;5822:19;;;27:10:-1;;39:1;23:18;;45:23;;-1:-1;5822:34:8;;;;;;;;;;;5782:85;5899:28;;;;;;;;5880:47;;;;5876:309;;5943:28;;;:46;;-1:-1:-1;;5943:46:8;;;;;;;;;;;;-1:-1:-1;;6089:19:8;;6076:32;;;;;;6072:103;;6135:25;6128:32;;;;6072:103;6302:34;;;;;;6282:17;:15;:17::i;:::-;6362:28;;;;6282:54;;;;-1:-1:-1;;;6362:28:8;;;;:45;;:49;6350:61;;;;;;6346:125;;;6434:26;6427:33;;;;6346:125;6488:27;6481:34;;4584:1938;;;;;;;;;;;:::o;3920:618::-;4029:4;4120:31;4402:21;4167:19;;;;;;;;;-1:-1:-1;;;;;4167:19:8;-1:-1:-1;;;;;4154:54:8;;:56;;;;;-1:-1:-1;;;4154:56:8;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4154:56:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4154:56:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4154:56:8;4251:33;;4154:56;;-1:-1:-1;4224:60:8;;4220:102;;4307:4;4300:11;;;;4220:102;-1:-1:-1;;;4435:1:8;4475:33;;;;;4427:28;;;;;;4475:49;4474:56;;3920:618::o;1796:169:12:-;-1:-1:-1;;;;;1865:22:12;;;;1857:31;;;;;;1920:6;;;1899:38;;-1:-1:-1;;;;;1899:38:12;;;;1920:6;;;1899:38;;;1943:6;:17;;-1:-1:-1;;1943:17:12;-1:-1:-1;;;;;1943:17:12;;;;;;;;;;1796:169::o;6568:224:8:-;6652:9;6647:139;6671:19;;;:26;6667:30;;6647:139;;;6725:9;:26;;:50;6752:9;:19;;6772:1;6752:22;;;;;;;;;;;;;;;;;;;;;;6725:50;;;;;;;;;;;;6718:57;;-1:-1:-1;;6718:57:8;;;;6699:3;6647:139;;6836:345;6931:6;6926:249;6947:15;;6943:19;;6926:249;;;6987:11;;7002:7;;6987:8;;6996:1;;6987:11;;;;;;;;;;;;;;;;:22;6983:182;;;7052:15;;7043:8;;-1:-1:-1;;7052:19:8;;;7043:29;;;;;;;;;;;;;;7029:8;7038:1;7029:11;;;;;;;;;;;;;;;;;;;:43;7108:15;;-1:-1:-1;;7108:19:8;7090:37;7108:8;:19;7090:37;:::i;:::-;;7145:5;;6983:182;6964:3;;6926:249;;;6836:345;;;:::o;7212:389::-;7323:25;7338:9;7323:14;:25::i;:::-;7358:59;;;:33;7427;;;:37;;;7474:34;;;:38;;-1:-1:-1;;7474:38:8;;;;;;7522:28;;;:32;;;;;;;7564:30;:19;;;7358:33;7564:30;:::i;890:6920:6:-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "source": "//! The Secret Store server key generation service contract.\n//!\n//! Copyright 2017 Svyatoslav Nikolsky, Parity Technologies Ltd.\n//!\n//! Licensed under the Apache License, Version 2.0 (the \"License\");\n//! you may not use this file except in compliance with the License.\n//! You may obtain a copy of the License at\n//!\n//! http://www.apache.org/licenses/LICENSE-2.0\n//!\n//! Unless required by applicable law or agreed to in writing, software\n//! distributed under the License is distributed on an \"AS IS\" BASIS,\n//! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//! See the License for the specific language governing permissions and\n//! limitations under the License.\n\npragma solidity ^0.4.24;\n\nimport \"../interfaces/SecretStoreService.sol\";\nimport \"./SecretStoreServiceBase.sol\";\n\n\n/// Server Key generation service contract.\n/* solium-disable-next-line */\ncontract SecretStoreServerKeyGenerationService is SecretStoreServiceBase, ServerKeyGenerationServiceClientApi, ServerKeyGenerationServiceKeyServerApi {\n /// Server key generation request.\n struct ServerKeyGenerationRequest {\n address author;\n uint256 threshold;\n RequestResponses responses;\n }\n\n /// When sever key generation request is received.\n event ServerKeyGenerationRequested(bytes32 serverKeyId, address author, uint8 threshold);\n /// When server key is generated.\n event ServerKeyGenerated(bytes32 indexed serverKeyId, bytes serverKeyPublic);\n /// When error occurs during server key generation.\n event ServerKeyGenerationError(bytes32 indexed serverKeyId);\n\n /// Constructor.\n constructor(address keyServerSetAddressInit) SecretStoreServiceBase(keyServerSetAddressInit) public {\n serverKeyGenerationFee = 200 finney;\n maxServerKeyGenerationRequests = 4;\n }\n\n // === Interface methods ===\n\n /// We do not support direct payments.\n function() public payable {\n revert(\"Direct payments are not supported.\");\n }\n\n /// Request new server key generation. Generated key will be published via ServerKeyGenerated event when available.\n function generateServerKey(bytes32 serverKeyId, uint8 threshold) external payable\n whenFeePaid(serverKeyGenerationFee)\n {\n // we can't process requests with invalid threshold\n require(threshold + 1 <= keyServersCount(), \"Threshold is invalid.\");\n // check maximum number of requests\n require(serverKeyGenerationRequestsKeys.length < maxServerKeyGenerationRequests, \"Maximum number of requests reached.\");\n\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n require(request.author == address(0), \"Request author address cannot be 0x0.\");\n deposit();\n\n request.author = msg.sender;\n request.threshold = threshold;\n serverKeyGenerationRequestsKeys.push(serverKeyId);\n\n emit ServerKeyGenerationRequested(serverKeyId, msg.sender, threshold);\n }\n\n /// Called when generation is reported by key server.\n function serverKeyGenerated(bytes32 serverKeyId, bytes serverKeyPublic) external validPublic(serverKeyPublic) {\n // check if request still active\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n if (request.author == address(0)) {\n return;\n }\n\n // insert response (we're waiting for responses from all authorities here)\n uint8 keyServerIndex = requireKeyServer(msg.sender);\n bytes32 response = keccak256(serverKeyPublic);\n ResponseSupport responseSupport = insertResponse(\n request.responses,\n keyServerIndex,\n keyServersCount() - 1,\n response);\n\n // ...and check if there are enough support\n if (responseSupport == ResponseSupport.Unconfirmed) { // not confirmed (yet)\n return;\n }\n\n // delete request and fire event\n clearServerKeyGenerationRequest(serverKeyId, request);\n if (responseSupport == ResponseSupport.Confirmed) { // confirmed\n emit ServerKeyGenerated(serverKeyId, serverKeyPublic);\n } else { // no consensus possible at all\n emit ServerKeyGenerationError(serverKeyId);\n }\n }\n\n /// Called when error occurs during server key generation.\n function serverKeyGenerationError(bytes32 serverKeyId) external {\n // check that it is called by key server\n requireKeyServer(msg.sender);\n\n // check if request still active\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n if (request.author == address(0)) {\n return;\n }\n\n // any error in key generation is fatal, because we need all key servers to participate in generation\n // => delete request and fire event\n clearServerKeyGenerationRequest(serverKeyId, request);\n emit ServerKeyGenerationError(serverKeyId);\n }\n\n /// Get count of pending server key generation requests.\n function serverKeyGenerationRequestsCount() external view returns (uint256) {\n return serverKeyGenerationRequestsKeys.length;\n }\n\n /// Get server key generation request with given index.\n /// Returns: (serverKeyId, author, threshold)\n function getServerKeyGenerationRequest(uint256 index) external view returns (bytes32, address, uint256) {\n bytes32 serverKeyId = serverKeyGenerationRequestsKeys[index];\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n return (\n serverKeyId,\n request.author,\n request.threshold\n );\n }\n\n /// Returs true if response from given keyServer is required.\n function isServerKeyGenerationResponseRequired(bytes32 serverKeyId, address keyServer) external view returns (bool) {\n uint8 keyServerIndex = requireKeyServer(keyServer);\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n return isResponseRequired(request.responses, keyServerIndex);\n }\n\n // === Administrative methods ===\n\n /// Set server key generation fee.\n function setServerKeyGenerationFee(uint256 newFee)\n public\n onlyOwner\n {\n serverKeyGenerationFee = newFee;\n }\n\n /// Set server key generation requests limit.\n function setMaxServerKeyGenerationRequests(uint256 newLimit)\n public\n onlyOwner\n {\n maxServerKeyGenerationRequests = newLimit;\n }\n\n /// Delete server key generation request.\n function deleteServerKeyGenerationRequest(bytes32 serverKeyId)\n public\n onlyOwner\n {\n ServerKeyGenerationRequest storage request = serverKeyGenerationRequests[serverKeyId];\n clearServerKeyGenerationRequest(serverKeyId, request);\n\n emit ServerKeyGenerationError(serverKeyId);\n }\n\n // === Internal methods ===\n\n /// Clear server key generation request traces.\n function clearServerKeyGenerationRequest(bytes32 serverKeyId, ServerKeyGenerationRequest storage request) private {\n clearResponses(request.responses);\n delete serverKeyGenerationRequests[serverKeyId];\n\n removeRequestKey(serverKeyGenerationRequestsKeys, serverKeyId);\n }\n\n /// Server key generation fee.\n uint256 public serverKeyGenerationFee;\n /// Maximal number of active server key generation requests. We're limiting this number to avoid\n /// infinite gas costs of some functions.\n uint256 public maxServerKeyGenerationRequests;\n\n /// Pending generation requests.\n mapping (bytes32 => ServerKeyGenerationRequest) private serverKeyGenerationRequests;\n /// Pending generation requests keys.\n bytes32[] private serverKeyGenerationRequestsKeys;\n}\n", "sourcePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/service/SecretStoreServerKeyGenerationService.sol", "ast": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/service/SecretStoreServerKeyGenerationService.sol", "exportedSymbols": { "SecretStoreServerKeyGenerationService": [ 2477 ] }, "id": 2478, "nodeType": "SourceUnit", "nodes": [ { "id": 2080, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "701:24:6" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/SecretStoreService.sol", "file": "../interfaces/SecretStoreService.sol", "id": 2081, "nodeType": "ImportDirective", "scope": 2478, "sourceUnit": 872, "src": "727:46:6", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/service/SecretStoreServiceBase.sol", "file": "./SecretStoreServiceBase.sol", "id": 2082, "nodeType": "ImportDirective", "scope": 2478, "sourceUnit": 3513, "src": "774:38:6", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2083, "name": "SecretStoreServiceBase", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3512, "src": "940:22:6", "typeDescriptions": { "typeIdentifier": "t_contract$_SecretStoreServiceBase_$3512", "typeString": "contract SecretStoreServiceBase" } }, "id": 2084, "nodeType": "InheritanceSpecifier", "src": "940:22:6" }, { "arguments": null, "baseName": { "contractScope": null, "id": 2085, "name": "ServerKeyGenerationServiceClientApi", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 596, "src": "964:35:6", "typeDescriptions": { "typeIdentifier": "t_contract$_ServerKeyGenerationServiceClientApi_$596", "typeString": "contract ServerKeyGenerationServiceClientApi" } }, "id": 2086, "nodeType": "InheritanceSpecifier", "src": "964:35:6" }, { "arguments": null, "baseName": { "contractScope": null, "id": 2087, "name": "ServerKeyGenerationServiceKeyServerApi", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 642, "src": "1001:38:6", "typeDescriptions": { "typeIdentifier": "t_contract$_ServerKeyGenerationServiceKeyServerApi_$642", "typeString": "contract ServerKeyGenerationServiceKeyServerApi" } }, "id": 2088, "nodeType": "InheritanceSpecifier", "src": "1001:38:6" } ], "contractDependencies": [ 596, 642, 3512, 4823 ], "contractKind": "contract", "documentation": "Server Key generation service contract.", "fullyImplemented": true, "id": 2477, "linearizedBaseContracts": [ 2477, 642, 596, 3512, 4823 ], "name": "SecretStoreServerKeyGenerationService", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "SecretStoreServerKeyGenerationService.ServerKeyGenerationRequest", "id": 2095, "members": [ { "constant": false, "id": 2090, "name": "author", "nodeType": "VariableDeclaration", "scope": 2095, "src": "1129:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2089, "name": "address", "nodeType": "ElementaryTypeName", "src": "1129:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2092, "name": "threshold", "nodeType": "VariableDeclaration", "scope": 2095, "src": "1153:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256"