From 61381590c04fbed695552ac228686cad97527319 Mon Sep 17 00:00:00 2001 From: marcwafik Date: Fri, 24 Aug 2018 16:10:06 +0200 Subject: [PATCH] smart contract removed abi v2 --- .../build/contracts/EncryptedFileFactory.json | 3509 ++++++++----- smart-contracts/build/contracts/MedX.json | 4398 +++++++++-------- smart-contracts/build/contracts/Ownable.json | 490 +- .../build/contracts/RecordFactory.json | 996 ++-- .../contracts/EncryptedFileFactory.sol | 45 +- smart-contracts/contracts/MedX.sol | 54 +- smart-contracts/contracts/RecordFactory.sol | 5 +- 7 files changed, 5434 insertions(+), 4063 deletions(-) diff --git a/smart-contracts/build/contracts/EncryptedFileFactory.json b/smart-contracts/build/contracts/EncryptedFileFactory.json index 2fb29be..e5774d5 100644 --- a/smart-contracts/build/contracts/EncryptedFileFactory.json +++ b/smart-contracts/build/contracts/EncryptedFileFactory.json @@ -10,25 +10,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "HashMethods", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -54,16 +35,40 @@ "name": "encryptedFiles", "outputs": [ { + "components": [ + { + "name": "digest", + "type": "bytes32" + }, + { + "name": "hashFunction", + "type": "uint8" + }, + { + "name": "size", + "type": "uint8" + } + ], "name": "filePath", - "type": "string" + "type": "tuple" }, { + "components": [ + { + "name": "digest", + "type": "bytes32" + }, + { + "name": "hashFunction", + "type": "uint8" + }, + { + "name": "size", + "type": "uint8" + } + ], "name": "dataHash", - "type": "string" - }, - { - "name": "hashMethod", - "type": "uint256" + "type": "tuple" }, { "name": "encriptionMethod", @@ -188,19 +193,31 @@ }, { "name": "_keys", - "type": "string[]" + "type": "bytes32[4][]" }, { - "name": "_filePath", - "type": "string" + "name": "_filePath_digest", + "type": "bytes32" }, { - "name": "_dataHash", - "type": "string" + "name": "_filePath_hashFunction", + "type": "uint8" }, { - "name": "_hashMethod", - "type": "uint256" + "name": "_filePath_size", + "type": "uint8" + }, + { + "name": "_dataHash_digest", + "type": "bytes32" + }, + { + "name": "_dataHash_hashFunction", + "type": "uint8" + }, + { + "name": "_dataHash_size", + "type": "uint8" }, { "name": "_encriptionMethod", @@ -235,7 +252,7 @@ }, { "name": "_key", - "type": "string" + "type": "bytes32[4]" } ], "name": "giveAccess", @@ -245,20 +262,20 @@ "type": "function" } ], - "bytecode": "0x60806040526020604051908101604052806040805190810160405280600781526020017f5348412d3531320000000000000000000000000000000000000000000000000081525081525060019060016200005b929190620000fa565b506020604051908101604052806040805190810160405280600381526020017f41455300000000000000000000000000000000000000000000000000000000008152508152506002906001620000b3929190620000fa565b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200028d565b8280548282559060005260206000209081019282156200014e579160200282015b828111156200014d5782518290805190602001906200013c92919062000161565b50916020019190600101906200011b565b5b5090506200015d9190620001e8565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001a457805160ff1916838001178555620001d5565b82800160010185558215620001d5579182015b82811115620001d4578251825591602001919060010190620001b7565b5b509050620001e4919062000219565b5090565b6200021691905b8082111562000212576000818162000208919062000241565b50600101620001ef565b5090565b90565b6200023e91905b808211156200023a57600081600090555060010162000220565b5090565b90565b50805460018160011615610100020316600290046000825580601f106200026957506200028a565b601f01602090049060005260206000209081019062000289919062000219565b5b50565b61127f806200029d6000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100935780638b9337bf146100aa5780638da5cb5b146100e7578063a893cd5914610112578063d6aa9e031461014f578063f2d5462e1461018f578063f2fde38b146101b8578063fc3bf40d146101e1575b600080fd5b34801561009f57600080fd5b506100a861021e565b005b3480156100b657600080fd5b506100d160048036036100cc9190810190610f1b565b610320565b6040516100de919061102e565b60405180910390f35b3480156100f357600080fd5b506100fc6103db565b6040516101099190611013565b60405180910390f35b34801561011e57600080fd5b5061013960048036036101349190810190610e1d565b610400565b60405161014691906110a3565b60405180910390f35b34801561015b57600080fd5b5061017660048036036101719190810190610f1b565b610647565b6040516101869493929190611050565b60405180910390f35b34801561019b57600080fd5b506101b660048036036101b19190810190610f44565b6107b6565b005b3480156101c457600080fd5b506101df60048036036101da9190810190610df4565b6108e4565b005b3480156101ed57600080fd5b5061020860048036036102039190810190610f1b565b61094b565b604051610215919061102e565b60405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561027957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60018181548110151561032f57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561046057600080fd5b6003608060405190810160405280898152602001888152602001878152602001868152509080600181540180825580915050906001820390600052602060002090600502016000909192909190915060008201518160000190805190602001906104cb929190610b00565b5060208201518160010190805190602001906104e8929190610b00565b5060408201518160020155606082015181600301555050925082806001900393505060038181548110151561051957fe5b90600052602060002090600502019150600090505b875181101561063a57878181518110151561054557fe5b906020019060200201518260040160008b8481518110151561056357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105ba929190610b80565b508289828151811015156105ca57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a4808060010191505061052e565b5050979650505050505050565b60038181548110151561065657fe5b9060005260206000209060050201600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107a05780601f10610775576101008083540402835291602001916107a0565b820191906000526020600020905b81548152906001019060200180831161078357829003601f168201915b5050505050908060020154908060030154905084565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081157600080fd5b8060038581548110151561082157fe5b906000526020600020906005020160040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209080519060200190610882929190610b80565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093f57600080fd5b61094881610a06565b50565b60028181548110151561095a57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109fe5780601f106109d3576101008083540402835291602001916109fe565b820191906000526020600020905b8154815290600101906020018083116109e157829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a4257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b4157805160ff1916838001178555610b6f565b82800160010185558215610b6f579182015b82811115610b6e578251825591602001919060010190610b53565b5b509050610b7c9190610c00565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610bc157805160ff1916838001178555610bef565b82800160010185558215610bef579182015b82811115610bee578251825591602001919060010190610bd3565b5b509050610bfc9190610c00565b5090565b610c2291905b80821115610c1e576000816000905550600101610c06565b5090565b90565b6000610c3182356111c8565b905092915050565b600082601f8301121515610c4c57600080fd5b8135610c5f610c5a826110eb565b6110be565b91508181835260208401935060208101905083856020840282011115610c8457600080fd5b60005b83811015610cb45781610c9a8882610c25565b845260208401935060208301925050600181019050610c87565b5050505092915050565b600082601f8301121515610cd157600080fd5b8135610ce4610cdf82611113565b6110be565b9150818183526020840193506020810190508360005b83811015610d2a5781358601610d108882610d34565b845260208401935060208301925050600181019050610cfa565b5050505092915050565b600082601f8301121515610d4757600080fd5b8135610d5a610d558261113b565b6110be565b91508082526020830160208301858383011115610d7657600080fd5b610d818382846111f2565b50505092915050565b600082601f8301121515610d9d57600080fd5b8135610db0610dab82611167565b6110be565b91508082526020830160208301858383011115610dcc57600080fd5b610dd78382846111f2565b50505092915050565b6000610dec82356111e8565b905092915050565b600060208284031215610e0657600080fd5b6000610e1484828501610c25565b91505092915050565b600080600080600080600060e0888a031215610e3857600080fd5b6000610e468a828b01610c25565b975050602088013567ffffffffffffffff811115610e6357600080fd5b610e6f8a828b01610c39565b965050604088013567ffffffffffffffff811115610e8c57600080fd5b610e988a828b01610cbe565b955050606088013567ffffffffffffffff811115610eb557600080fd5b610ec18a828b01610d8a565b945050608088013567ffffffffffffffff811115610ede57600080fd5b610eea8a828b01610d8a565b93505060a0610efb8a828b01610de0565b92505060c0610f0c8a828b01610de0565b91505092959891949750929550565b600060208284031215610f2d57600080fd5b6000610f3b84828501610de0565b91505092915050565b60008060008060808587031215610f5a57600080fd5b6000610f6887828801610de0565b9450506020610f7987828801610c25565b9350506040610f8a87828801610c25565b925050606085013567ffffffffffffffff811115610fa757600080fd5b610fb387828801610d8a565b91505092959194509250565b610fc88161119e565b82525050565b6000610fd982611193565b808452610fed816020860160208601611201565b610ff681611234565b602085010191505092915050565b61100d816111be565b82525050565b60006020820190506110286000830184610fbf565b92915050565b600060208201905081810360008301526110488184610fce565b905092915050565b6000608082019050818103600083015261106a8187610fce565b9050818103602083015261107e8186610fce565b905061108d6040830185611004565b61109a6060830184611004565b95945050505050565b60006020820190506110b86000830184611004565b92915050565b6000604051905081810181811067ffffffffffffffff821117156110e157600080fd5b8060405250919050565b600067ffffffffffffffff82111561110257600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561112a57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561115257600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561117e57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561121f578082015181840152602081019050611204565b8381111561122e576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a7230582034bea3092b3b752d4e390f508a6da4e057e0403f5b767d28c8a41e2ae6f4985e6c6578706572696d656e74616cf50037", - "deployedBytecode": "0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100935780638b9337bf146100aa5780638da5cb5b146100e7578063a893cd5914610112578063d6aa9e031461014f578063f2d5462e1461018f578063f2fde38b146101b8578063fc3bf40d146101e1575b600080fd5b34801561009f57600080fd5b506100a861021e565b005b3480156100b657600080fd5b506100d160048036036100cc9190810190610f1b565b610320565b6040516100de919061102e565b60405180910390f35b3480156100f357600080fd5b506100fc6103db565b6040516101099190611013565b60405180910390f35b34801561011e57600080fd5b5061013960048036036101349190810190610e1d565b610400565b60405161014691906110a3565b60405180910390f35b34801561015b57600080fd5b5061017660048036036101719190810190610f1b565b610647565b6040516101869493929190611050565b60405180910390f35b34801561019b57600080fd5b506101b660048036036101b19190810190610f44565b6107b6565b005b3480156101c457600080fd5b506101df60048036036101da9190810190610df4565b6108e4565b005b3480156101ed57600080fd5b5061020860048036036102039190810190610f1b565b61094b565b604051610215919061102e565b60405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561027957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60018181548110151561032f57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561046057600080fd5b6003608060405190810160405280898152602001888152602001878152602001868152509080600181540180825580915050906001820390600052602060002090600502016000909192909190915060008201518160000190805190602001906104cb929190610b00565b5060208201518160010190805190602001906104e8929190610b00565b5060408201518160020155606082015181600301555050925082806001900393505060038181548110151561051957fe5b90600052602060002090600502019150600090505b875181101561063a57878181518110151561054557fe5b906020019060200201518260040160008b8481518110151561056357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105ba929190610b80565b508289828151811015156105ca57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a4808060010191505061052e565b5050979650505050505050565b60038181548110151561065657fe5b9060005260206000209060050201600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107a05780601f10610775576101008083540402835291602001916107a0565b820191906000526020600020905b81548152906001019060200180831161078357829003601f168201915b5050505050908060020154908060030154905084565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081157600080fd5b8060038581548110151561082157fe5b906000526020600020906005020160040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209080519060200190610882929190610b80565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093f57600080fd5b61094881610a06565b50565b60028181548110151561095a57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109fe5780601f106109d3576101008083540402835291602001916109fe565b820191906000526020600020905b8154815290600101906020018083116109e157829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a4257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b4157805160ff1916838001178555610b6f565b82800160010185558215610b6f579182015b82811115610b6e578251825591602001919060010190610b53565b5b509050610b7c9190610c00565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610bc157805160ff1916838001178555610bef565b82800160010185558215610bef579182015b82811115610bee578251825591602001919060010190610bd3565b5b509050610bfc9190610c00565b5090565b610c2291905b80821115610c1e576000816000905550600101610c06565b5090565b90565b6000610c3182356111c8565b905092915050565b600082601f8301121515610c4c57600080fd5b8135610c5f610c5a826110eb565b6110be565b91508181835260208401935060208101905083856020840282011115610c8457600080fd5b60005b83811015610cb45781610c9a8882610c25565b845260208401935060208301925050600181019050610c87565b5050505092915050565b600082601f8301121515610cd157600080fd5b8135610ce4610cdf82611113565b6110be565b9150818183526020840193506020810190508360005b83811015610d2a5781358601610d108882610d34565b845260208401935060208301925050600181019050610cfa565b5050505092915050565b600082601f8301121515610d4757600080fd5b8135610d5a610d558261113b565b6110be565b91508082526020830160208301858383011115610d7657600080fd5b610d818382846111f2565b50505092915050565b600082601f8301121515610d9d57600080fd5b8135610db0610dab82611167565b6110be565b91508082526020830160208301858383011115610dcc57600080fd5b610dd78382846111f2565b50505092915050565b6000610dec82356111e8565b905092915050565b600060208284031215610e0657600080fd5b6000610e1484828501610c25565b91505092915050565b600080600080600080600060e0888a031215610e3857600080fd5b6000610e468a828b01610c25565b975050602088013567ffffffffffffffff811115610e6357600080fd5b610e6f8a828b01610c39565b965050604088013567ffffffffffffffff811115610e8c57600080fd5b610e988a828b01610cbe565b955050606088013567ffffffffffffffff811115610eb557600080fd5b610ec18a828b01610d8a565b945050608088013567ffffffffffffffff811115610ede57600080fd5b610eea8a828b01610d8a565b93505060a0610efb8a828b01610de0565b92505060c0610f0c8a828b01610de0565b91505092959891949750929550565b600060208284031215610f2d57600080fd5b6000610f3b84828501610de0565b91505092915050565b60008060008060808587031215610f5a57600080fd5b6000610f6887828801610de0565b9450506020610f7987828801610c25565b9350506040610f8a87828801610c25565b925050606085013567ffffffffffffffff811115610fa757600080fd5b610fb387828801610d8a565b91505092959194509250565b610fc88161119e565b82525050565b6000610fd982611193565b808452610fed816020860160208601611201565b610ff681611234565b602085010191505092915050565b61100d816111be565b82525050565b60006020820190506110286000830184610fbf565b92915050565b600060208201905081810360008301526110488184610fce565b905092915050565b6000608082019050818103600083015261106a8187610fce565b9050818103602083015261107e8186610fce565b905061108d6040830185611004565b61109a6060830184611004565b95945050505050565b60006020820190506110b86000830184611004565b92915050565b6000604051905081810181811067ffffffffffffffff821117156110e157600080fd5b8060405250919050565b600067ffffffffffffffff82111561110257600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561112a57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561115257600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561117e57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561121f578082015181840152602081019050611204565b8381111561122e576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a7230582034bea3092b3b752d4e390f508a6da4e057e0403f5b767d28c8a41e2ae6f4985e6c6578706572696d656e74616cf50037", - "sourceMap": "90:1514:0:-;;;140:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;189:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;90:1514:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "90:1514:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;140:41:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;140:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;249:20:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;636:763:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;636:763:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;428:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;428:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1407:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1407:192:0;;;;;;;;;;;;;;;;;;;1408:111:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;189:43:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;189:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;140:41:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;249:20:2:-;;;;;;;;;;;;;:::o;636:763:0:-;878:10;1144:36;1226:6;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;911:14:0;931:182;;;;;;;;;970:9;931:182;;;;1004:9;931:182;;;;1040:11;931:182;;;;1084:17;931:182;;;911:203;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;911:203:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;903:211;;1125:8;;;;;;;;1183:14;1198:1;1183:17;;;;;;;;;;;;;;;;;;;;1144:56;;1235:1;1226:10;;1221:171;1242:5;:12;1238:1;:16;1221:171;;;1314:5;1320:1;1314:8;;;;;;;;;;;;;;;;;;1276:14;:19;;:35;1296:11;1308:1;1296:14;;;;;;;;;;;;;;;;;;1276:35;;;;;;;;;;;;;;;:46;;;;;;;;;;;;:::i;:::-;;1374:5;1359:11;1371:1;1359:14;;;;;;;;;;;;;;;;;;1342:38;;1354:3;1342:38;;;;;;;;;;;;1256:3;;;;;;;1221:171;;;636:763;;;;;;;;;;;:::o;428:37::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1407:192::-;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1542:4:0;1507:14;1522:6;1507:22;;;;;;;;;;;;;;;;;;;;:27;;:32;1535:3;1507:32;;;;;;;;;;;;;;;:39;;;;;;;;;;;;:::i;:::-;;1584:6;1579:3;1562:29;;1574:3;1562:29;;;;;;;;;;;;1407:192;;;;:::o;1408:111:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;189:43:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1670:189:2:-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o;90:1514:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;;57:66;;;;;148:707;;265:3;258:4;250:6;246:17;242:27;235:35;232:2;;;283:1;280;273:12;232:2;320:6;307:20;342:80;357:64;414:6;357:64;;;342:80;;;333:89;;439:5;464:6;457:5;450:21;494:4;486:6;482:17;472:27;;516:4;511:3;507:14;500:21;;569:6;616:3;608:4;600:6;596:17;591:3;587:27;584:36;581:2;;;633:1;630;623:12;581:2;658:1;643:206;668:6;665:1;662:13;643:206;;;726:3;748:37;781:3;769:10;748:37;;;743:3;736:50;809:4;804:3;800:14;793:21;;837:4;832:3;828:14;821:21;;700:149;690:1;687;683:9;678:14;;643:206;;;647:14;225:630;;;;;;;;880:696;;1003:3;996:4;988:6;984:17;980:27;973:35;970:2;;;1021:1;1018;1011:12;970:2;1058:6;1045:20;1080:86;1095:70;1158:6;1095:70;;;1080:86;;;1071:95;;1183:5;1208:6;1201:5;1194:21;1238:4;1230:6;1226:17;1216:27;;1260:4;1255:3;1251:14;1244:21;;1313:6;1346:1;1331:239;1356:6;1353:1;1350:13;1331:239;;;1439:3;1426:17;1418:6;1414:30;1463:43;1502:3;1490:10;1463:43;;;1458:3;1451:56;1530:4;1525:3;1521:14;1514:21;;1558:4;1553:3;1549:14;1542:21;;1388:182;1378:1;1375;1371:9;1366:14;;1331:239;;;1335:14;963:613;;;;;;;;1585:434;;1683:3;1676:4;1668:6;1664:17;1660:27;1653:35;1650:2;;;1701:1;1698;1691:12;1650:2;1738:6;1725:20;1760:61;1775:45;1813:6;1775:45;;;1760:61;;;1751:70;;1841:6;1834:5;1827:21;1877:4;1869:6;1865:17;1910:4;1903:5;1899:16;1945:3;1936:6;1931:3;1927:16;1924:25;1921:2;;;1962:1;1959;1952:12;1921:2;1972:41;2006:6;2001:3;1996;1972:41;;;1643:376;;;;;;;;2028:442;;2130:3;2123:4;2115:6;2111:17;2107:27;2100:35;2097:2;;;2148:1;2145;2138:12;2097:2;2185:6;2172:20;2207:65;2222:49;2264:6;2222:49;;;2207:65;;;2198:74;;2292:6;2285:5;2278:21;2328:4;2320:6;2316:17;2361:4;2354:5;2350:16;2396:3;2387:6;2382:3;2378:16;2375:25;2372:2;;;2413:1;2410;2403:12;2372:2;2423:41;2457:6;2452:3;2447;2423:41;;;2090:380;;;;;;;;2478:118;;2545:46;2583:6;2570:20;2545:46;;;2536:55;;2530:66;;;;;2603:241;;2707:2;2695:9;2686:7;2682:23;2678:32;2675:2;;;2723:1;2720;2713:12;2675:2;2758:1;2775:53;2820:7;2811:6;2800:9;2796:22;2775:53;;;2765:63;;2737:97;2669:175;;;;;2851:1491;;;;;;;;3133:3;3121:9;3112:7;3108:23;3104:33;3101:2;;;3150:1;3147;3140:12;3101:2;3185:1;3202:53;3247:7;3238:6;3227:9;3223:22;3202:53;;;3192:63;;3164:97;3320:2;3309:9;3305:18;3292:32;3344:18;3336:6;3333:30;3330:2;;;3376:1;3373;3366:12;3330:2;3396:78;3466:7;3457:6;3446:9;3442:22;3396:78;;;3386:88;;3271:209;3539:2;3528:9;3524:18;3511:32;3563:18;3555:6;3552:30;3549:2;;;3595:1;3592;3585:12;3549:2;3615:84;3691:7;3682:6;3671:9;3667:22;3615:84;;;3605:94;;3490:215;3764:2;3753:9;3749:18;3736:32;3788:18;3780:6;3777:30;3774:2;;;3820:1;3817;3810:12;3774:2;3840:63;3895:7;3886:6;3875:9;3871:22;3840:63;;;3830:73;;3715:194;3968:3;3957:9;3953:19;3940:33;3993:18;3985:6;3982:30;3979:2;;;4025:1;4022;4015:12;3979:2;4045:63;4100:7;4091:6;4080:9;4076:22;4045:63;;;4035:73;;3919:195;4145:3;4164:53;4209:7;4200:6;4189:9;4185:22;4164:53;;;4154:63;;4124:99;4254:3;4273:53;4318:7;4309:6;4298:9;4294:22;4273:53;;;4263:63;;4233:99;3095:1247;;;;;;;;;;;4349:241;;4453:2;4441:9;4432:7;4428:23;4424:32;4421:2;;;4469:1;4466;4459:12;4421:2;4504:1;4521:53;4566:7;4557:6;4546:9;4542:22;4521:53;;;4511:63;;4483:97;4415:175;;;;;4597:723;;;;;4762:3;4750:9;4741:7;4737:23;4733:33;4730:2;;;4779:1;4776;4769:12;4730:2;4814:1;4831:53;4876:7;4867:6;4856:9;4852:22;4831:53;;;4821:63;;4793:97;4921:2;4939:53;4984:7;4975:6;4964:9;4960:22;4939:53;;;4929:63;;4900:98;5029:2;5047:53;5092:7;5083:6;5072:9;5068:22;5047:53;;;5037:63;;5008:98;5165:2;5154:9;5150:18;5137:32;5189:18;5181:6;5178:30;5175:2;;;5221:1;5218;5211:12;5175:2;5241:63;5296:7;5287:6;5276:9;5272:22;5241:63;;;5231:73;;5116:194;4724:596;;;;;;;;5327:110;5400:31;5425:5;5400:31;;;5395:3;5388:44;5382:55;;;5444:292;;5542:35;5571:5;5542:35;;;5594:6;5589:3;5582:19;5606:63;5662:6;5655:4;5650:3;5646:14;5639:4;5632:5;5628:16;5606:63;;;5701:29;5723:6;5701:29;;;5694:4;5689:3;5685:14;5681:50;5674:57;;5522:214;;;;;;5743:110;5816:31;5841:5;5816:31;;;5811:3;5804:44;5798:55;;;5860:193;;5968:2;5957:9;5953:18;5945:26;;5982:61;6040:1;6029:9;6025:17;6016:6;5982:61;;;5939:114;;;;;6060:273;;6184:2;6173:9;6169:18;6161:26;;6234:9;6228:4;6224:20;6220:1;6209:9;6205:17;6198:47;6259:64;6318:4;6309:6;6259:64;;;6251:72;;6155:178;;;;;6340:657;;6564:3;6553:9;6549:19;6541:27;;6615:9;6609:4;6605:20;6601:1;6590:9;6586:17;6579:47;6640:64;6699:4;6690:6;6640:64;;;6632:72;;6752:9;6746:4;6742:20;6737:2;6726:9;6722:18;6715:48;6777:64;6836:4;6827:6;6777:64;;;6769:72;;6852:62;6910:2;6899:9;6895:18;6886:6;6852:62;;;6925;6983:2;6972:9;6968:18;6959:6;6925:62;;;6535:462;;;;;;;;7004:193;;7112:2;7101:9;7097:18;7089:26;;7126:61;7184:1;7173:9;7169:17;7160:6;7126:61;;;7083:114;;;;;7204:256;;7266:2;7260:9;7250:19;;7304:4;7296:6;7292:17;7403:6;7391:10;7388:22;7367:18;7355:10;7352:34;7349:62;7346:2;;;7424:1;7421;7414:12;7346:2;7444:10;7440:2;7433:22;7244:216;;;;;7467:258;;7626:18;7618:6;7615:30;7612:2;;;7658:1;7655;7648:12;7612:2;7687:4;7679:6;7675:17;7667:25;;7715:4;7709;7705:15;7697:23;;7549:176;;;;7732:264;;7897:18;7889:6;7886:30;7883:2;;;7929:1;7926;7919:12;7883:2;7958:4;7950:6;7946:17;7938:25;;7986:4;7980;7976:15;7968:23;;7820:176;;;;8003:255;;8143:18;8135:6;8132:30;8129:2;;;8175:1;8172;8165:12;8129:2;8219:4;8215:9;8208:4;8200:6;8196:17;8192:33;8184:41;;8248:4;8242;8238:15;8230:23;;8066:192;;;;8265:259;;8409:18;8401:6;8398:30;8395:2;;;8441:1;8438;8431:12;8395:2;8485:4;8481:9;8474:4;8466:6;8462:17;8458:33;8450:41;;8514:4;8508;8504:15;8496:23;;8332:192;;;;8531:88;;8608:5;8602:12;8592:22;;8586:33;;;;8626:128;;8706:42;8699:5;8695:54;8684:65;;8678:76;;;;8761:79;;8830:5;8819:16;;8813:27;;;;8847:128;;8927:42;8920:5;8916:54;8905:65;;8899:76;;;;8982:79;;9051:5;9040:16;;9034:27;;;;9069:145;9150:6;9145:3;9140;9127:30;9206:1;9197:6;9192:3;9188:16;9181:27;9120:94;;;;9223:268;9288:1;9295:101;9309:6;9306:1;9303:13;9295:101;;;9385:1;9380:3;9376:11;9370:18;9366:1;9361:3;9357:11;9350:39;9331:2;9328:1;9324:10;9319:15;;9295:101;;;9411:6;9408:1;9405:13;9402:2;;;9476:1;9467:6;9462:3;9458:16;9451:27;9402:2;9272:219;;;;;9499:97;;9587:2;9583:7;9578:2;9571:5;9567:14;9563:28;9553:38;;9547:49;;;", - "source": "pragma solidity ^0.4.24;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\ncontract EncryptedFileFactory is Ownable {\r\n\r\n string[] public HashMethods = [\"SHA-512\"]; \r\n string[] public EncryptionMethods = [\"AES\"];\r\n\r\n struct EncryptedFile {\r\n string filePath;\r\n string dataHash;\r\n uint hashMethod;\r\n uint encriptionMethod;\r\n mapping(address=>string) keys;\r\n }\r\n\r\n EncryptedFile[] public encryptedFiles;\r\n\r\n event Created(address indexed by, uint indexed encryptedFile);\r\n event GivenAccess(address indexed by, address indexed to, uint indexed encryptedFile);\r\n\r\n function create(\r\n address _by,\r\n address[] _keysOwners,\r\n string[] _keys,\r\n string _filePath,\r\n string _dataHash,\r\n uint _hashMethod,\r\n uint _encriptionMethod\r\n ) public onlyOwner returns (uint index) {\r\n\r\n index = encryptedFiles.push(EncryptedFile({\r\n filePath: _filePath,\r\n dataHash: _dataHash,\r\n hashMethod: _hashMethod,\r\n encriptionMethod: _encriptionMethod\r\n }));\r\n index --;\r\n EncryptedFile storage _encryptedFile = encryptedFiles[i];\r\n \r\n for (uint i = 0; i < _keys.length; i++) {\r\n _encryptedFile.keys[_keysOwners[i]] = _keys[i];\r\n emit GivenAccess(_by, _keysOwners[i],index);\r\n }\r\n }\r\n\r\n function giveAccess(uint _index, address _to, address _by, string _key) public onlyOwner {\r\n encryptedFiles[_index].keys[_to] = _key;\r\n emit GivenAccess(_by, _to, _index);\r\n }\r\n\r\n}\r\n", + "bytecode": "0x60806040526020604051908101604052806040805190810160405280600381526020017f414553000000000000000000000000000000000000000000000000000000000081525081525060019060016200005b929190620000a2565b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000235565b828054828255906000526020600020908101928215620000f6579160200282015b82811115620000f5578251829080519060200190620000e492919062000109565b5091602001919060010190620000c3565b5b50905062000105919062000190565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200014c57805160ff19168380011785556200017d565b828001600101855582156200017d579182015b828111156200017c5782518255916020019190600101906200015f565b5b5090506200018c9190620001c1565b5090565b620001be91905b80821115620001ba5760008181620001b09190620001e9565b5060010162000197565b5090565b90565b620001e691905b80821115620001e2576000816000905550600101620001c8565b5090565b90565b50805460018160011615610100020316600290046000825580601f1062000211575062000232565b601f016020900490600052602060002090810190620002319190620001c1565b5b50565b610df880620002456000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100885780638173398a1461009f5780638da5cb5b14610212578063d6aa9e0314610269578063df594380146102b8578063f2fde38b14610354578063fc3bf40d14610397575b600080fd5b34801561009457600080fd5b5061009d61043d565b005b3480156100ab57600080fd5b506101fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561019057848483905060800201600480602002604051908101604052809291908260046020028082843782019150505050508152602001906001019061014b565b505050505091929192908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035906020019092919050505061053f565b6040518082815260200191505060405180910390f35b34801561021e57600080fd5b50610227610910565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b5061029460048036038101908080359060200190929190505050610935565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102c457600080fd5b5061035260048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060800190600480602002604051908101604052809291908260046020028082843782019150505050509192919290505050610a1c565b005b34801561036057600080fd5b50610395600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b45565b005b3480156103a357600080fd5b506103c260048036038101908080359060200190929190505050610bac565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104025780820151818401526020810190506103e7565b50505050905090810190601f16801561042f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561049857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059f57600080fd5b60026060604051908101604052806060604051908101604052808e6000191681526020018d60ff1681526020018c60ff1681525081526020016060604051908101604052808b6000191681526020018a60ff1681526020018960ff16815250815260200186815250908060018154018082558091505090600182039060005260206000209060060201600090919290919091506000820151816000016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff16021790555050506020820151816002016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff1602179055505050604082015181600401555050925082806001900393505060028181548110151561071257fe5b90600052602060002090600602019150600090505b8b51811015610900576080604051908101604052808c600081518110151561074b57fe5b906020019060200201518360048110151561076257fe5b6020020151600019166000191681526020018c600181518110151561078357fe5b906020019060200201518360048110151561079a57fe5b6020020151600019166000191681526020018c60028151811015156107bb57fe5b90602001906020020151836004811015156107d257fe5b6020020151600019166000191681526020018c60038151811015156107f357fe5b906020019060200201518360048110151561080a57fe5b602002015160001916600019168152508260050160008e8481518110151561082e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610880929190610d61565b50828c8281518110151561089057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a48080600101915050610727565b50509a9950505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028181548110151561094457fe5b906000526020600020906006020160009150905080600001606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff16815250509080600201606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff1681525050908060040154905083565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a7757600080fd5b80600285815481101515610a8757fe5b906000526020600020906006020160050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610ae3929190610d61565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ba057600080fd5b610ba981610c67565b50565b600181815481101515610bbb57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c5f5780601f10610c3457610100808354040283529160200191610c5f565b820191906000526020600020905b815481529060010190602001808311610c4257829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ca357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b8260048101928215610d96579160200282015b82811115610d95578251829060001916905591602001919060010190610d74565b5b509050610da39190610da7565b5090565b610dc991905b80821115610dc5576000816000905550600101610dad565b5090565b905600a165627a7a72305820aca4ad99fecd4c624739a204429a9b2ce8749201e512a061d64d4378f450b6420029", + "deployedBytecode": "0x608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100885780638173398a1461009f5780638da5cb5b14610212578063d6aa9e0314610269578063df594380146102b8578063f2fde38b14610354578063fc3bf40d14610397575b600080fd5b34801561009457600080fd5b5061009d61043d565b005b3480156100ab57600080fd5b506101fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561019057848483905060800201600480602002604051908101604052809291908260046020028082843782019150505050508152602001906001019061014b565b505050505091929192908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035906020019092919050505061053f565b6040518082815260200191505060405180910390f35b34801561021e57600080fd5b50610227610910565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b5061029460048036038101908080359060200190929190505050610935565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102c457600080fd5b5061035260048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060800190600480602002604051908101604052809291908260046020028082843782019150505050509192919290505050610a1c565b005b34801561036057600080fd5b50610395600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b45565b005b3480156103a357600080fd5b506103c260048036038101908080359060200190929190505050610bac565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104025780820151818401526020810190506103e7565b50505050905090810190601f16801561042f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561049857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059f57600080fd5b60026060604051908101604052806060604051908101604052808e6000191681526020018d60ff1681526020018c60ff1681525081526020016060604051908101604052808b6000191681526020018a60ff1681526020018960ff16815250815260200186815250908060018154018082558091505090600182039060005260206000209060060201600090919290919091506000820151816000016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff16021790555050506020820151816002016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff1602179055505050604082015181600401555050925082806001900393505060028181548110151561071257fe5b90600052602060002090600602019150600090505b8b51811015610900576080604051908101604052808c600081518110151561074b57fe5b906020019060200201518360048110151561076257fe5b6020020151600019166000191681526020018c600181518110151561078357fe5b906020019060200201518360048110151561079a57fe5b6020020151600019166000191681526020018c60028151811015156107bb57fe5b90602001906020020151836004811015156107d257fe5b6020020151600019166000191681526020018c60038151811015156107f357fe5b906020019060200201518360048110151561080a57fe5b602002015160001916600019168152508260050160008e8481518110151561082e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610880929190610d61565b50828c8281518110151561089057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a48080600101915050610727565b50509a9950505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028181548110151561094457fe5b906000526020600020906006020160009150905080600001606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff16815250509080600201606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff1681525050908060040154905083565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a7757600080fd5b80600285815481101515610a8757fe5b906000526020600020906006020160050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610ae3929190610d61565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ba057600080fd5b610ba981610c67565b50565b600181815481101515610bbb57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c5f5780601f10610c3457610100808354040283529160200191610c5f565b820191906000526020600020905b815481529060010190602001808311610c4257829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ca357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b8260048101928215610d96579160200282015b82811115610d95578251829060001916905591602001919060010190610d74565b5b509050610da39190610da7565b5090565b610dc991905b80821115610dc5576000816000905550600101610dad565b5090565b905600a165627a7a72305820aca4ad99fecd4c624739a204429a9b2ce8749201e512a061d64d4378f450b6420029", + "sourceMap": "55:2013:0:-;;;105:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;55:2013:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "55:2013:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;644:1215:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;644:1215:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;249:20:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;436:37:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;436:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1867:196;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1867:196:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1408:111:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;105:43:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;105:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;105:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;644:1215:0:-;1019:10;1555:36;1637:6;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1052:14:0;1072:452;;;;;;;;;1111:163;;;;;;;;;1148:16;1111:163;;;;;;;1197:22;1111:163;;;;;;1244:14;1111:163;;;;;1072:452;;;;1299:163;;;;;;;;;1336:16;1299:163;;;;;;;1385:22;1299:163;;;;;;1432:14;1299:163;;;;;1072:452;;;;1495:17;1072:452;;;1052:473;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1052:473:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1044:481;;1536:8;;;;;;;;1594:14;1609:1;1594:17;;;;;;;;;;;;;;;;;;;;1555:56;;1646:1;1637:10;;1632:220;1653:11;:18;1649:1;:22;1632:220;;;1693:89;;;;;;;;;1732:5;1738:1;1732:8;;;;;;;;;;;;;;;;;;1741:1;1732:11;;;;;;;;;;;;;1693:89;;;;;;;;;;1745:5;1751:1;1745:8;;;;;;;;;;;;;;;;;;1754:1;1745:11;;;;;;;;;;;;;1693:89;;;;;;;;;;1757:5;1763:1;1757:8;;;;;;;;;;;;;;;;;;1766:1;1757:11;;;;;;;;;;;;;1693:89;;;;;;;;;;1770:5;1776:1;1770:8;;;;;;;;;;;;;;;;;;1779:1;1770:11;;;;;;;;;;;;;1693:89;;;;;;;;;:14;:19;;:35;1713:11;1725:1;1713:14;;;;;;;;;;;;;;;;;;1693:35;;;;;;;;;;;;;;;:89;;;;;;;:::i;:::-;;1834:5;1819:11;1831:1;1819:14;;;;;;;;;;;;;;;;;;1802:38;;1814:3;1802:38;;;;;;;;;;;;1673:3;;;;;;;1632:220;;;644:1215;;;;;;;;;;;;;;:::o;249:20:2:-;;;;;;;;;;;;;:::o;436:37:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1867:196::-;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;2006:4:0;1971:14;1986:6;1971:22;;;;;;;;;;;;;;;;;;;;:27;;:32;1999:3;1971:32;;;;;;;;;;;;;;;:39;;;;;;;:::i;:::-;;2048:6;2043:3;2026:29;;2038:3;2026:29;;;;;;;;;;;;1867:196;;;;:::o;1408:111:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;105:43:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1670:189:2:-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o;55:2013:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.24;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\ncontract EncryptedFileFactory is Ownable {\r\n\r\n string[] public EncryptionMethods = [\"AES\"];\r\n\r\n struct Multihash {\r\n bytes32 digest;\r\n uint8 hashFunction;\r\n uint8 size;\r\n }\r\n\r\n struct EncryptedFile {\r\n Multihash filePath;\r\n Multihash dataHash;\r\n uint encriptionMethod;\r\n mapping(address=>bytes32[4]) keys;\r\n }\r\n\r\n EncryptedFile[] public encryptedFiles;\r\n\r\n event Created(address indexed by, uint indexed encryptedFile);\r\n event GivenAccess(address indexed by, address indexed to, uint indexed encryptedFile);\r\n\r\n function create(\r\n address _by,\r\n address[] _keysOwners,\r\n bytes32[4][] _keys,\r\n bytes32 _filePath_digest,\r\n uint8 _filePath_hashFunction,\r\n uint8 _filePath_size,\r\n bytes32 _dataHash_digest,\r\n uint8 _dataHash_hashFunction,\r\n uint8 _dataHash_size,\r\n uint _encriptionMethod\r\n ) public onlyOwner returns (uint index) {\r\n\r\n index = encryptedFiles.push(EncryptedFile({\r\n filePath: Multihash({\r\n digest: _filePath_digest,\r\n hashFunction: _filePath_hashFunction,\r\n size: _filePath_size\r\n }),\r\n dataHash: Multihash({\r\n digest: _dataHash_digest,\r\n hashFunction: _dataHash_hashFunction,\r\n size: _dataHash_size\r\n }),\r\n encriptionMethod: _encriptionMethod\r\n }));\r\n index --;\r\n EncryptedFile storage _encryptedFile = encryptedFiles[i];\r\n \r\n for (uint i = 0; i < _keysOwners.length; i++) {\r\n _encryptedFile.keys[_keysOwners[i]] = [_keys[0][i], _keys[1][i],_keys[2][i], _keys[3][i]];\r\n emit GivenAccess(_by, _keysOwners[i],index);\r\n }\r\n }\r\n\r\n function giveAccess(uint _index, address _to, address _by, bytes32[4] _key) public onlyOwner {\r\n encryptedFiles[_index].keys[_to] = _key;\r\n emit GivenAccess(_by, _to, _index);\r\n }\r\n\r\n}\r\n", "sourcePath": "D:\\SourceCode\\MedX\\MedX\\smart-contracts\\contracts\\EncryptedFileFactory.sol", "ast": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/EncryptedFileFactory.sol", "exportedSymbols": { "EncryptedFileFactory": [ - 153 + 189 ] }, - "id": 154, + "id": 190, "nodeType": "SourceUnit", "nodes": [ { @@ -272,23 +289,14 @@ "nodeType": "PragmaDirective", "src": "0:24:0" }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "26:33:0" - }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 3, + "id": 2, "nodeType": "ImportDirective", - "scope": 154, - "sourceUnit": 357, - "src": "63:23:0", + "scope": 190, + "sourceUnit": 402, + "src": "28:23:0", "symbolAliases": [], "unitAlias": "" }, @@ -298,112 +306,42 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 4, + "id": 3, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, - "src": "123:7:0", + "referencedDeclaration": 401, + "src": "88:7:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", + "typeIdentifier": "t_contract$_Ownable_$401", "typeString": "contract Ownable" } }, - "id": 5, + "id": 4, "nodeType": "InheritanceSpecifier", - "src": "123:7:0" + "src": "88:7:0" } ], "contractDependencies": [ - 356 + 401 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 153, + "id": 189, "linearizedBaseContracts": [ - 153, - 356 + 189, + 401 ], "name": "EncryptedFileFactory", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 10, - "name": "HashMethods", - "nodeType": "VariableDeclaration", - "scope": 153, - "src": "140:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "140:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 7, - "length": null, - "nodeType": "ArrayTypeName", - "src": "140:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "5348412d353132", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "171:9:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f678e6327084e27d9384978fc799f490d004305e1d90bfaa06136eb93a82a286", - "typeString": "literal_string \"SHA-512\"" - }, - "value": "SHA-512" - } - ], - "id": 9, - "isConstant": false, - "isInlineArray": true, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "170:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$1_memory_ptr", - "typeString": "string memory[1] memory" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 15, + "id": 9, "name": "EncryptionMethods", "nodeType": "VariableDeclaration", - "scope": 153, - "src": "189:43:0", + "scope": 189, + "src": "105:43:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -412,19 +350,19 @@ }, "typeName": { "baseType": { - "id": 11, + "id": 5, "name": "string", "nodeType": "ElementaryTypeName", - "src": "189:6:0", + "src": "105:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, - "id": 12, + "id": 6, "length": null, "nodeType": "ArrayTypeName", - "src": "189:8:0", + "src": "105:8:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", "typeString": "string[]" @@ -436,14 +374,14 @@ { "argumentTypes": null, "hexValue": "414553", - "id": 13, + "id": 7, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "226:5:0", + "src": "142:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_64eca5b9b6f0ad147ca29254347c9e0ba57061217d553bc6974f8b8c77ddc502", @@ -452,14 +390,14 @@ "value": "AES" } ], - "id": 14, + "id": 8, "isConstant": false, "isInlineArray": true, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "225:7:0", + "src": "141:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_memory_$1_memory_ptr", "typeString": "string memory[1] memory" @@ -468,30 +406,30 @@ "visibility": "public" }, { - "canonicalName": "EncryptedFileFactory.EncryptedFile", - "id": 28, + "canonicalName": "EncryptedFileFactory.Multihash", + "id": 16, "members": [ { "constant": false, - "id": 17, - "name": "filePath", + "id": 11, + "name": "digest", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "273:15:0", + "scope": 16, + "src": "185:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 16, - "name": "string", + "id": 10, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "273:6:0", + "src": "185:7:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "value": null, @@ -499,25 +437,25 @@ }, { "constant": false, - "id": 19, - "name": "dataHash", + "id": 13, + "name": "hashFunction", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "299:15:0", + "scope": 16, + "src": "210:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 18, - "name": "string", + "id": 12, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "299:6:0", + "src": "210:5:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, "value": null, @@ -525,25 +463,64 @@ }, { "constant": false, - "id": 21, - "name": "hashMethod", + "id": 15, + "name": "size", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "325:15:0", + "scope": 16, + "src": "239:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 20, - "name": "uint", + "id": 14, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "325:4:0", + "src": "239:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Multihash", + "nodeType": "StructDefinition", + "scope": 189, + "src": "157:100:0", + "visibility": "public" + }, + { + "canonicalName": "EncryptedFileFactory.EncryptedFile", + "id": 29, + "members": [ + { + "constant": false, + "id": 18, + "name": "filePath", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "297:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + }, + "typeName": { + "contractScope": null, + "id": 17, + "name": "Multihash", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16, + "src": "297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" } }, "value": null, @@ -551,11 +528,39 @@ }, { "constant": false, - "id": 23, + "id": 20, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "326:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + }, + "typeName": { + "contractScope": null, + "id": 19, + "name": "Multihash", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16, + "src": "326:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22, "name": "encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "351:21:0", + "scope": 29, + "src": "355:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -563,10 +568,10 @@ "typeString": "uint256" }, "typeName": { - "id": 22, + "id": 21, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "351:4:0", + "src": "355:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -577,43 +582,70 @@ }, { "constant": false, - "id": 27, + "id": 28, "name": "keys", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "383:29:0", + "scope": 29, + "src": "387:33:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4])" }, "typeName": { - "id": 26, + "id": 27, "keyType": { - "id": 24, + "id": 23, "name": "address", "nodeType": "ElementaryTypeName", - "src": "391:7:0", + "src": "395:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "383:24:0", + "src": "387:28:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4])" }, "valueType": { - "id": 25, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "400:6:0", + "baseType": { + "id": 24, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "404:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 26, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 25, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "412:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "404:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } } }, @@ -623,42 +655,42 @@ ], "name": "EncryptedFile", "nodeType": "StructDefinition", - "scope": 153, - "src": "241:179:0", + "scope": 189, + "src": "265:163:0", "visibility": "public" }, { "constant": false, - "id": 31, + "id": 32, "name": "encryptedFiles", "nodeType": "VariableDeclaration", - "scope": 153, - "src": "428:37:0", + "scope": 189, + "src": "436:37:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 29, + "id": 30, "name": "EncryptedFile", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 28, - "src": "428:13:0", + "referencedDeclaration": 29, + "src": "436:13:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" } }, - "id": 30, + "id": 31, "length": null, "nodeType": "ArrayTypeName", - "src": "428:15:0", + "src": "436:15:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile[]" } }, @@ -668,21 +700,21 @@ { "anonymous": false, "documentation": null, - "id": 37, + "id": 38, "name": "Created", "nodeType": "EventDefinition", "parameters": { - "id": 36, + "id": 37, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 33, + "id": 34, "indexed": true, "name": "by", "nodeType": "VariableDeclaration", - "scope": 37, - "src": "488:18:0", + "scope": 38, + "src": "496:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -690,10 +722,10 @@ "typeString": "address" }, "typeName": { - "id": 32, + "id": 33, "name": "address", "nodeType": "ElementaryTypeName", - "src": "488:7:0", + "src": "496:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -704,12 +736,12 @@ }, { "constant": false, - "id": 35, + "id": 36, "indexed": true, "name": "encryptedFile", "nodeType": "VariableDeclaration", - "scope": 37, - "src": "508:26:0", + "scope": 38, + "src": "516:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -717,10 +749,10 @@ "typeString": "uint256" }, "typeName": { - "id": 34, + "id": 35, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "508:4:0", + "src": "516:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -730,28 +762,28 @@ "visibility": "internal" } ], - "src": "487:48:0" + "src": "495:48:0" }, - "src": "474:62:0" + "src": "482:62:0" }, { "anonymous": false, "documentation": null, - "id": 45, + "id": 46, "name": "GivenAccess", "nodeType": "EventDefinition", "parameters": { - "id": 44, + "id": 45, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 39, + "id": 40, "indexed": true, "name": "by", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "560:18:0", + "scope": 46, + "src": "568:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -759,10 +791,10 @@ "typeString": "address" }, "typeName": { - "id": 38, + "id": 39, "name": "address", "nodeType": "ElementaryTypeName", - "src": "560:7:0", + "src": "568:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -773,12 +805,12 @@ }, { "constant": false, - "id": 41, + "id": 42, "indexed": true, "name": "to", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "580:18:0", + "scope": 46, + "src": "588:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -786,10 +818,10 @@ "typeString": "address" }, "typeName": { - "id": 40, + "id": 41, "name": "address", "nodeType": "ElementaryTypeName", - "src": "580:7:0", + "src": "588:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -800,12 +832,12 @@ }, { "constant": false, - "id": 43, + "id": 44, "indexed": true, "name": "encryptedFile", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "600:26:0", + "scope": 46, + "src": "608:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -813,10 +845,10 @@ "typeString": "uint256" }, "typeName": { - "id": 42, + "id": 43, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "600:4:0", + "src": "608:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -826,32 +858,32 @@ "visibility": "internal" } ], - "src": "559:68:0" + "src": "567:68:0" }, - "src": "542:86:0" + "src": "550:86:0" }, { "body": { - "id": 122, + "id": 156, "nodeType": "Block", - "src": "890:509:0", + "src": "1031:828:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 78, + "id": 94, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 68, + "id": 77, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "903:5:0", + "referencedDeclaration": 75, + "src": "1044:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -867,51 +899,160 @@ "arguments": [ { "argumentTypes": null, - "id": 72, - "name": "_filePath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "970:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 73, - "name": "_dataHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1004:9:0", + "arguments": [ + { + "argumentTypes": null, + "id": 82, + "name": "_filePath_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58, + "src": "1148:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 83, + "name": "_filePath_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "1197:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 84, + "name": "_filePath_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1244:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": null, + "id": 81, + "name": "Multihash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1111:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Multihash_$16_storage_ptr_$", + "typeString": "type(struct EncryptedFileFactory.Multihash storage pointer)" + } + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "digest", + "hashFunction", + "size" + ], + "nodeType": "FunctionCall", + "src": "1111:163:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_struct$_Multihash_$16_memory", + "typeString": "struct EncryptedFileFactory.Multihash memory" } }, { "argumentTypes": null, - "id": 74, - "name": "_hashMethod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1040:11:0", + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_dataHash_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64, + "src": "1336:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 88, + "name": "_dataHash_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "1385:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 89, + "name": "_dataHash_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1432:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": null, + "id": 86, + "name": "Multihash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1299:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Multihash_$16_storage_ptr_$", + "typeString": "type(struct EncryptedFileFactory.Multihash storage pointer)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "digest", + "hashFunction", + "size" + ], + "nodeType": "FunctionCall", + "src": "1299:163:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Multihash_$16_memory", + "typeString": "struct EncryptedFileFactory.Multihash memory" } }, { "argumentTypes": null, - "id": 75, + "id": 91, "name": "_encriptionMethod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "1084:17:0", + "referencedDeclaration": 70, + "src": "1495:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -920,18 +1061,18 @@ ], "expression": { "argumentTypes": null, - "id": 71, + "id": 80, "name": "EncryptedFile", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "931:13:0", + "referencedDeclaration": 29, + "src": "1072:13:0", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_EncryptedFile_$28_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_EncryptedFile_$29_storage_ptr_$", "typeString": "type(struct EncryptedFileFactory.EncryptedFile storage pointer)" } }, - "id": 76, + "id": 92, "isConstant": false, "isLValue": false, "isPure": false, @@ -940,13 +1081,12 @@ "names": [ "filePath", "dataHash", - "hashMethod", "encriptionMethod" ], "nodeType": "FunctionCall", - "src": "931:182:0", + "src": "1072:452:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_memory", + "typeIdentifier": "t_struct$_EncryptedFile_$29_memory", "typeString": "struct EncryptedFileFactory.EncryptedFile memory" } } @@ -954,24 +1094,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_EncryptedFile_$28_memory", + "typeIdentifier": "t_struct$_EncryptedFile_$29_memory", "typeString": "struct EncryptedFileFactory.EncryptedFile memory" } ], "expression": { "argumentTypes": null, - "id": 69, + "id": 78, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "911:14:0", + "referencedDeclaration": 32, + "src": "1052:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 70, + "id": 79, "isConstant": false, "isLValue": false, "isPure": false, @@ -979,13 +1119,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "911:19:0", + "src": "1052:19:0", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_EncryptedFile_$28_storage_$returns$_t_uint256_$", + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_EncryptedFile_$29_storage_$returns$_t_uint256_$", "typeString": "function (struct EncryptedFileFactory.EncryptedFile storage ref) returns (uint256)" } }, - "id": 77, + "id": 93, "isConstant": false, "isLValue": false, "isPure": false, @@ -993,26 +1133,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "911:203:0", + "src": "1052:473:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "903:211:0", + "src": "1044:481:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 79, + "id": 95, "nodeType": "ExpressionStatement", - "src": "903:211:0" + "src": "1044:481:0" }, { "expression": { "argumentTypes": null, - "id": 81, + "id": 97, "isConstant": false, "isLValue": false, "isPure": false, @@ -1020,15 +1160,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "1125:8:0", + "src": "1536:8:0", "subExpression": { "argumentTypes": null, - "id": 80, + "id": 96, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1125:5:0", + "referencedDeclaration": 75, + "src": "1536:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1039,37 +1179,37 @@ "typeString": "uint256" } }, - "id": 82, + "id": 98, "nodeType": "ExpressionStatement", - "src": "1125:8:0" + "src": "1536:8:0" }, { "assignments": [ - 84 + 100 ], "declarations": [ { "constant": false, - "id": 84, + "id": 100, "name": "_encryptedFile", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "1144:36:0", + "scope": 157, + "src": "1555:36:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" }, "typeName": { "contractScope": null, - "id": 83, + "id": 99, "name": "EncryptedFile", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 28, - "src": "1144:13:0", + "referencedDeclaration": 29, + "src": "1555:13:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" } }, @@ -1077,31 +1217,31 @@ "visibility": "internal" } ], - "id": 88, + "id": 104, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 85, + "id": 101, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "1183:14:0", + "referencedDeclaration": 32, + "src": "1594:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 87, + "id": 103, "indexExpression": { "argumentTypes": null, - "id": 86, + "id": 102, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1198:1:0", + "referencedDeclaration": 106, + "src": "1609:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1112,25 +1252,25 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1183:17:0", + "src": "1594:17:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "1144:56:0" + "src": "1555:56:0" }, { "body": { - "id": 120, + "id": 154, "nodeType": "Block", - "src": "1261:131:0", + "src": "1678:174:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 110, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -1141,56 +1281,56 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 100, + "id": 116, "name": "_encryptedFile", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "1276:14:0", + "referencedDeclaration": 100, + "src": "1693:14:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile storage pointer" } }, - "id": 105, + "id": 121, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "keys", "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "1276:19:0", + "referencedDeclaration": 28, + "src": "1693:19:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string storage ref)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4] storage ref)" } }, - "id": 106, + "id": 122, "indexExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 102, + "id": 118, "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1296:11:0", + "referencedDeclaration": 51, + "src": "1713:11:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 104, + "id": 120, "indexExpression": { "argumentTypes": null, - "id": 103, + "id": 119, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1308:1:0", + "referencedDeclaration": 106, + "src": "1725:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1201,7 +1341,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1296:14:0", + "src": "1713:14:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1212,63 +1352,328 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1276:35:0", + "src": "1693:35:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 107, - "name": "_keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1314:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 109, - "indexExpression": { - "argumentTypes": null, - "id": 108, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1320:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "components": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1732:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1738:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 127, + "indexExpression": { + "argumentTypes": null, + "id": 126, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1741:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1732:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 128, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1745:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 130, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1751:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "id": 131, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 133, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1757:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 135, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1763:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1757:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 137, + "indexExpression": { + "argumentTypes": null, + "id": 136, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1766:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1757:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 138, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1770:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 140, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1776:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1770:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 142, + "indexExpression": { + "argumentTypes": null, + "id": 141, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1779:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1770:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } } - }, + ], + "id": 143, "isConstant": false, - "isLValue": true, + "isInlineArray": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1314:8:0", + "nodeType": "TupleExpression", + "src": "1731:51:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4] memory" } }, - "src": "1276:46:0", + "src": "1693:89:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, - "id": 111, + "id": 145, "nodeType": "ExpressionStatement", - "src": "1276:46:0" + "src": "1693:89:0" }, { "eventCall": { @@ -1276,12 +1681,12 @@ "arguments": [ { "argumentTypes": null, - "id": 113, + "id": 147, "name": "_by", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "1354:3:0", + "referencedDeclaration": 48, + "src": "1814:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1291,26 +1696,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 114, + "id": 148, "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1359:11:0", + "referencedDeclaration": 51, + "src": "1819:11:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 116, + "id": 150, "indexExpression": { "argumentTypes": null, - "id": 115, + "id": 149, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1371:1:0", + "referencedDeclaration": 106, + "src": "1831:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1321,7 +1726,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1359:14:0", + "src": "1819:14:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1329,12 +1734,12 @@ }, { "argumentTypes": null, - "id": 117, + "id": 151, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1374:5:0", + "referencedDeclaration": 75, + "src": "1834:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1356,18 +1761,18 @@ "typeString": "uint256" } ], - "id": 112, + "id": 146, "name": "GivenAccess", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "1342:11:0", + "referencedDeclaration": 46, + "src": "1802:11:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 118, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -1375,15 +1780,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1342:38:0", + "src": "1802:38:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 119, + "id": 153, "nodeType": "EmitStatement", - "src": "1337:43:0" + "src": "1797:43:0" } ] }, @@ -1393,19 +1798,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 96, + "id": 112, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 93, + "id": 109, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1238:1:0", + "referencedDeclaration": 106, + "src": "1649:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1417,18 +1822,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 94, - "name": "_keys", + "id": 110, + "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1242:5:0", + "referencedDeclaration": 51, + "src": "1653:11:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 95, + "id": 111, "isConstant": false, "isLValue": false, "isPure": false, @@ -1436,31 +1841,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1242:12:0", + "src": "1653:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1238:16:0", + "src": "1649:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 121, + "id": 155, "initializationExpression": { "assignments": [ - 90 + 106 ], "declarations": [ { "constant": false, - "id": 90, + "id": 106, "name": "i", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "1226:6:0", + "scope": 157, + "src": "1637:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1468,10 +1873,10 @@ "typeString": "uint256" }, "typeName": { - "id": 89, + "id": 105, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1226:4:0", + "src": "1637:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1481,18 +1886,18 @@ "visibility": "internal" } ], - "id": 92, + "id": 108, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 91, + "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1235:1:0", + "src": "1646:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1501,12 +1906,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "1226:10:0" + "src": "1637:10:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 98, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -1514,15 +1919,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "1256:3:0", + "src": "1673:3:0", "subExpression": { "argumentTypes": null, - "id": 97, + "id": 113, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1256:1:0", + "referencedDeclaration": 106, + "src": "1673:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1533,54 +1938,54 @@ "typeString": "uint256" } }, - "id": 99, + "id": 115, "nodeType": "ExpressionStatement", - "src": "1256:3:0" + "src": "1673:3:0" }, "nodeType": "ForStatement", - "src": "1221:171:0" + "src": "1632:220:0" } ] }, "documentation": null, - "id": 123, + "id": 157, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 64, + "id": 73, "modifierName": { "argumentTypes": null, - "id": 63, + "id": 72, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "859:9:0", + "referencedDeclaration": 349, + "src": "1000:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "859:9:0" + "src": "1000:9:0" } ], "name": "create", "nodeType": "FunctionDefinition", "parameters": { - "id": 62, + "id": 71, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 47, + "id": 48, "name": "_by", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "662:11:0", + "scope": 157, + "src": "670:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1588,10 +1993,10 @@ "typeString": "address" }, "typeName": { - "id": 46, + "id": 47, "name": "address", "nodeType": "ElementaryTypeName", - "src": "662:7:0", + "src": "670:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1602,11 +2007,11 @@ }, { "constant": false, - "id": 50, + "id": 51, "name": "_keysOwners", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "684:21:0", + "scope": 157, + "src": "692:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1615,19 +2020,19 @@ }, "typeName": { "baseType": { - "id": 48, + "id": 49, "name": "address", "nodeType": "ElementaryTypeName", - "src": "684:7:0", + "src": "692:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 49, + "id": 50, "length": null, "nodeType": "ArrayTypeName", - "src": "684:9:0", + "src": "692:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -1638,35 +2043,62 @@ }, { "constant": false, - "id": 53, + "id": 56, "name": "_keys", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "716:14:0", + "scope": 157, + "src": "724:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4][]" }, "typeName": { "baseType": { - "id": 51, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "716:6:0", + "baseType": { + "id": 52, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "724:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 54, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "732:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "724:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } }, - "id": 52, + "id": 55, "length": null, "nodeType": "ArrayTypeName", - "src": "716:8:0", + "src": "724:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_storage_$dyn_storage_ptr", + "typeString": "bytes32[4][]" } }, "value": null, @@ -1674,25 +2106,25 @@ }, { "constant": false, - "id": 55, - "name": "_filePath", + "id": 58, + "name": "_filePath_digest", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "741:16:0", + "scope": 157, + "src": "753:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 54, - "name": "string", + "id": 57, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "741:6:0", + "src": "753:7:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "value": null, @@ -1700,25 +2132,25 @@ }, { "constant": false, - "id": 57, - "name": "_dataHash", + "id": 60, + "name": "_filePath_hashFunction", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "768:16:0", + "scope": 157, + "src": "788:28:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 56, - "name": "string", + "id": 59, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "768:6:0", + "src": "788:5:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, "value": null, @@ -1726,25 +2158,51 @@ }, { "constant": false, - "id": 59, - "name": "_hashMethod", + "id": 62, + "name": "_filePath_size", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "795:16:0", + "scope": 157, + "src": "827:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 58, - "name": "uint", + "id": 61, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "795:4:0", + "src": "827:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 64, + "name": "_dataHash_digest", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "858:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 63, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "value": null, @@ -1752,11 +2210,63 @@ }, { "constant": false, - "id": 61, + "id": 66, + "name": "_dataHash_hashFunction", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "893:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 65, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "893:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 68, + "name": "_dataHash_size", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "932:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 67, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "932:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 70, "name": "_encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "822:22:0", + "scope": 157, + "src": "963:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1764,10 +2274,10 @@ "typeString": "uint256" }, "typeName": { - "id": 60, + "id": 69, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "822:4:0", + "src": "963:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1777,20 +2287,20 @@ "visibility": "internal" } ], - "src": "651:200:0" + "src": "659:333:0" }, "payable": false, "returnParameters": { - "id": 67, + "id": 76, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 66, + "id": 75, "name": "index", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "878:10:0", + "scope": 157, + "src": "1019:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1798,10 +2308,10 @@ "typeString": "uint256" }, "typeName": { - "id": 65, + "id": 74, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "878:4:0", + "src": "1019:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1811,24 +2321,24 @@ "visibility": "internal" } ], - "src": "877:12:0" + "src": "1018:12:0" }, - "scope": 153, - "src": "636:763:0", + "scope": 189, + "src": "644:1215:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 151, + "id": 187, "nodeType": "Block", - "src": "1496:103:0", + "src": "1960:103:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 143, + "id": 179, "isConstant": false, "isLValue": false, "isPure": false, @@ -1841,26 +2351,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 136, + "id": 172, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "1507:14:0", + "referencedDeclaration": 32, + "src": "1971:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 138, + "id": 174, "indexExpression": { "argumentTypes": null, - "id": 137, + "id": 173, "name": "_index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "1522:6:0", + "referencedDeclaration": 159, + "src": "1986:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1871,35 +2381,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1507:22:0", + "src": "1971:22:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref" } }, - "id": 139, + "id": 175, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "keys", "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "1507:27:0", + "referencedDeclaration": 28, + "src": "1971:27:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string storage ref)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4] storage ref)" } }, - "id": 141, + "id": 177, "indexExpression": { "argumentTypes": null, - "id": 140, + "id": 176, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "1535:3:0", + "referencedDeclaration": 161, + "src": "1999:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1910,36 +2420,36 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1507:32:0", + "src": "1971:32:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 142, + "id": 178, "name": "_key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "1542:4:0", + "referencedDeclaration": 167, + "src": "2006:4:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4] memory" } }, - "src": "1507:39:0", + "src": "1971:39:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, - "id": 144, + "id": 180, "nodeType": "ExpressionStatement", - "src": "1507:39:0" + "src": "1971:39:0" }, { "eventCall": { @@ -1947,12 +2457,12 @@ "arguments": [ { "argumentTypes": null, - "id": 146, + "id": 182, "name": "_by", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 129, - "src": "1574:3:0", + "referencedDeclaration": 163, + "src": "2038:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1960,12 +2470,12 @@ }, { "argumentTypes": null, - "id": 147, + "id": 183, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "1579:3:0", + "referencedDeclaration": 161, + "src": "2043:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1973,12 +2483,12 @@ }, { "argumentTypes": null, - "id": 148, + "id": 184, "name": "_index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "1584:6:0", + "referencedDeclaration": 159, + "src": "2048:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2000,18 +2510,18 @@ "typeString": "uint256" } ], - "id": 145, + "id": 181, "name": "GivenAccess", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "1562:11:0", + "referencedDeclaration": 46, + "src": "2026:11:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 149, + "id": 185, "isConstant": false, "isLValue": false, "isPure": false, @@ -2019,57 +2529,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1562:29:0", + "src": "2026:29:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 150, + "id": 186, "nodeType": "EmitStatement", - "src": "1557:34:0" + "src": "2021:34:0" } ] }, "documentation": null, - "id": 152, + "id": 188, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 134, + "id": 170, "modifierName": { "argumentTypes": null, - "id": 133, + "id": 169, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "1486:9:0", + "referencedDeclaration": 349, + "src": "1950:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "1486:9:0" + "src": "1950:9:0" } ], "name": "giveAccess", "nodeType": "FunctionDefinition", "parameters": { - "id": 132, + "id": 168, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 125, + "id": 159, "name": "_index", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1427:11:0", + "scope": 188, + "src": "1887:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2077,10 +2587,10 @@ "typeString": "uint256" }, "typeName": { - "id": 124, + "id": 158, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1427:4:0", + "src": "1887:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2091,11 +2601,11 @@ }, { "constant": false, - "id": 127, + "id": 161, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1440:11:0", + "scope": 188, + "src": "1900:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2103,10 +2613,10 @@ "typeString": "address" }, "typeName": { - "id": 126, + "id": 160, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1440:7:0", + "src": "1900:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2117,11 +2627,11 @@ }, { "constant": false, - "id": 129, + "id": 163, "name": "_by", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1453:11:0", + "scope": 188, + "src": "1913:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2129,10 +2639,10 @@ "typeString": "address" }, "typeName": { - "id": 128, + "id": 162, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1453:7:0", + "src": "1913:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2143,61 +2653,88 @@ }, { "constant": false, - "id": 131, + "id": 167, "name": "_key", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1466:11:0", + "scope": 188, + "src": "1926:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4]" }, "typeName": { - "id": 130, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1466:6:0", + "baseType": { + "id": 164, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 166, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "1926:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } }, "value": null, "visibility": "internal" } ], - "src": "1426:52:0" + "src": "1886:56:0" }, "payable": false, "returnParameters": { - "id": 135, + "id": 171, "nodeType": "ParameterList", "parameters": [], - "src": "1496:0:0" + "src": "1960:0:0" }, - "scope": 153, - "src": "1407:192:0", + "scope": 189, + "src": "1867:196:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 154, - "src": "90:1514:0" + "scope": 190, + "src": "55:2013:0" } ], - "src": "0:1606:0" + "src": "0:2070:0" }, "legacyAST": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/EncryptedFileFactory.sol", "exportedSymbols": { "EncryptedFileFactory": [ - 153 + 189 ] }, - "id": 154, + "id": 190, "nodeType": "SourceUnit", "nodes": [ { @@ -2211,138 +2748,59 @@ "nodeType": "PragmaDirective", "src": "0:24:0" }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "26:33:0" - }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 3, + "id": 2, "nodeType": "ImportDirective", - "scope": 154, - "sourceUnit": 357, - "src": "63:23:0", + "scope": 190, + "sourceUnit": 402, + "src": "28:23:0", "symbolAliases": [], "unitAlias": "" }, { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, - "src": "123:7:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", - "typeString": "contract Ownable" - } - }, - "id": 5, - "nodeType": "InheritanceSpecifier", - "src": "123:7:0" - } - ], - "contractDependencies": [ - 356 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 153, - "linearizedBaseContracts": [ - 153, - 356 - ], - "name": "EncryptedFileFactory", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 10, - "name": "HashMethods", - "nodeType": "VariableDeclaration", - "scope": 153, - "src": "140:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "140:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 7, - "length": null, - "nodeType": "ArrayTypeName", - "src": "140:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "5348412d353132", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "171:9:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f678e6327084e27d9384978fc799f490d004305e1d90bfaa06136eb93a82a286", - "typeString": "literal_string \"SHA-512\"" - }, - "value": "SHA-512" - } - ], - "id": 9, - "isConstant": false, - "isInlineArray": true, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "170:11:0", + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 401, + "src": "88:7:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$1_memory_ptr", - "typeString": "string memory[1] memory" + "typeIdentifier": "t_contract$_Ownable_$401", + "typeString": "contract Ownable" } }, - "visibility": "public" - }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "88:7:0" + } + ], + "contractDependencies": [ + 401 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 189, + "linearizedBaseContracts": [ + 189, + 401 + ], + "name": "EncryptedFileFactory", + "nodeType": "ContractDefinition", + "nodes": [ { "constant": false, - "id": 15, + "id": 9, "name": "EncryptionMethods", "nodeType": "VariableDeclaration", - "scope": 153, - "src": "189:43:0", + "scope": 189, + "src": "105:43:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2351,19 +2809,19 @@ }, "typeName": { "baseType": { - "id": 11, + "id": 5, "name": "string", "nodeType": "ElementaryTypeName", - "src": "189:6:0", + "src": "105:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, - "id": 12, + "id": 6, "length": null, "nodeType": "ArrayTypeName", - "src": "189:8:0", + "src": "105:8:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", "typeString": "string[]" @@ -2375,14 +2833,14 @@ { "argumentTypes": null, "hexValue": "414553", - "id": 13, + "id": 7, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "226:5:0", + "src": "142:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_64eca5b9b6f0ad147ca29254347c9e0ba57061217d553bc6974f8b8c77ddc502", @@ -2391,14 +2849,14 @@ "value": "AES" } ], - "id": 14, + "id": 8, "isConstant": false, "isInlineArray": true, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "225:7:0", + "src": "141:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_memory_$1_memory_ptr", "typeString": "string memory[1] memory" @@ -2407,30 +2865,30 @@ "visibility": "public" }, { - "canonicalName": "EncryptedFileFactory.EncryptedFile", - "id": 28, + "canonicalName": "EncryptedFileFactory.Multihash", + "id": 16, "members": [ { "constant": false, - "id": 17, - "name": "filePath", + "id": 11, + "name": "digest", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "273:15:0", + "scope": 16, + "src": "185:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 16, - "name": "string", + "id": 10, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "273:6:0", + "src": "185:7:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "value": null, @@ -2438,25 +2896,25 @@ }, { "constant": false, - "id": 19, - "name": "dataHash", + "id": 13, + "name": "hashFunction", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "299:15:0", + "scope": 16, + "src": "210:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 18, - "name": "string", + "id": 12, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "299:6:0", + "src": "210:5:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, "value": null, @@ -2464,25 +2922,92 @@ }, { "constant": false, - "id": 21, - "name": "hashMethod", + "id": 15, + "name": "size", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "325:15:0", + "scope": 16, + "src": "239:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 20, - "name": "uint", + "id": 14, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "325:4:0", + "src": "239:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Multihash", + "nodeType": "StructDefinition", + "scope": 189, + "src": "157:100:0", + "visibility": "public" + }, + { + "canonicalName": "EncryptedFileFactory.EncryptedFile", + "id": 29, + "members": [ + { + "constant": false, + "id": 18, + "name": "filePath", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "297:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + }, + "typeName": { + "contractScope": null, + "id": 17, + "name": "Multihash", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16, + "src": "297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "326:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" + }, + "typeName": { + "contractScope": null, + "id": 19, + "name": "Multihash", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16, + "src": "326:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Multihash_$16_storage_ptr", + "typeString": "struct EncryptedFileFactory.Multihash" } }, "value": null, @@ -2490,11 +3015,11 @@ }, { "constant": false, - "id": 23, + "id": 22, "name": "encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "351:21:0", + "scope": 29, + "src": "355:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2502,10 +3027,10 @@ "typeString": "uint256" }, "typeName": { - "id": 22, + "id": 21, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "351:4:0", + "src": "355:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2516,43 +3041,70 @@ }, { "constant": false, - "id": 27, + "id": 28, "name": "keys", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "383:29:0", + "scope": 29, + "src": "387:33:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4])" }, "typeName": { - "id": 26, + "id": 27, "keyType": { - "id": 24, + "id": 23, "name": "address", "nodeType": "ElementaryTypeName", - "src": "391:7:0", + "src": "395:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "383:24:0", + "src": "387:28:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4])" }, "valueType": { - "id": 25, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "400:6:0", + "baseType": { + "id": 24, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "404:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 26, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 25, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "412:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "404:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } } }, @@ -2562,42 +3114,42 @@ ], "name": "EncryptedFile", "nodeType": "StructDefinition", - "scope": 153, - "src": "241:179:0", + "scope": 189, + "src": "265:163:0", "visibility": "public" }, { "constant": false, - "id": 31, + "id": 32, "name": "encryptedFiles", "nodeType": "VariableDeclaration", - "scope": 153, - "src": "428:37:0", + "scope": 189, + "src": "436:37:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 29, + "id": 30, "name": "EncryptedFile", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 28, - "src": "428:13:0", + "referencedDeclaration": 29, + "src": "436:13:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" } }, - "id": 30, + "id": 31, "length": null, "nodeType": "ArrayTypeName", - "src": "428:15:0", + "src": "436:15:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile[]" } }, @@ -2607,21 +3159,21 @@ { "anonymous": false, "documentation": null, - "id": 37, + "id": 38, "name": "Created", "nodeType": "EventDefinition", "parameters": { - "id": 36, + "id": 37, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 33, + "id": 34, "indexed": true, "name": "by", "nodeType": "VariableDeclaration", - "scope": 37, - "src": "488:18:0", + "scope": 38, + "src": "496:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2629,10 +3181,10 @@ "typeString": "address" }, "typeName": { - "id": 32, + "id": 33, "name": "address", "nodeType": "ElementaryTypeName", - "src": "488:7:0", + "src": "496:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2643,12 +3195,12 @@ }, { "constant": false, - "id": 35, + "id": 36, "indexed": true, "name": "encryptedFile", "nodeType": "VariableDeclaration", - "scope": 37, - "src": "508:26:0", + "scope": 38, + "src": "516:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2656,10 +3208,10 @@ "typeString": "uint256" }, "typeName": { - "id": 34, + "id": 35, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "508:4:0", + "src": "516:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2669,28 +3221,28 @@ "visibility": "internal" } ], - "src": "487:48:0" + "src": "495:48:0" }, - "src": "474:62:0" + "src": "482:62:0" }, { "anonymous": false, "documentation": null, - "id": 45, + "id": 46, "name": "GivenAccess", "nodeType": "EventDefinition", "parameters": { - "id": 44, + "id": 45, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 39, + "id": 40, "indexed": true, "name": "by", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "560:18:0", + "scope": 46, + "src": "568:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2698,10 +3250,10 @@ "typeString": "address" }, "typeName": { - "id": 38, + "id": 39, "name": "address", "nodeType": "ElementaryTypeName", - "src": "560:7:0", + "src": "568:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2712,12 +3264,12 @@ }, { "constant": false, - "id": 41, + "id": 42, "indexed": true, "name": "to", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "580:18:0", + "scope": 46, + "src": "588:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2725,10 +3277,10 @@ "typeString": "address" }, "typeName": { - "id": 40, + "id": 41, "name": "address", "nodeType": "ElementaryTypeName", - "src": "580:7:0", + "src": "588:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2739,12 +3291,12 @@ }, { "constant": false, - "id": 43, + "id": 44, "indexed": true, "name": "encryptedFile", "nodeType": "VariableDeclaration", - "scope": 45, - "src": "600:26:0", + "scope": 46, + "src": "608:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2752,10 +3304,10 @@ "typeString": "uint256" }, "typeName": { - "id": 42, + "id": 43, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "600:4:0", + "src": "608:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2765,32 +3317,32 @@ "visibility": "internal" } ], - "src": "559:68:0" + "src": "567:68:0" }, - "src": "542:86:0" + "src": "550:86:0" }, { "body": { - "id": 122, + "id": 156, "nodeType": "Block", - "src": "890:509:0", + "src": "1031:828:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 78, + "id": 94, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 68, + "id": 77, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "903:5:0", + "referencedDeclaration": 75, + "src": "1044:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2806,51 +3358,160 @@ "arguments": [ { "argumentTypes": null, - "id": 72, - "name": "_filePath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "970:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 73, - "name": "_dataHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1004:9:0", + "arguments": [ + { + "argumentTypes": null, + "id": 82, + "name": "_filePath_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58, + "src": "1148:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 83, + "name": "_filePath_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "1197:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 84, + "name": "_filePath_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1244:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": null, + "id": 81, + "name": "Multihash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1111:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Multihash_$16_storage_ptr_$", + "typeString": "type(struct EncryptedFileFactory.Multihash storage pointer)" + } + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "digest", + "hashFunction", + "size" + ], + "nodeType": "FunctionCall", + "src": "1111:163:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_struct$_Multihash_$16_memory", + "typeString": "struct EncryptedFileFactory.Multihash memory" } }, { "argumentTypes": null, - "id": 74, - "name": "_hashMethod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1040:11:0", + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_dataHash_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64, + "src": "1336:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 88, + "name": "_dataHash_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "1385:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 89, + "name": "_dataHash_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1432:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": null, + "id": 86, + "name": "Multihash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1299:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Multihash_$16_storage_ptr_$", + "typeString": "type(struct EncryptedFileFactory.Multihash storage pointer)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "digest", + "hashFunction", + "size" + ], + "nodeType": "FunctionCall", + "src": "1299:163:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Multihash_$16_memory", + "typeString": "struct EncryptedFileFactory.Multihash memory" } }, { "argumentTypes": null, - "id": 75, + "id": 91, "name": "_encriptionMethod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "1084:17:0", + "referencedDeclaration": 70, + "src": "1495:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2859,18 +3520,18 @@ ], "expression": { "argumentTypes": null, - "id": 71, + "id": 80, "name": "EncryptedFile", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "931:13:0", + "referencedDeclaration": 29, + "src": "1072:13:0", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_EncryptedFile_$28_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_EncryptedFile_$29_storage_ptr_$", "typeString": "type(struct EncryptedFileFactory.EncryptedFile storage pointer)" } }, - "id": 76, + "id": 92, "isConstant": false, "isLValue": false, "isPure": false, @@ -2879,13 +3540,12 @@ "names": [ "filePath", "dataHash", - "hashMethod", "encriptionMethod" ], "nodeType": "FunctionCall", - "src": "931:182:0", + "src": "1072:452:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_memory", + "typeIdentifier": "t_struct$_EncryptedFile_$29_memory", "typeString": "struct EncryptedFileFactory.EncryptedFile memory" } } @@ -2893,24 +3553,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_EncryptedFile_$28_memory", + "typeIdentifier": "t_struct$_EncryptedFile_$29_memory", "typeString": "struct EncryptedFileFactory.EncryptedFile memory" } ], "expression": { "argumentTypes": null, - "id": 69, + "id": 78, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "911:14:0", + "referencedDeclaration": 32, + "src": "1052:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 70, + "id": 79, "isConstant": false, "isLValue": false, "isPure": false, @@ -2918,13 +3578,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "911:19:0", + "src": "1052:19:0", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_EncryptedFile_$28_storage_$returns$_t_uint256_$", + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_EncryptedFile_$29_storage_$returns$_t_uint256_$", "typeString": "function (struct EncryptedFileFactory.EncryptedFile storage ref) returns (uint256)" } }, - "id": 77, + "id": 93, "isConstant": false, "isLValue": false, "isPure": false, @@ -2932,26 +3592,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "911:203:0", + "src": "1052:473:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "903:211:0", + "src": "1044:481:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 79, + "id": 95, "nodeType": "ExpressionStatement", - "src": "903:211:0" + "src": "1044:481:0" }, { "expression": { "argumentTypes": null, - "id": 81, + "id": 97, "isConstant": false, "isLValue": false, "isPure": false, @@ -2959,15 +3619,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "1125:8:0", + "src": "1536:8:0", "subExpression": { "argumentTypes": null, - "id": 80, + "id": 96, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1125:5:0", + "referencedDeclaration": 75, + "src": "1536:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2978,37 +3638,37 @@ "typeString": "uint256" } }, - "id": 82, + "id": 98, "nodeType": "ExpressionStatement", - "src": "1125:8:0" + "src": "1536:8:0" }, { "assignments": [ - 84 + 100 ], "declarations": [ { "constant": false, - "id": 84, + "id": 100, "name": "_encryptedFile", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "1144:36:0", + "scope": 157, + "src": "1555:36:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" }, "typeName": { "contractScope": null, - "id": 83, + "id": 99, "name": "EncryptedFile", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 28, - "src": "1144:13:0", + "referencedDeclaration": 29, + "src": "1555:13:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile" } }, @@ -3016,31 +3676,31 @@ "visibility": "internal" } ], - "id": 88, + "id": 104, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 85, + "id": 101, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "1183:14:0", + "referencedDeclaration": 32, + "src": "1594:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 87, + "id": 103, "indexExpression": { "argumentTypes": null, - "id": 86, + "id": 102, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1198:1:0", + "referencedDeclaration": 106, + "src": "1609:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3051,25 +3711,25 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1183:17:0", + "src": "1594:17:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "1144:56:0" + "src": "1555:56:0" }, { "body": { - "id": 120, + "id": 154, "nodeType": "Block", - "src": "1261:131:0", + "src": "1678:174:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 110, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -3080,56 +3740,56 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 100, + "id": 116, "name": "_encryptedFile", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "1276:14:0", + "referencedDeclaration": 100, + "src": "1693:14:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage_ptr", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage_ptr", "typeString": "struct EncryptedFileFactory.EncryptedFile storage pointer" } }, - "id": 105, + "id": 121, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "keys", "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "1276:19:0", + "referencedDeclaration": 28, + "src": "1693:19:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string storage ref)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4] storage ref)" } }, - "id": 106, + "id": 122, "indexExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 102, + "id": 118, "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1296:11:0", + "referencedDeclaration": 51, + "src": "1713:11:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 104, + "id": 120, "indexExpression": { "argumentTypes": null, - "id": 103, + "id": 119, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1308:1:0", + "referencedDeclaration": 106, + "src": "1725:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3140,7 +3800,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1296:14:0", + "src": "1713:14:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3151,63 +3811,328 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1276:35:0", + "src": "1693:35:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 107, - "name": "_keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1314:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 109, - "indexExpression": { - "argumentTypes": null, - "id": 108, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1320:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "components": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1732:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1738:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 127, + "indexExpression": { + "argumentTypes": null, + "id": 126, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1741:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1732:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 128, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1745:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 130, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1751:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "id": 131, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 133, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1757:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 135, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1763:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1757:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 137, + "indexExpression": { + "argumentTypes": null, + "id": 136, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1766:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1757:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 138, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "1770:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + "id": 140, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1776:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1770:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_memory", + "typeString": "bytes32[4] memory" + } + }, + "id": 142, + "indexExpression": { + "argumentTypes": null, + "id": 141, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1779:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1770:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } } - }, + ], + "id": 143, "isConstant": false, - "isLValue": true, + "isInlineArray": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1314:8:0", + "nodeType": "TupleExpression", + "src": "1731:51:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4] memory" } }, - "src": "1276:46:0", + "src": "1693:89:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, - "id": 111, + "id": 145, "nodeType": "ExpressionStatement", - "src": "1276:46:0" + "src": "1693:89:0" }, { "eventCall": { @@ -3215,12 +4140,12 @@ "arguments": [ { "argumentTypes": null, - "id": 113, + "id": 147, "name": "_by", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "1354:3:0", + "referencedDeclaration": 48, + "src": "1814:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3230,26 +4155,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 114, + "id": 148, "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1359:11:0", + "referencedDeclaration": 51, + "src": "1819:11:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 116, + "id": 150, "indexExpression": { "argumentTypes": null, - "id": 115, + "id": 149, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1371:1:0", + "referencedDeclaration": 106, + "src": "1831:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3260,7 +4185,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1359:14:0", + "src": "1819:14:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3268,12 +4193,12 @@ }, { "argumentTypes": null, - "id": 117, + "id": 151, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1374:5:0", + "referencedDeclaration": 75, + "src": "1834:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3295,18 +4220,18 @@ "typeString": "uint256" } ], - "id": 112, + "id": 146, "name": "GivenAccess", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "1342:11:0", + "referencedDeclaration": 46, + "src": "1802:11:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 118, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -3314,15 +4239,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1342:38:0", + "src": "1802:38:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 119, + "id": 153, "nodeType": "EmitStatement", - "src": "1337:43:0" + "src": "1797:43:0" } ] }, @@ -3332,19 +4257,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 96, + "id": 112, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 93, + "id": 109, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1238:1:0", + "referencedDeclaration": 106, + "src": "1649:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3356,18 +4281,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 94, - "name": "_keys", + "id": 110, + "name": "_keysOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1242:5:0", + "referencedDeclaration": 51, + "src": "1653:11:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 95, + "id": 111, "isConstant": false, "isLValue": false, "isPure": false, @@ -3375,31 +4300,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1242:12:0", + "src": "1653:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1238:16:0", + "src": "1649:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 121, + "id": 155, "initializationExpression": { "assignments": [ - 90 + 106 ], "declarations": [ { "constant": false, - "id": 90, + "id": 106, "name": "i", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "1226:6:0", + "scope": 157, + "src": "1637:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3407,10 +4332,10 @@ "typeString": "uint256" }, "typeName": { - "id": 89, + "id": 105, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1226:4:0", + "src": "1637:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3420,18 +4345,18 @@ "visibility": "internal" } ], - "id": 92, + "id": 108, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 91, + "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1235:1:0", + "src": "1646:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3440,12 +4365,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "1226:10:0" + "src": "1637:10:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 98, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -3453,15 +4378,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "1256:3:0", + "src": "1673:3:0", "subExpression": { "argumentTypes": null, - "id": 97, + "id": 113, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1256:1:0", + "referencedDeclaration": 106, + "src": "1673:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3472,54 +4397,54 @@ "typeString": "uint256" } }, - "id": 99, + "id": 115, "nodeType": "ExpressionStatement", - "src": "1256:3:0" + "src": "1673:3:0" }, "nodeType": "ForStatement", - "src": "1221:171:0" + "src": "1632:220:0" } ] }, "documentation": null, - "id": 123, + "id": 157, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 64, + "id": 73, "modifierName": { "argumentTypes": null, - "id": 63, + "id": 72, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "859:9:0", + "referencedDeclaration": 349, + "src": "1000:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "859:9:0" + "src": "1000:9:0" } ], "name": "create", "nodeType": "FunctionDefinition", "parameters": { - "id": 62, + "id": 71, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 47, + "id": 48, "name": "_by", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "662:11:0", + "scope": 157, + "src": "670:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3527,10 +4452,10 @@ "typeString": "address" }, "typeName": { - "id": 46, + "id": 47, "name": "address", "nodeType": "ElementaryTypeName", - "src": "662:7:0", + "src": "670:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3541,11 +4466,11 @@ }, { "constant": false, - "id": 50, + "id": 51, "name": "_keysOwners", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "684:21:0", + "scope": 157, + "src": "692:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3554,19 +4479,19 @@ }, "typeName": { "baseType": { - "id": 48, + "id": 49, "name": "address", "nodeType": "ElementaryTypeName", - "src": "684:7:0", + "src": "692:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 49, + "id": 50, "length": null, "nodeType": "ArrayTypeName", - "src": "684:9:0", + "src": "692:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -3577,35 +4502,62 @@ }, { "constant": false, - "id": 53, + "id": 56, "name": "_keys", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "716:14:0", + "scope": 157, + "src": "724:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4][]" }, "typeName": { "baseType": { - "id": 51, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "716:6:0", + "baseType": { + "id": 52, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "724:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 54, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "732:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "724:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } }, - "id": 52, + "id": 55, "length": null, "nodeType": "ArrayTypeName", - "src": "716:8:0", + "src": "724:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_storage_$dyn_storage_ptr", + "typeString": "bytes32[4][]" } }, "value": null, @@ -3613,25 +4565,25 @@ }, { "constant": false, - "id": 55, - "name": "_filePath", + "id": 58, + "name": "_filePath_digest", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "741:16:0", + "scope": 157, + "src": "753:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 54, - "name": "string", + "id": 57, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "741:6:0", + "src": "753:7:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "value": null, @@ -3639,25 +4591,25 @@ }, { "constant": false, - "id": 57, - "name": "_dataHash", + "id": 60, + "name": "_filePath_hashFunction", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "768:16:0", + "scope": 157, + "src": "788:28:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 56, - "name": "string", + "id": 59, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "768:6:0", + "src": "788:5:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, "value": null, @@ -3665,25 +4617,103 @@ }, { "constant": false, - "id": 59, - "name": "_hashMethod", + "id": 62, + "name": "_filePath_size", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "795:16:0", + "scope": 157, + "src": "827:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 58, - "name": "uint", + "id": 61, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "795:4:0", + "src": "827:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 64, + "name": "_dataHash_digest", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "858:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 63, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "name": "_dataHash_hashFunction", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "893:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 65, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "893:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 68, + "name": "_dataHash_size", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "932:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 67, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "932:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, "value": null, @@ -3691,11 +4721,11 @@ }, { "constant": false, - "id": 61, + "id": 70, "name": "_encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "822:22:0", + "scope": 157, + "src": "963:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3703,10 +4733,10 @@ "typeString": "uint256" }, "typeName": { - "id": 60, + "id": 69, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "822:4:0", + "src": "963:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3716,20 +4746,20 @@ "visibility": "internal" } ], - "src": "651:200:0" + "src": "659:333:0" }, "payable": false, "returnParameters": { - "id": 67, + "id": 76, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 66, + "id": 75, "name": "index", "nodeType": "VariableDeclaration", - "scope": 123, - "src": "878:10:0", + "scope": 157, + "src": "1019:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3737,10 +4767,10 @@ "typeString": "uint256" }, "typeName": { - "id": 65, + "id": 74, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "878:4:0", + "src": "1019:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3750,24 +4780,24 @@ "visibility": "internal" } ], - "src": "877:12:0" + "src": "1018:12:0" }, - "scope": 153, - "src": "636:763:0", + "scope": 189, + "src": "644:1215:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 151, + "id": 187, "nodeType": "Block", - "src": "1496:103:0", + "src": "1960:103:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 143, + "id": 179, "isConstant": false, "isLValue": false, "isPure": false, @@ -3780,26 +4810,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 136, + "id": 172, "name": "encryptedFiles", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "1507:14:0", + "referencedDeclaration": 32, + "src": "1971:14:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$28_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_EncryptedFile_$29_storage_$dyn_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref[] storage ref" } }, - "id": 138, + "id": 174, "indexExpression": { "argumentTypes": null, - "id": 137, + "id": 173, "name": "_index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "1522:6:0", + "referencedDeclaration": 159, + "src": "1986:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3810,35 +4840,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1507:22:0", + "src": "1971:22:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_EncryptedFile_$28_storage", + "typeIdentifier": "t_struct$_EncryptedFile_$29_storage", "typeString": "struct EncryptedFileFactory.EncryptedFile storage ref" } }, - "id": 139, + "id": 175, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "keys", "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "1507:27:0", + "referencedDeclaration": 28, + "src": "1971:27:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_string_storage_$", - "typeString": "mapping(address => string storage ref)" + "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_bytes32_$4_storage_$", + "typeString": "mapping(address => bytes32[4] storage ref)" } }, - "id": 141, + "id": 177, "indexExpression": { "argumentTypes": null, - "id": 140, + "id": 176, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "1535:3:0", + "referencedDeclaration": 161, + "src": "1999:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3849,36 +4879,36 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1507:32:0", + "src": "1971:32:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 142, + "id": 178, "name": "_key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "1542:4:0", + "referencedDeclaration": 167, + "src": "2006:4:0", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4] memory" } }, - "src": "1507:39:0", + "src": "1971:39:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeIdentifier": "t_array$_t_bytes32_$4_storage", + "typeString": "bytes32[4] storage ref" } }, - "id": 144, + "id": 180, "nodeType": "ExpressionStatement", - "src": "1507:39:0" + "src": "1971:39:0" }, { "eventCall": { @@ -3886,12 +4916,12 @@ "arguments": [ { "argumentTypes": null, - "id": 146, + "id": 182, "name": "_by", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 129, - "src": "1574:3:0", + "referencedDeclaration": 163, + "src": "2038:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3899,12 +4929,12 @@ }, { "argumentTypes": null, - "id": 147, + "id": 183, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "1579:3:0", + "referencedDeclaration": 161, + "src": "2043:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3912,12 +4942,12 @@ }, { "argumentTypes": null, - "id": 148, + "id": 184, "name": "_index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "1584:6:0", + "referencedDeclaration": 159, + "src": "2048:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3939,18 +4969,18 @@ "typeString": "uint256" } ], - "id": 145, + "id": 181, "name": "GivenAccess", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "1562:11:0", + "referencedDeclaration": 46, + "src": "2026:11:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 149, + "id": 185, "isConstant": false, "isLValue": false, "isPure": false, @@ -3958,57 +4988,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1562:29:0", + "src": "2026:29:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 150, + "id": 186, "nodeType": "EmitStatement", - "src": "1557:34:0" + "src": "2021:34:0" } ] }, "documentation": null, - "id": 152, + "id": 188, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 134, + "id": 170, "modifierName": { "argumentTypes": null, - "id": 133, + "id": 169, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "1486:9:0", + "referencedDeclaration": 349, + "src": "1950:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "1486:9:0" + "src": "1950:9:0" } ], "name": "giveAccess", "nodeType": "FunctionDefinition", "parameters": { - "id": 132, + "id": 168, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 125, + "id": 159, "name": "_index", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1427:11:0", + "scope": 188, + "src": "1887:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4016,10 +5046,10 @@ "typeString": "uint256" }, "typeName": { - "id": 124, + "id": 158, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1427:4:0", + "src": "1887:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4030,11 +5060,11 @@ }, { "constant": false, - "id": 127, + "id": 161, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1440:11:0", + "scope": 188, + "src": "1900:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4042,10 +5072,10 @@ "typeString": "address" }, "typeName": { - "id": 126, + "id": 160, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1440:7:0", + "src": "1900:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4056,11 +5086,11 @@ }, { "constant": false, - "id": 129, + "id": 163, "name": "_by", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1453:11:0", + "scope": 188, + "src": "1913:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4068,10 +5098,10 @@ "typeString": "address" }, "typeName": { - "id": 128, + "id": 162, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1453:7:0", + "src": "1913:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4082,52 +5112,79 @@ }, { "constant": false, - "id": 131, + "id": 167, "name": "_key", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1466:11:0", + "scope": 188, + "src": "1926:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_memory_ptr", + "typeString": "bytes32[4]" }, "typeName": { - "id": 130, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1466:6:0", + "baseType": { + "id": 164, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 166, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "1926:10:0", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } }, "value": null, "visibility": "internal" } ], - "src": "1426:52:0" + "src": "1886:56:0" }, "payable": false, "returnParameters": { - "id": 135, + "id": 171, "nodeType": "ParameterList", "parameters": [], - "src": "1496:0:0" + "src": "1960:0:0" }, - "scope": 153, - "src": "1407:192:0", + "scope": 189, + "src": "1867:196:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 154, - "src": "90:1514:0" + "scope": 190, + "src": "55:2013:0" } ], - "src": "0:1606:0" + "src": "0:2070:0" }, "compiler": { "name": "solc", @@ -4135,5 +5192,5 @@ }, "networks": {}, "schemaVersion": "2.0.1", - "updatedAt": "2018-08-23T15:01:05.603Z" + "updatedAt": "2018-08-24T14:07:59.996Z" } \ No newline at end of file diff --git a/smart-contracts/build/contracts/MedX.json b/smart-contracts/build/contracts/MedX.json index a90c245..7ce1e21 100644 --- a/smart-contracts/build/contracts/MedX.json +++ b/smart-contracts/build/contracts/MedX.json @@ -81,35 +81,43 @@ "type": "address" }, { - "name": "_patientsKey", - "type": "string" + "name": "_keysOwners", + "type": "address[]" }, { - "name": "_doctorsKey", - "type": "string" + "name": "_keys", + "type": "bytes32[4][]" }, { - "name": "_record_filePath", - "type": "string" + "name": "_filePath_digest", + "type": "bytes32[]" }, { - "name": "_record_dataHash", - "type": "string" + "name": "_filePath_hashFunction", + "type": "uint8[]" }, { - "name": "_record_hashMethod", - "type": "uint256" + "name": "_filePath_size", + "type": "uint8[]" }, { - "name": "_record_encriptionMethod", - "type": "uint256" + "name": "_dataHash_digest", + "type": "bytes32[]" + }, + { + "name": "_dataHash_hashFunction", + "type": "uint8[]" }, { - "name": "_attachments", + "name": "_dataHash_size", + "type": "uint8[]" + }, + { + "name": "_encriptionMethod", "type": "uint256[]" } ], - "name": "createRecordFull", + "name": "createRecord", "outputs": [ { "name": "index", @@ -121,24 +129,24 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610059610120565b604051809103906000f080158015610075573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100be610130565b604051809103906000f0801580156100da573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610140565b60405161151c80610edb83390190565b604051610752806123f783390190565b610d8c8061014f6000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063133999c314610067578063715018a6146100a45780638da5cb5b146100bb578063f2fde38b146100e6575b600080fd5b34801561007357600080fd5b5061008e60048036036100899190810190610797565b61010f565b60405161009b9190610b8a565b60405180910390f35b3480156100b057600080fd5b506100b96103cf565b005b3480156100c757600080fd5b506100d06104d1565b6040516100dd9190610a98565b60405180910390f35b3480156100f257600080fd5b5061010d6004803603610108919081019061076e565b6104f6565b005b600060608060008983600081518110151561012657fe5b906020019060200201819052508a83600181518110151561014357fe5b906020019060200201819052503382600081518110151561016057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050338260018151811015156101ac57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a893cd593384868d8d8d8d6040518863ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161026b9796959493929190610aff565b602060405180830381600087803b15801561028557600080fd5b505af1158015610299573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102bd91908101906108c1565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635cdb86848d338460006040519080825280602002602001820160405280156103305781602001602082028038833980820191505090505b506040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161036c9493929190610ab3565b602060405180830381600087803b15801561038657600080fd5b505af115801561039a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103be91908101906108c1565b935050505098975050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561042a57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055157600080fd5b61055a8161055d565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561059957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006106638235610cd5565b905092915050565b600082601f830112151561067e57600080fd5b813561069161068c82610bd2565b610ba5565b915081818352602084019350602081019050838560208402820111156106b657600080fd5b60005b838110156106e657816106cc8882610746565b8452602084019350602083019250506001810190506106b9565b5050505092915050565b600082601f830112151561070357600080fd5b813561071661071182610bfa565b610ba5565b9150808252602083016020830185838301111561073257600080fd5b61073d838284610cff565b50505092915050565b60006107528235610cf5565b905092915050565b60006107668251610cf5565b905092915050565b60006020828403121561078057600080fd5b600061078e84828501610657565b91505092915050565b600080600080600080600080610100898b0312156107b457600080fd5b60006107c28b828c01610657565b985050602089013567ffffffffffffffff8111156107df57600080fd5b6107eb8b828c016106f0565b975050604089013567ffffffffffffffff81111561080857600080fd5b6108148b828c016106f0565b965050606089013567ffffffffffffffff81111561083157600080fd5b61083d8b828c016106f0565b955050608089013567ffffffffffffffff81111561085a57600080fd5b6108668b828c016106f0565b94505060a06108778b828c01610746565b93505060c06108888b828c01610746565b92505060e089013567ffffffffffffffff8111156108a557600080fd5b6108b18b828c0161066b565b9150509295985092959890939650565b6000602082840312156108d357600080fd5b60006108e18482850161075a565b91505092915050565b6108f381610cab565b82525050565b600061090482610c4d565b80845260208401935061091683610c26565b60005b828110156109485761092c8683516108ea565b61093582610c84565b9150602086019550600181019050610919565b50849250505092915050565b600061095f82610c58565b8084526020840193508360208202850161097885610c33565b60005b848110156109b1578383038852610993838351610a53565b925061099e82610c91565b915060208801975060018101905061097b565b508196508694505050505092915050565b60006109cd82610c63565b8084526020840193506109df83610c40565b60005b82811015610a11576109f5868351610a89565b6109fe82610c9e565b91506020860195506001810190506109e2565b50849250505092915050565b6000610a2882610c79565b808452610a3c816020860160208601610d0e565b610a4581610d41565b602085010191505092915050565b6000610a5e82610c6e565b808452610a72816020860160208601610d0e565b610a7b81610d41565b602085010191505092915050565b610a9281610ccb565b82525050565b6000602082019050610aad60008301846108ea565b92915050565b6000608082019050610ac860008301876108ea565b610ad560208301866108ea565b610ae26040830185610a89565b8181036060830152610af481846109c2565b905095945050505050565b600060e082019050610b14600083018a6108ea565b8181036020830152610b2681896108f9565b90508181036040830152610b3a8188610954565b90508181036060830152610b4e8187610a1d565b90508181036080830152610b628186610a1d565b9050610b7160a0830185610a89565b610b7e60c0830184610a89565b98975050505050505050565b6000602082019050610b9f6000830184610a89565b92915050565b6000604051905081810181811067ffffffffffffffff82111715610bc857600080fd5b8060405250919050565b600067ffffffffffffffff821115610be957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c1157600080fd5b601f19601f8301169050602081019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d2c578082015181840152602081019050610d11565b83811115610d3b576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a72305820b2529afec2387992da60a548644cdf795c17e184882cdd21cdc587edb15fb8526c6578706572696d656e74616cf5003760806040526020604051908101604052806040805190810160405280600781526020017f5348412d3531320000000000000000000000000000000000000000000000000081525081525060019060016200005b929190620000fa565b506020604051908101604052806040805190810160405280600381526020017f41455300000000000000000000000000000000000000000000000000000000008152508152506002906001620000b3929190620000fa565b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200028d565b8280548282559060005260206000209081019282156200014e579160200282015b828111156200014d5782518290805190602001906200013c92919062000161565b50916020019190600101906200011b565b5b5090506200015d9190620001e8565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001a457805160ff1916838001178555620001d5565b82800160010185558215620001d5579182015b82811115620001d4578251825591602001919060010190620001b7565b5b509050620001e4919062000219565b5090565b6200021691905b8082111562000212576000818162000208919062000241565b50600101620001ef565b5090565b90565b6200023e91905b808211156200023a57600081600090555060010162000220565b5090565b90565b50805460018160011615610100020316600290046000825580601f106200026957506200028a565b601f01602090049060005260206000209081019062000289919062000219565b5b50565b61127f806200029d6000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100935780638b9337bf146100aa5780638da5cb5b146100e7578063a893cd5914610112578063d6aa9e031461014f578063f2d5462e1461018f578063f2fde38b146101b8578063fc3bf40d146101e1575b600080fd5b34801561009f57600080fd5b506100a861021e565b005b3480156100b657600080fd5b506100d160048036036100cc9190810190610f1b565b610320565b6040516100de919061102e565b60405180910390f35b3480156100f357600080fd5b506100fc6103db565b6040516101099190611013565b60405180910390f35b34801561011e57600080fd5b5061013960048036036101349190810190610e1d565b610400565b60405161014691906110a3565b60405180910390f35b34801561015b57600080fd5b5061017660048036036101719190810190610f1b565b610647565b6040516101869493929190611050565b60405180910390f35b34801561019b57600080fd5b506101b660048036036101b19190810190610f44565b6107b6565b005b3480156101c457600080fd5b506101df60048036036101da9190810190610df4565b6108e4565b005b3480156101ed57600080fd5b5061020860048036036102039190810190610f1b565b61094b565b604051610215919061102e565b60405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561027957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60018181548110151561032f57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561046057600080fd5b6003608060405190810160405280898152602001888152602001878152602001868152509080600181540180825580915050906001820390600052602060002090600502016000909192909190915060008201518160000190805190602001906104cb929190610b00565b5060208201518160010190805190602001906104e8929190610b00565b5060408201518160020155606082015181600301555050925082806001900393505060038181548110151561051957fe5b90600052602060002090600502019150600090505b875181101561063a57878181518110151561054557fe5b906020019060200201518260040160008b8481518110151561056357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105ba929190610b80565b508289828151811015156105ca57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a4808060010191505061052e565b5050979650505050505050565b60038181548110151561065657fe5b9060005260206000209060050201600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107a05780601f10610775576101008083540402835291602001916107a0565b820191906000526020600020905b81548152906001019060200180831161078357829003601f168201915b5050505050908060020154908060030154905084565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081157600080fd5b8060038581548110151561082157fe5b906000526020600020906005020160040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209080519060200190610882929190610b80565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093f57600080fd5b61094881610a06565b50565b60028181548110151561095a57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109fe5780601f106109d3576101008083540402835291602001916109fe565b820191906000526020600020905b8154815290600101906020018083116109e157829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a4257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b4157805160ff1916838001178555610b6f565b82800160010185558215610b6f579182015b82811115610b6e578251825591602001919060010190610b53565b5b509050610b7c9190610c00565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610bc157805160ff1916838001178555610bef565b82800160010185558215610bef579182015b82811115610bee578251825591602001919060010190610bd3565b5b509050610bfc9190610c00565b5090565b610c2291905b80821115610c1e576000816000905550600101610c06565b5090565b90565b6000610c3182356111c8565b905092915050565b600082601f8301121515610c4c57600080fd5b8135610c5f610c5a826110eb565b6110be565b91508181835260208401935060208101905083856020840282011115610c8457600080fd5b60005b83811015610cb45781610c9a8882610c25565b845260208401935060208301925050600181019050610c87565b5050505092915050565b600082601f8301121515610cd157600080fd5b8135610ce4610cdf82611113565b6110be565b9150818183526020840193506020810190508360005b83811015610d2a5781358601610d108882610d34565b845260208401935060208301925050600181019050610cfa565b5050505092915050565b600082601f8301121515610d4757600080fd5b8135610d5a610d558261113b565b6110be565b91508082526020830160208301858383011115610d7657600080fd5b610d818382846111f2565b50505092915050565b600082601f8301121515610d9d57600080fd5b8135610db0610dab82611167565b6110be565b91508082526020830160208301858383011115610dcc57600080fd5b610dd78382846111f2565b50505092915050565b6000610dec82356111e8565b905092915050565b600060208284031215610e0657600080fd5b6000610e1484828501610c25565b91505092915050565b600080600080600080600060e0888a031215610e3857600080fd5b6000610e468a828b01610c25565b975050602088013567ffffffffffffffff811115610e6357600080fd5b610e6f8a828b01610c39565b965050604088013567ffffffffffffffff811115610e8c57600080fd5b610e988a828b01610cbe565b955050606088013567ffffffffffffffff811115610eb557600080fd5b610ec18a828b01610d8a565b945050608088013567ffffffffffffffff811115610ede57600080fd5b610eea8a828b01610d8a565b93505060a0610efb8a828b01610de0565b92505060c0610f0c8a828b01610de0565b91505092959891949750929550565b600060208284031215610f2d57600080fd5b6000610f3b84828501610de0565b91505092915050565b60008060008060808587031215610f5a57600080fd5b6000610f6887828801610de0565b9450506020610f7987828801610c25565b9350506040610f8a87828801610c25565b925050606085013567ffffffffffffffff811115610fa757600080fd5b610fb387828801610d8a565b91505092959194509250565b610fc88161119e565b82525050565b6000610fd982611193565b808452610fed816020860160208601611201565b610ff681611234565b602085010191505092915050565b61100d816111be565b82525050565b60006020820190506110286000830184610fbf565b92915050565b600060208201905081810360008301526110488184610fce565b905092915050565b6000608082019050818103600083015261106a8187610fce565b9050818103602083015261107e8186610fce565b905061108d6040830185611004565b61109a6060830184611004565b95945050505050565b60006020820190506110b86000830184611004565b92915050565b6000604051905081810181811067ffffffffffffffff821117156110e157600080fd5b8060405250919050565b600067ffffffffffffffff82111561110257600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561112a57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561115257600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561117e57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561121f578082015181840152602081019050611204565b8381111561122e576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a7230582034bea3092b3b752d4e390f508a6da4e057e0403f5b767d28c8a41e2ae6f4985e6c6578706572696d656e74616cf500376080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106ff806100536000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635cdb868414610067578063715018a61461012b5780638da5cb5b14610142578063f2fde38b14610199575b600080fd5b34801561007357600080fd5b50610115600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101dc565b6040518082815260200191505060405180910390f35b34801561013757600080fd5b506101406103d9565b005b34801561014e57600080fd5b506101576104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a557600080fd5b506101da600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610500565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561023957600080fd5b60016080604051908101604052808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152509080600181540180825580915050906001820390600052602060002090600402016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003019080519060200190610368929190610661565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a4949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561043457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055b57600080fd5b61056481610567565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105a357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b82805482825590600052602060002090810192821561069d579160200282015b8281111561069c578251825591602001919060010190610681565b5b5090506106aa91906106ae565b5090565b6106d091905b808211156106cc5760008160009055506001016106b4565b5090565b905600a165627a7a72305820b218f79c29ad4e6310d452d36523f704940e7dc5e9dc14369534fed0796d8c770029", - "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063133999c314610067578063715018a6146100a45780638da5cb5b146100bb578063f2fde38b146100e6575b600080fd5b34801561007357600080fd5b5061008e60048036036100899190810190610797565b61010f565b60405161009b9190610b8a565b60405180910390f35b3480156100b057600080fd5b506100b96103cf565b005b3480156100c757600080fd5b506100d06104d1565b6040516100dd9190610a98565b60405180910390f35b3480156100f257600080fd5b5061010d6004803603610108919081019061076e565b6104f6565b005b600060608060008983600081518110151561012657fe5b906020019060200201819052508a83600181518110151561014357fe5b906020019060200201819052503382600081518110151561016057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050338260018151811015156101ac57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a893cd593384868d8d8d8d6040518863ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161026b9796959493929190610aff565b602060405180830381600087803b15801561028557600080fd5b505af1158015610299573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102bd91908101906108c1565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635cdb86848d338460006040519080825280602002602001820160405280156103305781602001602082028038833980820191505090505b506040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161036c9493929190610ab3565b602060405180830381600087803b15801561038657600080fd5b505af115801561039a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103be91908101906108c1565b935050505098975050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561042a57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055157600080fd5b61055a8161055d565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561059957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006106638235610cd5565b905092915050565b600082601f830112151561067e57600080fd5b813561069161068c82610bd2565b610ba5565b915081818352602084019350602081019050838560208402820111156106b657600080fd5b60005b838110156106e657816106cc8882610746565b8452602084019350602083019250506001810190506106b9565b5050505092915050565b600082601f830112151561070357600080fd5b813561071661071182610bfa565b610ba5565b9150808252602083016020830185838301111561073257600080fd5b61073d838284610cff565b50505092915050565b60006107528235610cf5565b905092915050565b60006107668251610cf5565b905092915050565b60006020828403121561078057600080fd5b600061078e84828501610657565b91505092915050565b600080600080600080600080610100898b0312156107b457600080fd5b60006107c28b828c01610657565b985050602089013567ffffffffffffffff8111156107df57600080fd5b6107eb8b828c016106f0565b975050604089013567ffffffffffffffff81111561080857600080fd5b6108148b828c016106f0565b965050606089013567ffffffffffffffff81111561083157600080fd5b61083d8b828c016106f0565b955050608089013567ffffffffffffffff81111561085a57600080fd5b6108668b828c016106f0565b94505060a06108778b828c01610746565b93505060c06108888b828c01610746565b92505060e089013567ffffffffffffffff8111156108a557600080fd5b6108b18b828c0161066b565b9150509295985092959890939650565b6000602082840312156108d357600080fd5b60006108e18482850161075a565b91505092915050565b6108f381610cab565b82525050565b600061090482610c4d565b80845260208401935061091683610c26565b60005b828110156109485761092c8683516108ea565b61093582610c84565b9150602086019550600181019050610919565b50849250505092915050565b600061095f82610c58565b8084526020840193508360208202850161097885610c33565b60005b848110156109b1578383038852610993838351610a53565b925061099e82610c91565b915060208801975060018101905061097b565b508196508694505050505092915050565b60006109cd82610c63565b8084526020840193506109df83610c40565b60005b82811015610a11576109f5868351610a89565b6109fe82610c9e565b91506020860195506001810190506109e2565b50849250505092915050565b6000610a2882610c79565b808452610a3c816020860160208601610d0e565b610a4581610d41565b602085010191505092915050565b6000610a5e82610c6e565b808452610a72816020860160208601610d0e565b610a7b81610d41565b602085010191505092915050565b610a9281610ccb565b82525050565b6000602082019050610aad60008301846108ea565b92915050565b6000608082019050610ac860008301876108ea565b610ad560208301866108ea565b610ae26040830185610a89565b8181036060830152610af481846109c2565b905095945050505050565b600060e082019050610b14600083018a6108ea565b8181036020830152610b2681896108f9565b90508181036040830152610b3a8188610954565b90508181036060830152610b4e8187610a1d565b90508181036080830152610b628186610a1d565b9050610b7160a0830185610a89565b610b7e60c0830184610a89565b98975050505050505050565b6000602082019050610b9f6000830184610a89565b92915050565b6000604051905081810181811067ffffffffffffffff82111715610bc857600080fd5b8060405250919050565b600067ffffffffffffffff821115610be957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c1157600080fd5b601f19601f8301169050602081019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d2c578082015181840152602081019050610d11565b83811115610d3b576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a72305820b2529afec2387992da60a548644cdf795c17e184882cdd21cdc587edb15fb8526c6578706572696d656e74616cf50037", - "sourceMap": "159:1127:1:-;;;279:134;8:9:-1;5:2;;;30:1;27;20:12;5:2;279:134:1;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;333:26:1;;:::i;:::-;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;333:26:1;311:19;;:48;;;;;;;;;;;;;;;;;;386:19;;:::i;:::-;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;386:19:1;370:13;;:35;;;;;;;;;;;;;;;;;;159:1127;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "159:1127:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;421:862;;8:9:-1;5:2;;;30:1;27;20:12;5:2;421:862:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;249:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;1408:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;421:862:1;728:10;753:20;851:23;955:17;794:11;784:4;789:1;784:7;;;;;;;;;;;;;;;;;:21;;;;826:12;816:4;821:1;816:7;;;;;;;;;;;;;;;;;:22;;;;897:10;885:6;892:1;885:9;;;;;;;;;;;;;;;;;:22;;;;;;;;;;;930:10;918:6;925:1;918:9;;;;;;;;;;;;;;;;;:22;;;;;;;;;;;975:19;;;;;;;;;;;:26;;;1016:10;1028:6;1036:4;1055:16;1073;1091:18;1111:24;975:171;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;975:171:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;975:171:1;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;975:171:1;;;;;;;;;955:191;;1167:13;;;;;;;;;;;:20;;;1202:8;1212:10;1237:12;1262:1;1251:13;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;1251:13:1;;;;1167:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1167:108:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1167:108:1;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1167:108:1;;;;;;;;;1159:116;;421:862;;;;;;;;;;;;;:::o;1106:124:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;249:20::-;;;;;;;;;;;;;:::o;1408:111::-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;1670:189::-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;;57:66;;;;;148:707;;265:3;258:4;250:6;246:17;242:27;235:35;232:2;;;283:1;280;273:12;232:2;320:6;307:20;342:80;357:64;414:6;357:64;;;342:80;;;333:89;;439:5;464:6;457:5;450:21;494:4;486:6;482:17;472:27;;516:4;511:3;507:14;500:21;;569:6;616:3;608:4;600:6;596:17;591:3;587:27;584:36;581:2;;;633:1;630;623:12;581:2;658:1;643:206;668:6;665:1;662:13;643:206;;;726:3;748:37;781:3;769:10;748:37;;;743:3;736:50;809:4;804:3;800:14;793:21;;837:4;832:3;828:14;821:21;;700:149;690:1;687;683:9;678:14;;643:206;;;647:14;225:630;;;;;;;;864:442;;966:3;959:4;951:6;947:17;943:27;936:35;933:2;;;984:1;981;974:12;933:2;1021:6;1008:20;1043:65;1058:49;1100:6;1058:49;;;1043:65;;;1034:74;;1128:6;1121:5;1114:21;1164:4;1156:6;1152:17;1197:4;1190:5;1186:16;1232:3;1223:6;1218:3;1214:16;1211:25;1208:2;;;1249:1;1246;1239:12;1208:2;1259:41;1293:6;1288:3;1283;1259:41;;;926:380;;;;;;;;1314:118;;1381:46;1419:6;1406:20;1381:46;;;1372:55;;1366:66;;;;;1439:122;;1517:39;1548:6;1542:13;1517:39;;;1508:48;;1502:59;;;;;1568:241;;1672:2;1660:9;1651:7;1647:23;1643:32;1640:2;;;1688:1;1685;1678:12;1640:2;1723:1;1740:53;1785:7;1776:6;1765:9;1761:22;1740:53;;;1730:63;;1702:97;1634:175;;;;;1816:1681;;;;;;;;;2104:3;2092:9;2083:7;2079:23;2075:33;2072:2;;;2121:1;2118;2111:12;2072:2;2156:1;2173:53;2218:7;2209:6;2198:9;2194:22;2173:53;;;2163:63;;2135:97;2291:2;2280:9;2276:18;2263:32;2315:18;2307:6;2304:30;2301:2;;;2347:1;2344;2337:12;2301:2;2367:63;2422:7;2413:6;2402:9;2398:22;2367:63;;;2357:73;;2242:194;2495:2;2484:9;2480:18;2467:32;2519:18;2511:6;2508:30;2505:2;;;2551:1;2548;2541:12;2505:2;2571:63;2626:7;2617:6;2606:9;2602:22;2571:63;;;2561:73;;2446:194;2699:2;2688:9;2684:18;2671:32;2723:18;2715:6;2712:30;2709:2;;;2755:1;2752;2745:12;2709:2;2775:63;2830:7;2821:6;2810:9;2806:22;2775:63;;;2765:73;;2650:194;2903:3;2892:9;2888:19;2875:33;2928:18;2920:6;2917:30;2914:2;;;2960:1;2957;2950:12;2914:2;2980:63;3035:7;3026:6;3015:9;3011:22;2980:63;;;2970:73;;2854:195;3080:3;3099:53;3144:7;3135:6;3124:9;3120:22;3099:53;;;3089:63;;3059:99;3189:3;3208:53;3253:7;3244:6;3233:9;3229:22;3208:53;;;3198:63;;3168:99;3326:3;3315:9;3311:19;3298:33;3351:18;3343:6;3340:30;3337:2;;;3383:1;3380;3373:12;3337:2;3403:78;3473:7;3464:6;3453:9;3449:22;3403:78;;;3393:88;;3277:210;2066:1431;;;;;;;;;;;;3504:263;;3619:2;3607:9;3598:7;3594:23;3590:32;3587:2;;;3635:1;3632;3625:12;3587:2;3670:1;3687:64;3743:7;3734:6;3723:9;3719:22;3687:64;;;3677:74;;3649:108;3581:186;;;;;3774:110;3847:31;3872:5;3847:31;;;3842:3;3835:44;3829:55;;;3922:590;;4057:54;4105:5;4057:54;;;4129:6;4124:3;4117:19;4153:4;4148:3;4144:14;4137:21;;4198:56;4248:5;4198:56;;;4275:1;4260:230;4285:6;4282:1;4279:13;4260:230;;;4325:53;4374:3;4365:6;4359:13;4325:53;;;4395:60;4448:6;4395:60;;;4385:70;;4478:4;4473:3;4469:14;4462:21;;4307:1;4304;4300:9;4295:14;;4260:230;;;4264:14;4503:3;4496:10;;4036:476;;;;;;;4549:773;;4696:60;4750:5;4696:60;;;4774:6;4769:3;4762:19;4798:4;4793:3;4789:14;4782:21;;4846:3;4888:4;4880:6;4876:17;4871:3;4867:27;4914:62;4970:5;4914:62;;;4997:1;4982:301;5007:6;5004:1;5001:13;4982:301;;;5069:9;5063:4;5059:20;5054:3;5047:33;5095:70;5160:4;5151:6;5145:13;5095:70;;;5087:78;;5182:66;5241:6;5182:66;;;5172:76;;5271:4;5266:3;5262:14;5255:21;;5029:1;5026;5022:9;5017:14;;4982:301;;;4986:14;5296:4;5289:11;;5313:3;5306:10;;4675:647;;;;;;;;;5361:574;;5492:50;5536:5;5492:50;;;5560:6;5555:3;5548:19;5584:4;5579:3;5575:14;5568:21;;5629:52;5675:5;5629:52;;;5702:1;5687:226;5712:6;5709:1;5706:13;5687:226;;;5752:53;5801:3;5792:6;5786:13;5752:53;;;5822:56;5871:6;5822:56;;;5812:66;;5901:4;5896:3;5892:14;5885:21;;5734:1;5731;5727:9;5722:14;;5687:226;;;5691:14;5926:3;5919:10;;5471:464;;;;;;;5943:300;;6045:39;6078:5;6045:39;;;6101:6;6096:3;6089:19;6113:63;6169:6;6162:4;6157:3;6153:14;6146:4;6139:5;6135:16;6113:63;;;6208:29;6230:6;6208:29;;;6201:4;6196:3;6192:14;6188:50;6181:57;;6025:218;;;;;;6250:292;;6348:35;6377:5;6348:35;;;6400:6;6395:3;6388:19;6412:63;6468:6;6461:4;6456:3;6452:14;6445:4;6438:5;6434:16;6412:63;;;6507:29;6529:6;6507:29;;;6500:4;6495:3;6491:14;6487:50;6480:57;;6328:214;;;;;;6549:110;6622:31;6647:5;6622:31;;;6617:3;6610:44;6604:55;;;6666:193;;6774:2;6763:9;6759:18;6751:26;;6788:61;6846:1;6835:9;6831:17;6822:6;6788:61;;;6745:114;;;;;6866:637;;7104:3;7093:9;7089:19;7081:27;;7119:61;7177:1;7166:9;7162:17;7153:6;7119:61;;;7191:62;7249:2;7238:9;7234:18;7225:6;7191:62;;;7264;7322:2;7311:9;7307:18;7298:6;7264:62;;;7374:9;7368:4;7364:20;7359:2;7348:9;7344:18;7337:48;7399:94;7488:4;7479:6;7399:94;;;7391:102;;7075:428;;;;;;;;7510:1299;;7938:3;7927:9;7923:19;7915:27;;7953:61;8011:1;8000:9;7996:17;7987:6;7953:61;;;8062:9;8056:4;8052:20;8047:2;8036:9;8032:18;8025:48;8087:98;8180:4;8171:6;8087:98;;;8079:106;;8233:9;8227:4;8223:20;8218:2;8207:9;8203:18;8196:48;8258:110;8363:4;8354:6;8258:110;;;8250:118;;8416:9;8410:4;8406:20;8401:2;8390:9;8386:18;8379:48;8441:68;8504:4;8495:6;8441:68;;;8433:76;;8558:9;8552:4;8548:20;8542:3;8531:9;8527:19;8520:49;8583:68;8646:4;8637:6;8583:68;;;8575:76;;8662:63;8720:3;8709:9;8705:19;8696:6;8662:63;;;8736;8794:3;8783:9;8779:19;8770:6;8736:63;;;7909:900;;;;;;;;;;;8816:193;;8924:2;8913:9;8909:18;8901:26;;8938:61;8996:1;8985:9;8981:17;8972:6;8938:61;;;8895:114;;;;;9016:256;;9078:2;9072:9;9062:19;;9116:4;9108:6;9104:17;9215:6;9203:10;9200:22;9179:18;9167:10;9164:34;9161:62;9158:2;;;9236:1;9233;9226:12;9158:2;9256:10;9252:2;9245:22;9056:216;;;;;9279:258;;9438:18;9430:6;9427:30;9424:2;;;9470:1;9467;9460:12;9424:2;9499:4;9491:6;9487:17;9479:25;;9527:4;9521;9517:15;9509:23;;9361:176;;;;9544:259;;9688:18;9680:6;9677:30;9674:2;;;9720:1;9717;9710:12;9674:2;9764:4;9760:9;9753:4;9745:6;9741:17;9737:33;9729:41;;9793:4;9787;9783:15;9775:23;;9611:192;;;;9812:121;;9921:4;9913:6;9909:17;9898:28;;9890:43;;;;9944:127;;10059:4;10051:6;10047:17;10036:28;;10028:43;;;;10082:117;;10187:4;10179:6;10175:17;10164:28;;10156:43;;;;10208:107;;10304:5;10298:12;10288:22;;10282:33;;;;10322:113;;10424:5;10418:12;10408:22;;10402:33;;;;10442:103;;10534:5;10528:12;10518:22;;10512:33;;;;10552:88;;10629:5;10623:12;10613:22;;10607:33;;;;10647:92;;10728:5;10722:12;10712:22;;10706:33;;;;10747:122;;10858:4;10850:6;10846:17;10835:28;;10828:41;;;;10878:128;;10995:4;10987:6;10983:17;10972:28;;10965:41;;;;11015:118;;11122:4;11114:6;11110:17;11099:28;;11092:41;;;;11141:128;;11221:42;11214:5;11210:54;11199:65;;11193:76;;;;11276:79;;11345:5;11334:16;;11328:27;;;;11362:128;;11442:42;11435:5;11431:54;11420:65;;11414:76;;;;11497:79;;11566:5;11555:16;;11549:27;;;;11584:145;11665:6;11660:3;11655;11642:30;11721:1;11712:6;11707:3;11703:16;11696:27;11635:94;;;;11738:268;11803:1;11810:101;11824:6;11821:1;11818:13;11810:101;;;11900:1;11895:3;11891:11;11885:18;11881:1;11876:3;11872:11;11865:39;11846:2;11843:1;11839:10;11834:15;;11810:101;;;11926:6;11923:1;11920:13;11917:2;;;11991:1;11982:6;11977:3;11973:16;11966:27;11917:2;11787:219;;;;;12014:97;;12102:2;12098:7;12093:2;12086:5;12082:14;12078:28;12068:38;;12062:49;;;", - "source": "pragma solidity ^0.4.24;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"./Ownable.sol\";\r\nimport \"./RecordFactory.sol\";\r\nimport \"./EncryptedFileFactory.sol\";\r\n\r\ncontract MedX is Ownable{\r\n \r\n EncryptedFileFactory encyptedFileFactory;\r\n RecordFactory recordFactory;\r\n\r\n constructor() public {\r\n encyptedFileFactory = new EncryptedFileFactory();\r\n recordFactory = new RecordFactory();\r\n }\r\n\r\n function createRecordFull(\r\n address _patient,\r\n string _patientsKey,\r\n string _doctorsKey,\r\n string _record_filePath,\r\n string _record_dataHash,\r\n uint _record_hashMethod,\r\n uint _record_encriptionMethod,\r\n uint[] _attachments\r\n ) public returns (uint index) {\r\n\r\n string[] memory keys;\r\n keys[0] = _doctorsKey;\r\n keys[1] = _patientsKey;\r\n\r\n address[] memory owners;\r\n owners[0] = msg.sender;\r\n owners[1] = msg.sender;\r\n\r\n\r\n uint recFileIndex = encyptedFileFactory.create(\r\n msg.sender, owners, keys,\r\n _record_filePath, _record_dataHash, _record_hashMethod, _record_encriptionMethod\r\n );\r\n\r\n index = recordFactory.create(\r\n _patient, msg.sender,\r\n recFileIndex, new uint[](0)\r\n );\r\n }\r\n}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610059610120565b604051809103906000f080158015610075573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100be610130565b604051809103906000f0801580156100da573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610140565b60405161103d80610c7a83390190565b60405161074780611cb783390190565b610b2b8061014f6000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806303b9703014610067578063715018a6146103555780638da5cb5b1461036c578063f2fde38b146103c3575b600080fd5b34801561007357600080fd5b5061033f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610158578484839050608002016004806020026040519081016040528092919082600460200280828437820191505050505081526020019060010190610113565b5050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610406565b6040518082815260200191505060405180910390f35b34801561036157600080fd5b5061036a610877565b005b34801561037857600080fd5b50610381610979565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103cf57600080fd5b50610404600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061099e565b005b6000606060008090505b83518110156106f057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638173398a338e8e8e8681518110151561046857fe5b906020019060200201518e8781518110151561048057fe5b906020019060200201518e8881518110151561049857fe5b906020019060200201518e898151811015156104b057fe5b906020019060200201518e8a8151811015156104c857fe5b906020019060200201518e8b8151811015156104e057fe5b906020019060200201518e8c8151811015156104f857fe5b906020019060200201516040518b63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018a600019166000191681526020018960ff1660ff1681526020018860ff1660ff16815260200187600019166000191681526020018660ff1660ff1681526020018560ff1660ff16815260200184815260200183810383528c818151815260200191508051906020019060200280838360005b838110156105f85780820151818401526020810190506105dd565b5050505090500183810382528b8181518152602001915080516000925b8184101561066057828490602001906020020151600460200280838360005b8381101561064f578082015181840152602081019050610634565b505050509050019260010192610615565b925050509c50505050505050505050505050602060405180830381600087803b15801561068c57600080fd5b505af11580156106a0573d6000803e3d6000fd5b505050506040513d60208110156106b657600080fd5b810190808051906020019092919050505082828151811015156106d557fe5b90602001906020020181815250508080600101915050610410565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632bfdced78e33856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156108035780820151818401526020810190506107e8565b50505050905001945050505050602060405180830381600087803b15801561082a57600080fd5b505af115801561083e573d6000803e3d6000fd5b505050506040513d602081101561085457600080fd5b8101908080519060200190929190505050925050509a9950505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108d257600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f957600080fd5b610a0281610a05565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a4157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582003606e16c7b547bdd1e84a13db56a3331fa652bff588f2eb210fe95620ff50d7002960806040526020604051908101604052806040805190810160405280600381526020017f414553000000000000000000000000000000000000000000000000000000000081525081525060019060016200005b929190620000a2565b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000235565b828054828255906000526020600020908101928215620000f6579160200282015b82811115620000f5578251829080519060200190620000e492919062000109565b5091602001919060010190620000c3565b5b50905062000105919062000190565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200014c57805160ff19168380011785556200017d565b828001600101855582156200017d579182015b828111156200017c5782518255916020019190600101906200015f565b5b5090506200018c9190620001c1565b5090565b620001be91905b80821115620001ba5760008181620001b09190620001e9565b5060010162000197565b5090565b90565b620001e691905b80821115620001e2576000816000905550600101620001c8565b5090565b90565b50805460018160011615610100020316600290046000825580601f1062000211575062000232565b601f016020900490600052602060002090810190620002319190620001c1565b5b50565b610df880620002456000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a6146100885780638173398a1461009f5780638da5cb5b14610212578063d6aa9e0314610269578063df594380146102b8578063f2fde38b14610354578063fc3bf40d14610397575b600080fd5b34801561009457600080fd5b5061009d61043d565b005b3480156100ab57600080fd5b506101fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561019057848483905060800201600480602002604051908101604052809291908260046020028082843782019150505050508152602001906001019061014b565b505050505091929192908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035600019169060200190929190803560ff169060200190929190803560ff1690602001909291908035906020019092919050505061053f565b6040518082815260200191505060405180910390f35b34801561021e57600080fd5b50610227610910565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b5061029460048036038101908080359060200190929190505050610935565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102c457600080fd5b5061035260048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060800190600480602002604051908101604052809291908260046020028082843782019150505050509192919290505050610a1c565b005b34801561036057600080fd5b50610395600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b45565b005b3480156103a357600080fd5b506103c260048036038101908080359060200190929190505050610bac565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104025780820151818401526020810190506103e7565b50505050905090810190601f16801561042f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561049857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059f57600080fd5b60026060604051908101604052806060604051908101604052808e6000191681526020018d60ff1681526020018c60ff1681525081526020016060604051908101604052808b6000191681526020018a60ff1681526020018960ff16815250815260200186815250908060018154018082558091505090600182039060005260206000209060060201600090919290919091506000820151816000016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff16021790555050506020820151816002016000820151816000019060001916905560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548160ff021916908360ff1602179055505050604082015181600401555050925082806001900393505060028181548110151561071257fe5b90600052602060002090600602019150600090505b8b51811015610900576080604051908101604052808c600081518110151561074b57fe5b906020019060200201518360048110151561076257fe5b6020020151600019166000191681526020018c600181518110151561078357fe5b906020019060200201518360048110151561079a57fe5b6020020151600019166000191681526020018c60028151811015156107bb57fe5b90602001906020020151836004811015156107d257fe5b6020020151600019166000191681526020018c60038151811015156107f357fe5b906020019060200201518360048110151561080a57fe5b602002015160001916600019168152508260050160008e8481518110151561082e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610880929190610d61565b50828c8281518110151561089057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a48080600101915050610727565b50509a9950505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028181548110151561094457fe5b906000526020600020906006020160009150905080600001606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff16815250509080600201606060405190810160405290816000820154600019166000191681526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900460ff1660ff1660ff1681525050908060040154905083565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a7757600080fd5b80600285815481101515610a8757fe5b906000526020600020906006020160050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020906004610ae3929190610d61565b50838373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd9746856d3dbc73c60e9258736fb51c1a4c41e817fcadab7110d3f0b4730ea6960405160405180910390a450505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ba057600080fd5b610ba981610c67565b50565b600181815481101515610bbb57fe5b906000526020600020016000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c5f5780601f10610c3457610100808354040283529160200191610c5f565b820191906000526020600020905b815481529060010190602001808311610c4257829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ca357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b8260048101928215610d96579160200282015b82811115610d95578251829060001916905591602001919060010190610d74565b5b509050610da39190610da7565b5090565b610dc991905b80821115610dc5576000816000905550600101610dad565b5090565b905600a165627a7a72305820aca4ad99fecd4c624739a204429a9b2ce8749201e512a061d64d4378f450b64200296080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106f4806100536000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632bfdced714610067578063715018a6146101215780638da5cb5b14610138578063f2fde38b1461018f575b600080fd5b34801561007357600080fd5b5061010b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101d2565b6040518082815260200191505060405180910390f35b34801561012d57600080fd5b506101366103ce565b005b34801561014457600080fd5b5061014d6104d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104f5565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561022f57600080fd5b6000825111151561023f57600080fd5b60016060604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001848152509080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201908051906020019061035e929190610656565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a49392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561042957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055057600080fd5b6105598161055c565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561059857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054828255906000526020600020908101928215610692579160200282015b82811115610691578251825591602001919060010190610676565b5b50905061069f91906106a3565b5090565b6106c591905b808211156106c15760008160009055506001016106a9565b5090565b905600a165627a7a7230582006ce36e7f53d677453c96519765601ccb18e04f0ddfb615ea75d37979f320fb00029", + "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806303b9703014610067578063715018a6146103555780638da5cb5b1461036c578063f2fde38b146103c3575b600080fd5b34801561007357600080fd5b5061033f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610158578484839050608002016004806020026040519081016040528092919082600460200280828437820191505050505081526020019060010190610113565b5050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610406565b6040518082815260200191505060405180910390f35b34801561036157600080fd5b5061036a610877565b005b34801561037857600080fd5b50610381610979565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103cf57600080fd5b50610404600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061099e565b005b6000606060008090505b83518110156106f057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638173398a338e8e8e8681518110151561046857fe5b906020019060200201518e8781518110151561048057fe5b906020019060200201518e8881518110151561049857fe5b906020019060200201518e898151811015156104b057fe5b906020019060200201518e8a8151811015156104c857fe5b906020019060200201518e8b8151811015156104e057fe5b906020019060200201518e8c8151811015156104f857fe5b906020019060200201516040518b63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018a600019166000191681526020018960ff1660ff1681526020018860ff1660ff16815260200187600019166000191681526020018660ff1660ff1681526020018560ff1660ff16815260200184815260200183810383528c818151815260200191508051906020019060200280838360005b838110156105f85780820151818401526020810190506105dd565b5050505090500183810382528b8181518152602001915080516000925b8184101561066057828490602001906020020151600460200280838360005b8381101561064f578082015181840152602081019050610634565b505050509050019260010192610615565b925050509c50505050505050505050505050602060405180830381600087803b15801561068c57600080fd5b505af11580156106a0573d6000803e3d6000fd5b505050506040513d60208110156106b657600080fd5b810190808051906020019092919050505082828151811015156106d557fe5b90602001906020020181815250508080600101915050610410565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632bfdced78e33856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156108035780820151818401526020810190506107e8565b50505050905001945050505050602060405180830381600087803b15801561082a57600080fd5b505af115801561083e573d6000803e3d6000fd5b505050506040513d602081101561085457600080fd5b8101908080519060200190929190505050925050509a9950505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108d257600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f957600080fd5b610a0281610a05565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a4157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582003606e16c7b547bdd1e84a13db56a3331fa652bff588f2eb210fe95620ff50d70029", + "sourceMap": "124:1260:1:-;;;244:134;8:9:-1;5:2;;;30:1;27;20:12;5:2;244:134:1;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;298:26:1;;:::i;:::-;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;298:26:1;276:19;;:48;;;;;;;;;;;;;;;;;;351:19;;:::i;:::-;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;351:19:1;335:13;;:35;;;;;;;;;;;;;;;;;;124:1260;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "124:1260:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;386:995;;8:9:-1;5:2;;;30:1;27;20:12;5:2;386:995:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;249:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;1408:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;386:995:1;776:10;799:25;842:6;851:1;842:10;;837:461;858:17;:24;854:1;:28;837:461;;;921:19;;;;;;;;;;;:26;;;966:10;978:11;991:5;1015:16;1032:1;1015:19;;;;;;;;;;;;;;;;;;1053:22;1076:1;1053:25;;;;;;;;;;;;;;;;;;1097:14;1112:1;1097:17;;;;;;;;;;;;;;;;;;1133:16;1150:1;1133:19;;;;;;;;;;;;;;;;;;1171:22;1194:1;1171:25;;;;;;;;;;;;;;;;;;1215:14;1230:1;1215:17;;;;;;;;;;;;;;;;;;1251;1269:1;1251:20;;;;;;;;;;;;;;;;;;921:365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;921:365:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;921:365:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;921:365:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;921:365:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;921:365:1;;;;;;;;;;;;;;;;904:11;916:1;904:14;;;;;;;;;;;;;;;;;:382;;;;;884:3;;;;;;;837:461;;;1318:13;;;;;;;;;;;:20;;;1339:8;1349:10;1361:11;1318:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1318:55:1;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1318:55:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1318:55:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1318:55:1;;;;;;;;;;;;;;;;1310:63;;386:995;;;;;;;;;;;;;;:::o;1106:124:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;249:20::-;;;;;;;;;;;;;:::o;1408:111::-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;1670:189::-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o", + "source": "pragma solidity ^0.4.24;\r\n\r\nimport \"./Ownable.sol\";\r\nimport \"./RecordFactory.sol\";\r\nimport \"./EncryptedFileFactory.sol\";\r\n\r\ncontract MedX is Ownable{\r\n \r\n EncryptedFileFactory encyptedFileFactory;\r\n RecordFactory recordFactory;\r\n\r\n constructor() public {\r\n encyptedFileFactory = new EncryptedFileFactory();\r\n recordFactory = new RecordFactory();\r\n }\r\n\r\n function createRecord(\r\n address _patient,\r\n address[] _keysOwners,\r\n bytes32[4][] _keys,\r\n bytes32[] _filePath_digest,\r\n uint8[] _filePath_hashFunction,\r\n uint8[] _filePath_size,\r\n bytes32[] _dataHash_digest,\r\n uint8[] _dataHash_hashFunction,\r\n uint8[] _dataHash_size,\r\n uint[] _encriptionMethod\r\n ) public returns (uint index) {\r\n uint[] memory attachments;\r\n\r\n for (uint i = 0; i < _encriptionMethod.length; i++) {\r\n attachments[i] = encyptedFileFactory.create(\r\n msg.sender, _keysOwners, _keys,\r\n _filePath_digest[i],\r\n _filePath_hashFunction[i],\r\n _filePath_size[i],\r\n _dataHash_digest[i],\r\n _dataHash_hashFunction[i],\r\n _dataHash_size[i],\r\n _encriptionMethod[i]\r\n );\r\n }\r\n\r\n index = recordFactory.create(_patient, msg.sender, attachments);\r\n }\r\n}", "sourcePath": "D:\\SourceCode\\MedX\\MedX\\smart-contracts\\contracts\\MedX.sol", "ast": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/MedX.sol", "exportedSymbols": { "MedX": [ - 270 + 315 ] }, - "id": 271, + "id": 316, "nodeType": "SourceUnit", "nodes": [ { - "id": 155, + "id": 191, "literals": [ "solidity", "^", @@ -148,45 +156,36 @@ "nodeType": "PragmaDirective", "src": "0:24:1" }, - { - "id": 156, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "26:33:1" - }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 157, + "id": 192, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 357, - "src": "63:23:1", + "scope": 316, + "sourceUnit": 402, + "src": "28:23:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/RecordFactory.sol", "file": "./RecordFactory.sol", - "id": 158, + "id": 193, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 423, - "src": "88:29:1", + "scope": 316, + "sourceUnit": 470, + "src": "53:29:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/EncryptedFileFactory.sol", "file": "./EncryptedFileFactory.sol", - "id": 159, + "id": 194, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 154, - "src": "119:36:1", + "scope": 316, + "sourceUnit": 190, + "src": "84:36:1", "symbolAliases": [], "unitAlias": "" }, @@ -196,59 +195,59 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 160, + "id": 195, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, - "src": "176:7:1", + "referencedDeclaration": 401, + "src": "141:7:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", + "typeIdentifier": "t_contract$_Ownable_$401", "typeString": "contract Ownable" } }, - "id": 161, + "id": 196, "nodeType": "InheritanceSpecifier", - "src": "176:7:1" + "src": "141:7:1" } ], "contractDependencies": [ - 153, - 356, - 422 + 189, + 401, + 469 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 270, + "id": 315, "linearizedBaseContracts": [ - 270, - 356 + 315, + 401 ], "name": "MedX", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 163, + "id": 198, "name": "encyptedFileFactory", "nodeType": "VariableDeclaration", - "scope": 270, - "src": "196:40:1", + "scope": 315, + "src": "161:40:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" }, "typeName": { "contractScope": null, - "id": 162, + "id": 197, "name": "EncryptedFileFactory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 153, - "src": "196:20:1", + "referencedDeclaration": 189, + "src": "161:20:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" } }, @@ -257,26 +256,26 @@ }, { "constant": false, - "id": 165, + "id": 200, "name": "recordFactory", "nodeType": "VariableDeclaration", - "scope": 270, - "src": "243:27:1", + "scope": 315, + "src": "208:27:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" }, "typeName": { "contractScope": null, - "id": 164, + "id": 199, "name": "RecordFactory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 422, - "src": "243:13:1", + "referencedDeclaration": 469, + "src": "208:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } }, @@ -285,28 +284,28 @@ }, { "body": { - "id": 180, + "id": 215, "nodeType": "Block", - "src": "300:113:1", + "src": "265:113:1", "statements": [ { "expression": { "argumentTypes": null, - "id": 172, + "id": 207, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 168, + "id": 203, "name": "encyptedFileFactory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "311:19:1", + "referencedDeclaration": 198, + "src": "276:19:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" } }, @@ -317,31 +316,31 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 170, + "id": 205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", - "src": "333:24:1", + "src": "298:24:1", "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_EncryptedFileFactory_$153_$", + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_EncryptedFileFactory_$189_$", "typeString": "function () returns (contract EncryptedFileFactory)" }, "typeName": { "contractScope": null, - "id": 169, + "id": 204, "name": "EncryptedFileFactory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 153, - "src": "337:20:1", + "referencedDeclaration": 189, + "src": "302:20:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" } } }, - "id": 171, + "id": 206, "isConstant": false, "isLValue": false, "isPure": false, @@ -349,40 +348,40 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "333:26:1", + "src": "298:26:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" } }, - "src": "311:48:1", + "src": "276:48:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", "typeString": "contract EncryptedFileFactory" } }, - "id": 173, + "id": 208, "nodeType": "ExpressionStatement", - "src": "311:48:1" + "src": "276:48:1" }, { "expression": { "argumentTypes": null, - "id": 178, + "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 174, + "id": 209, "name": "recordFactory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "370:13:1", + "referencedDeclaration": 200, + "src": "335:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } }, @@ -393,31 +392,31 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 176, + "id": 211, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", - "src": "386:17:1", + "src": "351:17:1", "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_RecordFactory_$422_$", + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_RecordFactory_$469_$", "typeString": "function () returns (contract RecordFactory)" }, "typeName": { "contractScope": null, - "id": 175, + "id": 210, "name": "RecordFactory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 422, - "src": "390:13:1", + "referencedDeclaration": 469, + "src": "355:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } } }, - "id": 177, + "id": 212, "isConstant": false, "isLValue": false, "isPure": false, @@ -425,26 +424,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "386:19:1", + "src": "351:19:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } }, - "src": "370:35:1", + "src": "335:35:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } }, - "id": 179, + "id": 214, "nodeType": "ExpressionStatement", - "src": "370:35:1" + "src": "335:35:1" } ] }, "documentation": null, - "id": 181, + "id": 216, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -452,997 +451,1073 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 166, + "id": 201, "nodeType": "ParameterList", "parameters": [], - "src": "290:2:1" + "src": "255:2:1" }, "payable": false, "returnParameters": { - "id": 167, + "id": 202, "nodeType": "ParameterList", "parameters": [], - "src": "300:0:1" + "src": "265:0:1" }, - "scope": 270, - "src": "279:134:1", + "scope": 315, + "src": "244:134:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 268, + "id": 313, "nodeType": "Block", - "src": "740:543:1", + "src": "788:593:1", "statements": [ { "assignments": [], "declarations": [ { "constant": false, - "id": 206, - "name": "keys", + "id": 255, + "name": "attachments", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "753:20:1", + "scope": 314, + "src": "799:25:1", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" }, "typeName": { "baseType": { - "id": 204, - "name": "string", + "id": 253, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "753:6:1", + "src": "799:4:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 205, + "id": 254, "length": null, "nodeType": "ArrayTypeName", - "src": "753:8:1", + "src": "799:6:1", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" } }, "value": null, "visibility": "internal" } ], - "id": 207, + "id": 256, "initialValue": null, "nodeType": "VariableDeclarationStatement", - "src": "753:20:1" + "src": "799:25:1" }, { - "expression": { + "body": { + "id": 301, + "nodeType": "Block", + "src": "889:409:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 268, + "name": "attachments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "904:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 270, + "indexExpression": { + "argumentTypes": null, + "id": 269, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "916:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "904:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 273, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "966:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "966:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 275, + "name": "_keysOwners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 221, + "src": "978:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 276, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "991:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 277, + "name": "_filePath_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1015:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 279, + "indexExpression": { + "argumentTypes": null, + "id": 278, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1032:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1015:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 280, + "name": "_filePath_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "1053:22:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 282, + "indexExpression": { + "argumentTypes": null, + "id": 281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1076:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1053:25:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 283, + "name": "_filePath_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1097:14:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 285, + "indexExpression": { + "argumentTypes": null, + "id": 284, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1112:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1097:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 286, + "name": "_dataHash_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "1133:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 288, + "indexExpression": { + "argumentTypes": null, + "id": 287, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1150:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1133:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 289, + "name": "_dataHash_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1171:22:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 291, + "indexExpression": { + "argumentTypes": null, + "id": 290, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1194:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1171:25:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 292, + "name": "_dataHash_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 294, + "indexExpression": { + "argumentTypes": null, + "id": 293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1230:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1215:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 295, + "name": "_encriptionMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 247, + "src": "1251:17:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 297, + "indexExpression": { + "argumentTypes": null, + "id": 296, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1269:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 271, + "name": "encyptedFileFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 198, + "src": "921:19:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "create", + "nodeType": "MemberAccess", + "referencedDeclaration": 157, + "src": "921:26:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr_$_t_bytes32_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_uint8_$_t_uint8_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address[] memory,bytes32[4] memory[] memory,bytes32,uint8,uint8,bytes32,uint8,uint8,uint256) external returns (uint256)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:365:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "904:382:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "904:382:1" + } + ] + }, + "condition": { "argumentTypes": null, - "id": 212, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 264, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { + "argumentTypes": null, + "id": 261, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "854:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, - "baseExpression": { + "expression": { "argumentTypes": null, - "id": 208, - "name": "keys", + "id": 262, + "name": "_encriptionMethod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "784:4:1", + "referencedDeclaration": 247, + "src": "858:17:1", "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" } }, - "id": 210, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "789:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, + "id": 263, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "784:7:1", + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "858:24:1", "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "src": "854:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 302, + "initializationExpression": { + "assignments": [ + 258 + ], + "declarations": [ + { + "constant": false, + "id": 258, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "842:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 257, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "842:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 260, + "initialValue": { "argumentTypes": null, - "id": 211, - "name": "_doctorsKey", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 187, - "src": "794:11:1", + "hexValue": "30", + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "851:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "842:10:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "884:3:1", + "subExpression": { + "argumentTypes": null, + "id": 265, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "884:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "784:21:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } + "id": 267, + "nodeType": "ExpressionStatement", + "src": "884:3:1" }, - "id": 213, - "nodeType": "ExpressionStatement", - "src": "784:21:1" + "nodeType": "ForStatement", + "src": "837:461:1" }, { "expression": { "argumentTypes": null, - "id": 218, + "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 214, - "name": "keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "816:4:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "821:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "816:7:1", + "id": 303, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "1310:5:1", "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 217, - "name": "_patientsKey", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 185, - "src": "826:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "816:22:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - }, - "id": 219, - "nodeType": "ExpressionStatement", - "src": "816:22:1" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 223, - "name": "owners", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "851:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "851:7:1", + "arguments": [ + { + "argumentTypes": null, + "id": 306, + "name": "_patient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 218, + "src": "1339:8:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 222, - "length": null, - "nodeType": "ArrayTypeName", - "src": "851:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 224, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "851:23:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 225, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "885:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 307, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "1349:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1349:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 309, + "name": "attachments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "1361:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } } - }, - "id": 227, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 226, + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "recordFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "1318:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" + } + }, + "id": 305, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "892:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "885:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "897:3:1", + "memberName": "create", + "nodeType": "MemberAccess", + "referencedDeclaration": 468, + "src": "1318:20:1", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256[] memory) external returns (uint256)" } }, - "id": 229, + "id": 310, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "897:10:1", + "names": [], + "nodeType": "FunctionCall", + "src": "1318:55:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "885:22:1", + "src": "1310:63:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 312, + "nodeType": "ExpressionStatement", + "src": "1310:63:1" + } + ] + }, + "documentation": null, + "id": 314, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "createRecord", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 218, + "name": "_patient", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "418:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "418:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 231, - "nodeType": "ExpressionStatement", - "src": "885:22:1" + "value": null, + "visibility": "internal" }, { - "expression": { - "argumentTypes": null, - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 232, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "918:6:1", + "constant": false, + "id": 221, + "name": "_keysOwners", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "445:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "445:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 220, + "length": null, + "nodeType": "ArrayTypeName", + "src": "445:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 226, + "name": "_keys", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "477:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 222, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "477:7:1", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 234, - "indexExpression": { + "id": 224, + "length": { "argumentTypes": null, - "hexValue": "31", - "id": 233, + "hexValue": "34", + "id": 223, "isConstant": false, "isLValue": false, - "isPure": true, + "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "925:1:1", + "src": "485:1:1", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": null, + "typeString": null }, - "value": "1" + "value": "4" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "918:9:1", + "nodeType": "ArrayTypeName", + "src": "477:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 235, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "930:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "930:10:1", + "id": 225, + "length": null, + "nodeType": "ArrayTypeName", + "src": "477:12:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_storage_$dyn_storage_ptr", + "typeString": "bytes32[4][]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 229, + "name": "_filePath_digest", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "506:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 227, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "506:7:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "src": "918:22:1", + "id": 228, + "length": null, + "nodeType": "ArrayTypeName", + "src": "506:9:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" } }, - "id": 238, - "nodeType": "ExpressionStatement", - "src": "918:22:1" + "value": null, + "visibility": "internal" }, { - "assignments": [ - 240 - ], - "declarations": [ - { - "constant": false, - "id": 240, - "name": "recFileIndex", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "955:17:1", - "stateVariable": false, - "storageLocation": "default", + "constant": false, + "id": 232, + "name": "_filePath_hashFunction", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "543:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" + }, + "typeName": { + "baseType": { + "id": 230, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "543:5:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 239, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "955:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 252, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 243, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "1016:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1016:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 245, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "1028:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 246, - "name": "keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "1036:4:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 247, - "name": "_record_filePath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 189, - "src": "1055:16:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 248, - "name": "_record_dataHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "1073:16:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 249, - "name": "_record_hashMethod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "1091:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 250, - "name": "_record_encriptionMethod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1111:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 241, - "name": "encyptedFileFactory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "975:19:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "create", - "nodeType": "MemberAccess", - "referencedDeclaration": 123, - "src": "975:26:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,address[] memory,string memory[] memory,string memory,string memory,uint256,uint256) external returns (uint256)" - } - }, - "id": 251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "975:171:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "955:191:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 253, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 201, - "src": "1159:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 256, - "name": "_patient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 183, - "src": "1202:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "1212:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1212:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 259, - "name": "recFileIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 240, - "src": "1237:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1262:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "1251:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 260, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1255:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 261, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1255:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1251:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 254, - "name": "recordFactory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "1167:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "create", - "nodeType": "MemberAccess", - "referencedDeclaration": 421, - "src": "1167:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (address,address,uint256,uint256[] memory) external returns (uint256)" - } - }, - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1167:108:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1159:116:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 267, - "nodeType": "ExpressionStatement", - "src": "1159:116:1" - } - ] - }, - "documentation": null, - "id": 269, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createRecordFull", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 183, - "name": "_patient", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "457:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "457:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 185, - "name": "_patientsKey", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "484:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 184, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "484:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 187, - "name": "_doctorsKey", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "514:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 186, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "514:6:1", + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 231, + "length": null, + "nodeType": "ArrayTypeName", + "src": "543:7:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -1450,25 +1525,35 @@ }, { "constant": false, - "id": 189, - "name": "_record_filePath", + "id": 235, + "name": "_filePath_size", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "543:23:1", + "scope": 314, + "src": "584:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" }, "typeName": { - "id": 188, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "543:6:1", + "baseType": { + "id": 233, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "584:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 234, + "length": null, + "nodeType": "ArrayTypeName", + "src": "584:7:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -1476,25 +1561,35 @@ }, { "constant": false, - "id": 191, - "name": "_record_dataHash", + "id": 238, + "name": "_dataHash_digest", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "577:23:1", + "scope": 314, + "src": "617:26:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" }, "typeName": { - "id": 190, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "577:6:1", + "baseType": { + "id": 236, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "617:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 237, + "length": null, + "nodeType": "ArrayTypeName", + "src": "617:9:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" } }, "value": null, @@ -1502,25 +1597,35 @@ }, { "constant": false, - "id": 193, - "name": "_record_hashMethod", + "id": 241, + "name": "_dataHash_hashFunction", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "611:23:1", + "scope": 314, + "src": "654:30:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" }, "typeName": { - "id": 192, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "611:4:1", + "baseType": { + "id": 239, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 240, + "length": null, + "nodeType": "ArrayTypeName", + "src": "654:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -1528,25 +1633,35 @@ }, { "constant": false, - "id": 195, - "name": "_record_encriptionMethod", + "id": 244, + "name": "_dataHash_size", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "645:29:1", + "scope": 314, + "src": "695:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" }, "typeName": { - "id": 194, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "645:4:1", + "baseType": { + "id": 242, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "695:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 243, + "length": null, + "nodeType": "ArrayTypeName", + "src": "695:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -1554,11 +1669,11 @@ }, { "constant": false, - "id": 198, - "name": "_attachments", + "id": 247, + "name": "_encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "685:19:1", + "scope": 314, + "src": "728:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1567,19 +1682,19 @@ }, "typeName": { "baseType": { - "id": 196, + "id": 245, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "685:4:1", + "src": "728:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 197, + "id": 246, "length": null, "nodeType": "ArrayTypeName", - "src": "685:6:1", + "src": "728:6:1", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -1589,20 +1704,20 @@ "visibility": "internal" } ], - "src": "446:265:1" + "src": "407:352:1" }, "payable": false, "returnParameters": { - "id": 202, + "id": 251, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 201, + "id": 250, "name": "index", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "728:10:1", + "scope": 314, + "src": "776:10:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1610,10 +1725,10 @@ "typeString": "uint256" }, "typeName": { - "id": 200, + "id": 249, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "728:4:1", + "src": "776:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1623,33 +1738,33 @@ "visibility": "internal" } ], - "src": "727:12:1" + "src": "775:12:1" }, - "scope": 270, - "src": "421:862:1", + "scope": 315, + "src": "386:995:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 271, - "src": "159:1127:1" + "scope": 316, + "src": "124:1260:1" } ], - "src": "0:1286:1" + "src": "0:1384:1" }, "legacyAST": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/MedX.sol", "exportedSymbols": { "MedX": [ - 270 + 315 ] }, - "id": 271, + "id": 316, "nodeType": "SourceUnit", "nodes": [ { - "id": 155, + "id": 191, "literals": [ "solidity", "^", @@ -1659,1003 +1774,1030 @@ "nodeType": "PragmaDirective", "src": "0:24:1" }, - { - "id": 156, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "26:33:1" - }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 157, + "id": 192, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 357, - "src": "63:23:1", + "scope": 316, + "sourceUnit": 402, + "src": "28:23:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/RecordFactory.sol", "file": "./RecordFactory.sol", - "id": 158, + "id": 193, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 423, - "src": "88:29:1", + "scope": 316, + "sourceUnit": 470, + "src": "53:29:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/EncryptedFileFactory.sol", "file": "./EncryptedFileFactory.sol", - "id": 159, + "id": 194, "nodeType": "ImportDirective", - "scope": 271, - "sourceUnit": 154, - "src": "119:36:1", + "scope": 316, + "sourceUnit": 190, + "src": "84:36:1", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 160, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, - "src": "176:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", - "typeString": "contract Ownable" - } - }, - "id": 161, - "nodeType": "InheritanceSpecifier", - "src": "176:7:1" - } - ], - "contractDependencies": [ - 153, - 356, - 422 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 270, - "linearizedBaseContracts": [ - 270, - 356 - ], - "name": "MedX", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 163, - "name": "encyptedFileFactory", - "nodeType": "VariableDeclaration", - "scope": 270, - "src": "196:40:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - }, - "typeName": { - "contractScope": null, - "id": 162, - "name": "EncryptedFileFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 153, - "src": "196:20:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "name": "recordFactory", - "nodeType": "VariableDeclaration", - "scope": 270, - "src": "243:27:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - }, - "typeName": { - "contractScope": null, - "id": 164, - "name": "RecordFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 422, - "src": "243:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 180, - "nodeType": "Block", - "src": "300:113:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 168, - "name": "encyptedFileFactory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "311:19:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "333:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_EncryptedFileFactory_$153_$", - "typeString": "function () returns (contract EncryptedFileFactory)" - }, - "typeName": { - "contractScope": null, - "id": 169, - "name": "EncryptedFileFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 153, - "src": "337:20:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - } - }, - "id": 171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "333:26:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - }, - "src": "311:48:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" - } - }, - "id": 173, - "nodeType": "ExpressionStatement", - "src": "311:48:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 174, - "name": "recordFactory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "370:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "386:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_RecordFactory_$422_$", - "typeString": "function () returns (contract RecordFactory)" - }, - "typeName": { - "contractScope": null, - "id": 175, - "name": "RecordFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 422, - "src": "390:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - } - }, - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "386:19:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - }, - "src": "370:35:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", - "typeString": "contract RecordFactory" - } - }, - "id": 179, - "nodeType": "ExpressionStatement", - "src": "370:35:1" - } - ] + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 195, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 401, + "src": "141:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$401", + "typeString": "contract Ownable" + } }, - "documentation": null, - "id": 181, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 166, - "nodeType": "ParameterList", - "parameters": [], - "src": "290:2:1" + "id": 196, + "nodeType": "InheritanceSpecifier", + "src": "141:7:1" + } + ], + "contractDependencies": [ + 189, + 401, + 469 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 315, + "linearizedBaseContracts": [ + 315, + 401 + ], + "name": "MedX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 198, + "name": "encyptedFileFactory", + "nodeType": "VariableDeclaration", + "scope": 315, + "src": "161:40:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" }, - "payable": false, - "returnParameters": { - "id": 167, - "nodeType": "ParameterList", - "parameters": [], - "src": "300:0:1" + "typeName": { + "contractScope": null, + "id": 197, + "name": "EncryptedFileFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 189, + "src": "161:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" + } }, - "scope": 270, - "src": "279:134:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 200, + "name": "recordFactory", + "nodeType": "VariableDeclaration", + "scope": 315, + "src": "208:27:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" + }, + "typeName": { + "contractScope": null, + "id": 199, + "name": "RecordFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 469, + "src": "208:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" + } + }, + "value": null, + "visibility": "internal" }, { "body": { - "id": 268, + "id": 215, "nodeType": "Block", - "src": "740:543:1", + "src": "265:113:1", "statements": [ - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 206, - "name": "keys", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "753:20:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 204, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "753:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 205, - "length": null, - "nodeType": "ArrayTypeName", - "src": "753:8:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 207, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "753:20:1" - }, { "expression": { "argumentTypes": null, - "id": 212, + "id": 207, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 208, - "name": "keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "784:4:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 210, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "789:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "784:7:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 211, - "name": "_doctorsKey", + "id": 203, + "name": "encyptedFileFactory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 187, - "src": "794:11:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "784:21:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - }, - "id": 213, - "nodeType": "ExpressionStatement", - "src": "784:21:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 214, - "name": "keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "816:4:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "821:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "816:7:1", + "referencedDeclaration": 198, + "src": "276:19:1", "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 217, - "name": "_patientsKey", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 185, - "src": "826:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "816:22:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - }, - "id": 219, - "nodeType": "ExpressionStatement", - "src": "816:22:1" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 223, - "name": "owners", - "nodeType": "VariableDeclaration", - "scope": 269, - "src": "851:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "851:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 222, - "length": null, - "nodeType": "ArrayTypeName", - "src": "851:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 224, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "851:23:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 225, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "885:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 227, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 226, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 205, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "892:1:1", - "subdenomination": null, + "nodeType": "NewExpression", + "src": "298:24:1", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_EncryptedFileFactory_$189_$", + "typeString": "function () returns (contract EncryptedFileFactory)" }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "885:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "897:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeName": { + "contractScope": null, + "id": 204, + "name": "EncryptedFileFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 189, + "src": "302:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" + } } }, - "id": 229, + "id": 206, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "897:10:1", + "names": [], + "nodeType": "FunctionCall", + "src": "298:26:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" } }, - "src": "885:22:1", + "src": "276:48:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" } }, - "id": 231, + "id": 208, "nodeType": "ExpressionStatement", - "src": "885:22:1" + "src": "276:48:1" }, { "expression": { "argumentTypes": null, - "id": 237, + "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 232, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "918:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 234, - "indexExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "925:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "918:9:1", + "id": 209, + "name": "recordFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "335:13:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, + "arguments": [], "expression": { - "argumentTypes": null, - "id": 235, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "930:3:1", + "argumentTypes": [], + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "351:17:1", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_RecordFactory_$469_$", + "typeString": "function () returns (contract RecordFactory)" + }, + "typeName": { + "contractScope": null, + "id": 210, + "name": "RecordFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 469, + "src": "355:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" + } } }, - "id": 236, + "id": 212, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "930:10:1", + "names": [], + "nodeType": "FunctionCall", + "src": "351:19:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" } }, - "src": "918:22:1", + "src": "335:35:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_RecordFactory_$469", + "typeString": "contract RecordFactory" } }, - "id": 238, + "id": 214, "nodeType": "ExpressionStatement", - "src": "918:22:1" - }, + "src": "335:35:1" + } + ] + }, + "documentation": null, + "id": 216, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "255:2:1" + }, + "payable": false, + "returnParameters": { + "id": 202, + "nodeType": "ParameterList", + "parameters": [], + "src": "265:0:1" + }, + "scope": 315, + "src": "244:134:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 313, + "nodeType": "Block", + "src": "788:593:1", + "statements": [ { - "assignments": [ - 240 - ], + "assignments": [], "declarations": [ { "constant": false, - "id": 240, - "name": "recFileIndex", + "id": 255, + "name": "attachments", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "955:17:1", + "scope": 314, + "src": "799:25:1", "stateVariable": false, - "storageLocation": "default", + "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" }, "typeName": { - "id": 239, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "955:4:1", + "baseType": { + "id": 253, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "799:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 254, + "length": null, + "nodeType": "ArrayTypeName", + "src": "799:6:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" } }, "value": null, "visibility": "internal" } ], - "id": 252, - "initialValue": { - "argumentTypes": null, - "arguments": [ + "id": 256, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "799:25:1" + }, + { + "body": { + "id": 301, + "nodeType": "Block", + "src": "889:409:1", + "statements": [ { - "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 243, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "1016:3:1", + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 268, + "name": "attachments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "904:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 270, + "indexExpression": { + "argumentTypes": null, + "id": 269, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "916:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "904:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 273, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "966:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "966:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 275, + "name": "_keysOwners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 221, + "src": "978:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 276, + "name": "_keys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "991:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 277, + "name": "_filePath_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1015:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 279, + "indexExpression": { + "argumentTypes": null, + "id": 278, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1032:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1015:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 280, + "name": "_filePath_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "1053:22:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 282, + "indexExpression": { + "argumentTypes": null, + "id": 281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1076:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1053:25:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 283, + "name": "_filePath_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1097:14:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 285, + "indexExpression": { + "argumentTypes": null, + "id": 284, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1112:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1097:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 286, + "name": "_dataHash_digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "1133:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 288, + "indexExpression": { + "argumentTypes": null, + "id": 287, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1150:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1133:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 289, + "name": "_dataHash_hashFunction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1171:22:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 291, + "indexExpression": { + "argumentTypes": null, + "id": 290, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1194:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1171:25:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 292, + "name": "_dataHash_size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[] memory" + } + }, + "id": 294, + "indexExpression": { + "argumentTypes": null, + "id": 293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1230:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1215:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 295, + "name": "_encriptionMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 247, + "src": "1251:17:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 297, + "indexExpression": { + "argumentTypes": null, + "id": 296, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "1269:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4] memory[] memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 271, + "name": "encyptedFileFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 198, + "src": "921:19:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EncryptedFileFactory_$189", + "typeString": "contract EncryptedFileFactory" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "create", + "nodeType": "MemberAccess", + "referencedDeclaration": 157, + "src": "921:26:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr_$_t_bytes32_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_uint8_$_t_uint8_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address[] memory,bytes32[4] memory[] memory,bytes32,uint8,uint8,bytes32,uint8,uint8,uint256) external returns (uint256)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:365:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "904:382:1", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1016:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 245, - "name": "owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "1028:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 246, - "name": "keys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "1036:4:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 247, - "name": "_record_filePath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 189, - "src": "1055:16:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 248, - "name": "_record_dataHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "1073:16:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { + "id": 300, + "nodeType": "ExpressionStatement", + "src": "904:382:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 261, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "854:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "id": 249, - "name": "_record_hashMethod", + "id": 262, + "name": "_encriptionMethod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "1091:18:1", + "referencedDeclaration": 247, + "src": "858:17:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" } }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "858:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "854:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 302, + "initializationExpression": { + "assignments": [ + 258 + ], + "declarations": [ { - "argumentTypes": null, - "id": 250, - "name": "_record_encriptionMethod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1111:24:1", + "constant": false, + "id": 258, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "842:6:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } + }, + "typeName": { + "id": 257, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "842:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" } ], + "id": 260, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "851:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "842:10:1" + }, + "loopExpression": { "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { + "argumentTypes": null, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "884:3:1", + "subExpression": { "argumentTypes": null, - "id": 241, - "name": "encyptedFileFactory", + "id": 265, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "975:19:1", + "referencedDeclaration": 258, + "src": "884:1:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_EncryptedFileFactory_$153", - "typeString": "contract EncryptedFileFactory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "create", - "nodeType": "MemberAccess", - "referencedDeclaration": 123, - "src": "975:26:1", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,address[] memory,string memory[] memory,string memory,string memory,uint256,uint256) external returns (uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "975:171:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 267, + "nodeType": "ExpressionStatement", + "src": "884:3:1" }, - "nodeType": "VariableDeclarationStatement", - "src": "955:191:1" + "nodeType": "ForStatement", + "src": "837:461:1" }, { "expression": { "argumentTypes": null, - "id": 266, + "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 253, + "id": 303, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 201, - "src": "1159:5:1", + "referencedDeclaration": 250, + "src": "1310:5:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2668,12 +2810,12 @@ "arguments": [ { "argumentTypes": null, - "id": 256, + "id": 306, "name": "_patient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 183, - "src": "1202:8:1", + "referencedDeclaration": 218, + "src": "1339:8:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2683,18 +2825,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 257, + "id": 307, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "1212:3:1", + "referencedDeclaration": 484, + "src": "1349:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 258, + "id": 308, "isConstant": false, "isLValue": false, "isPure": false, @@ -2702,7 +2844,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1212:10:1", + "src": "1349:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2710,89 +2852,14 @@ }, { "argumentTypes": null, - "id": 259, - "name": "recFileIndex", + "id": 309, + "name": "attachments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 240, - "src": "1237:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1262:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "1251:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 260, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1255:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 261, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1255:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1251:13:1", + "referencedDeclaration": 255, + "src": "1361:11:1", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } } @@ -2808,42 +2875,38 @@ "typeString": "address" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } ], "expression": { "argumentTypes": null, - "id": 254, + "id": 304, "name": "recordFactory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "1167:13:1", + "referencedDeclaration": 200, + "src": "1318:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_RecordFactory_$422", + "typeIdentifier": "t_contract$_RecordFactory_$469", "typeString": "contract RecordFactory" } }, - "id": 255, + "id": 305, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "create", "nodeType": "MemberAccess", - "referencedDeclaration": 421, - "src": "1167:20:1", + "referencedDeclaration": 468, + "src": "1318:20:1", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (address,address,uint256,uint256[] memory) external returns (uint256)" + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256[] memory) external returns (uint256)" } }, - "id": 265, + "id": 310, "isConstant": false, "isLValue": false, "isPure": false, @@ -2851,43 +2914,43 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1167:108:1", + "src": "1318:55:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1159:116:1", + "src": "1310:63:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 267, + "id": 312, "nodeType": "ExpressionStatement", - "src": "1159:116:1" + "src": "1310:63:1" } ] }, "documentation": null, - "id": 269, + "id": 314, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], - "name": "createRecordFull", + "name": "createRecord", "nodeType": "FunctionDefinition", "parameters": { - "id": 199, + "id": 248, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 183, + "id": 218, "name": "_patient", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "457:16:1", + "scope": 314, + "src": "418:16:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2895,10 +2958,10 @@ "typeString": "address" }, "typeName": { - "id": 182, + "id": 217, "name": "address", "nodeType": "ElementaryTypeName", - "src": "457:7:1", + "src": "418:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2909,25 +2972,35 @@ }, { "constant": false, - "id": 185, - "name": "_patientsKey", + "id": 221, + "name": "_keysOwners", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "484:19:1", + "scope": 314, + "src": "445:21:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, "typeName": { - "id": 184, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "484:6:1", + "baseType": { + "id": 219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "445:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 220, + "length": null, + "nodeType": "ArrayTypeName", + "src": "445:9:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, "value": null, @@ -2935,25 +3008,62 @@ }, { "constant": false, - "id": 187, - "name": "_doctorsKey", + "id": 226, + "name": "_keys", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "514:18:1", + "scope": 314, + "src": "477:18:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_memory_$dyn_memory_ptr", + "typeString": "bytes32[4][]" }, "typeName": { - "id": 186, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "514:6:1", + "baseType": { + "baseType": { + "id": 222, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "477:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 224, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "477:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$4_storage_ptr", + "typeString": "bytes32[4]" + } + }, + "id": 225, + "length": null, + "nodeType": "ArrayTypeName", + "src": "477:12:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_array$_t_bytes32_$4_storage_$dyn_storage_ptr", + "typeString": "bytes32[4][]" } }, "value": null, @@ -2961,25 +3071,35 @@ }, { "constant": false, - "id": 189, - "name": "_record_filePath", + "id": 229, + "name": "_filePath_digest", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "543:23:1", + "scope": 314, + "src": "506:26:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" }, "typeName": { - "id": 188, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "543:6:1", + "baseType": { + "id": 227, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "506:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 228, + "length": null, + "nodeType": "ArrayTypeName", + "src": "506:9:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" } }, "value": null, @@ -2987,25 +3107,35 @@ }, { "constant": false, - "id": 191, - "name": "_record_dataHash", + "id": 232, + "name": "_filePath_hashFunction", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "577:23:1", + "scope": 314, + "src": "543:30:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" }, "typeName": { - "id": 190, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "577:6:1", + "baseType": { + "id": 230, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "543:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 231, + "length": null, + "nodeType": "ArrayTypeName", + "src": "543:7:1", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -3013,25 +3143,35 @@ }, { "constant": false, - "id": 193, - "name": "_record_hashMethod", + "id": 235, + "name": "_filePath_size", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "611:23:1", + "scope": 314, + "src": "584:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" }, "typeName": { - "id": 192, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "611:4:1", + "baseType": { + "id": 233, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "584:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 234, + "length": null, + "nodeType": "ArrayTypeName", + "src": "584:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -3039,25 +3179,107 @@ }, { "constant": false, - "id": 195, - "name": "_record_encriptionMethod", + "id": 238, + "name": "_dataHash_digest", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "645:29:1", + "scope": 314, + "src": "617:26:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" }, "typeName": { - "id": 194, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "645:4:1", + "baseType": { + "id": 236, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "617:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 237, + "length": null, + "nodeType": "ArrayTypeName", + "src": "617:9:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 241, + "name": "_dataHash_hashFunction", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "654:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" + }, + "typeName": { + "baseType": { + "id": 239, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 240, + "length": null, + "nodeType": "ArrayTypeName", + "src": "654:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "name": "_dataHash_size", + "nodeType": "VariableDeclaration", + "scope": 314, + "src": "695:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_memory_ptr", + "typeString": "uint8[]" + }, + "typeName": { + "baseType": { + "id": 242, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "695:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 243, + "length": null, + "nodeType": "ArrayTypeName", + "src": "695:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint8_$dyn_storage_ptr", + "typeString": "uint8[]" } }, "value": null, @@ -3065,11 +3287,11 @@ }, { "constant": false, - "id": 198, - "name": "_attachments", + "id": 247, + "name": "_encriptionMethod", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "685:19:1", + "scope": 314, + "src": "728:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3078,19 +3300,19 @@ }, "typeName": { "baseType": { - "id": 196, + "id": 245, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "685:4:1", + "src": "728:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 197, + "id": 246, "length": null, "nodeType": "ArrayTypeName", - "src": "685:6:1", + "src": "728:6:1", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -3100,20 +3322,20 @@ "visibility": "internal" } ], - "src": "446:265:1" + "src": "407:352:1" }, "payable": false, "returnParameters": { - "id": 202, + "id": 251, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 201, + "id": 250, "name": "index", "nodeType": "VariableDeclaration", - "scope": 269, - "src": "728:10:1", + "scope": 314, + "src": "776:10:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3121,10 +3343,10 @@ "typeString": "uint256" }, "typeName": { - "id": 200, + "id": 249, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "728:4:1", + "src": "776:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3134,20 +3356,20 @@ "visibility": "internal" } ], - "src": "727:12:1" + "src": "775:12:1" }, - "scope": 270, - "src": "421:862:1", + "scope": 315, + "src": "386:995:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 271, - "src": "159:1127:1" + "scope": 316, + "src": "124:1260:1" } ], - "src": "0:1286:1" + "src": "0:1384:1" }, "compiler": { "name": "solc", @@ -3155,5 +3377,5 @@ }, "networks": {}, "schemaVersion": "2.0.1", - "updatedAt": "2018-08-23T15:01:05.597Z" + "updatedAt": "2018-08-24T14:07:59.992Z" } \ No newline at end of file diff --git a/smart-contracts/build/contracts/Ownable.json b/smart-contracts/build/contracts/Ownable.json index 6205280..1e9a44a 100644 --- a/smart-contracts/build/contracts/Ownable.json +++ b/smart-contracts/build/contracts/Ownable.json @@ -84,14 +84,14 @@ "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "exportedSymbols": { "Ownable": [ - 356 + 401 ] }, - "id": 357, + "id": 402, "nodeType": "SourceUnit", "nodes": [ { - "id": 272, + "id": 317, "literals": [ "solidity", "^", @@ -107,19 +107,19 @@ "contractKind": "contract", "documentation": "@title Ownable\r\n@dev The Ownable contract has an owner address, and provides basic authorization control\r\nfunctions, this simplifies the implementation of \"user permissions\".\r", "fullyImplemented": true, - "id": 356, + "id": 401, "linearizedBaseContracts": [ - 356 + 401 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 274, + "id": 319, "name": "owner", "nodeType": "VariableDeclaration", - "scope": 356, + "scope": 401, "src": "249:20:2", "stateVariable": true, "storageLocation": "default", @@ -128,7 +128,7 @@ "typeString": "address" }, "typeName": { - "id": 273, + "id": 318, "name": "address", "nodeType": "ElementaryTypeName", "src": "249:7:2", @@ -143,20 +143,20 @@ { "anonymous": false, "documentation": null, - "id": 278, + "id": 323, "name": "OwnershipRenounced", "nodeType": "EventDefinition", "parameters": { - "id": 277, + "id": 322, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 276, + "id": 321, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", - "scope": 278, + "scope": 323, "src": "305:29:2", "stateVariable": false, "storageLocation": "default", @@ -165,7 +165,7 @@ "typeString": "address" }, "typeName": { - "id": 275, + "id": 320, "name": "address", "nodeType": "ElementaryTypeName", "src": "305:7:2", @@ -185,20 +185,20 @@ { "anonymous": false, "documentation": null, - "id": 284, + "id": 329, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { - "id": 283, + "id": 328, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 280, + "id": 325, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", - "scope": 284, + "scope": 329, "src": "379:29:2", "stateVariable": false, "storageLocation": "default", @@ -207,7 +207,7 @@ "typeString": "address" }, "typeName": { - "id": 279, + "id": 324, "name": "address", "nodeType": "ElementaryTypeName", "src": "379:7:2", @@ -221,11 +221,11 @@ }, { "constant": false, - "id": 282, + "id": 327, "indexed": true, "name": "newOwner", "nodeType": "VariableDeclaration", - "scope": 284, + "scope": 329, "src": "419:24:2", "stateVariable": false, "storageLocation": "default", @@ -234,7 +234,7 @@ "typeString": "address" }, "typeName": { - "id": 281, + "id": 326, "name": "address", "nodeType": "ElementaryTypeName", "src": "419:7:2", @@ -253,25 +253,25 @@ }, { "body": { - "id": 292, + "id": 337, "nodeType": "Block", "src": "610:37:2", "statements": [ { "expression": { "argumentTypes": null, - "id": 290, + "id": 335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 287, + "id": 332, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "621:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -284,18 +284,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 288, + "id": 333, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, + "referencedDeclaration": 484, "src": "629:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 289, + "id": 334, "isConstant": false, "isLValue": false, "isPure": false, @@ -315,14 +315,14 @@ "typeString": "address" } }, - "id": 291, + "id": 336, "nodeType": "ExpressionStatement", "src": "621:18:2" } ] }, "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\r\naccount.\r", - "id": 293, + "id": 338, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -330,19 +330,19 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 285, + "id": 330, "nodeType": "ParameterList", "parameters": [], "src": "600:2:2" }, "payable": false, "returnParameters": { - "id": 286, + "id": 331, "nodeType": "ParameterList", "parameters": [], "src": "610:0:2" }, - "scope": 356, + "scope": 401, "src": "589:58:2", "stateMutability": "nonpayable", "superFunction": null, @@ -350,7 +350,7 @@ }, { "body": { - "id": 303, + "id": 348, "nodeType": "Block", "src": "761:59:2", "statements": [ @@ -364,7 +364,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 299, + "id": 344, "isConstant": false, "isLValue": false, "isPure": false, @@ -373,18 +373,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 296, + "id": 341, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, + "referencedDeclaration": 484, "src": "780:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 297, + "id": 342, "isConstant": false, "isLValue": false, "isPure": false, @@ -402,11 +402,11 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 298, + "id": 343, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "794:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -427,21 +427,21 @@ "typeString": "bool" } ], - "id": 295, + "id": 340, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 440, - 441 + 487, + 488 ], - "referencedDeclaration": 440, + "referencedDeclaration": 487, "src": "772:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 300, + "id": 345, "isConstant": false, "isLValue": false, "isPure": false, @@ -455,23 +455,23 @@ "typeString": "tuple()" } }, - "id": 301, + "id": 346, "nodeType": "ExpressionStatement", "src": "772:28:2" }, { - "id": 302, + "id": 347, "nodeType": "PlaceholderStatement", "src": "811:1:2" } ] }, "documentation": "@dev Throws if called by any account other than the owner.\r", - "id": 304, + "id": 349, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { - "id": 294, + "id": 339, "nodeType": "ParameterList", "parameters": [], "src": "758:2:2" @@ -481,7 +481,7 @@ }, { "body": { - "id": 319, + "id": 364, "nodeType": "Block", "src": "1152:78:2", "statements": [ @@ -491,11 +491,11 @@ "arguments": [ { "argumentTypes": null, - "id": 310, + "id": 355, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1187:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -510,18 +510,18 @@ "typeString": "address" } ], - "id": 309, + "id": 354, "name": "OwnershipRenounced", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 278, + "referencedDeclaration": 323, "src": "1168:18:2", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 311, + "id": 356, "isConstant": false, "isLValue": false, "isPure": false, @@ -535,25 +535,25 @@ "typeString": "tuple()" } }, - "id": 312, + "id": 357, "nodeType": "EmitStatement", "src": "1163:30:2" }, { "expression": { "argumentTypes": null, - "id": 317, + "id": 362, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 313, + "id": 358, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1204:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -568,7 +568,7 @@ { "argumentTypes": null, "hexValue": "30", - "id": 315, + "id": 360, "isConstant": false, "isLValue": false, "isPure": true, @@ -591,7 +591,7 @@ "typeString": "int_const 0" } ], - "id": 314, + "id": 359, "isConstant": false, "isLValue": false, "isPure": true, @@ -604,7 +604,7 @@ }, "typeName": "address" }, - "id": 316, + "id": 361, "isConstant": false, "isLValue": false, "isPure": true, @@ -624,28 +624,28 @@ "typeString": "address" } }, - "id": 318, + "id": 363, "nodeType": "ExpressionStatement", "src": "1204:18:2" } ] }, "documentation": "@dev Allows the current owner to relinquish control of the contract.\r\n@notice Renouncing to ownership will leave the contract without an owner.\r\nIt will not be possible to call the functions with the `onlyOwner`\r\nmodifier anymore.\r", - "id": 320, + "id": 365, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 307, + "id": 352, "modifierName": { "argumentTypes": null, - "id": 306, + "id": 351, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, + "referencedDeclaration": 349, "src": "1142:9:2", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", @@ -659,19 +659,19 @@ "name": "renounceOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 305, + "id": 350, "nodeType": "ParameterList", "parameters": [], "src": "1132:2:2" }, "payable": false, "returnParameters": { - "id": 308, + "id": 353, "nodeType": "ParameterList", "parameters": [], "src": "1152:0:2" }, - "scope": 356, + "scope": 401, "src": "1106:124:2", "stateMutability": "nonpayable", "superFunction": null, @@ -679,7 +679,7 @@ }, { "body": { - "id": 331, + "id": 376, "nodeType": "Block", "src": "1471:48:2", "statements": [ @@ -689,11 +689,11 @@ "arguments": [ { "argumentTypes": null, - "id": 328, + "id": 373, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 322, + "referencedDeclaration": 367, "src": "1501:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -708,18 +708,18 @@ "typeString": "address" } ], - "id": 327, + "id": 372, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 355, + "referencedDeclaration": 400, "src": "1482:18:2", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 329, + "id": 374, "isConstant": false, "isLValue": false, "isPure": false, @@ -733,28 +733,28 @@ "typeString": "tuple()" } }, - "id": 330, + "id": 375, "nodeType": "ExpressionStatement", "src": "1482:29:2" } ] }, "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\r\n@param _newOwner The address to transfer ownership to.\r", - "id": 332, + "id": 377, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 325, + "id": 370, "modifierName": { "argumentTypes": null, - "id": 324, + "id": 369, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, + "referencedDeclaration": 349, "src": "1461:9:2", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", @@ -768,15 +768,15 @@ "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 323, + "id": 368, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 322, + "id": 367, "name": "_newOwner", "nodeType": "VariableDeclaration", - "scope": 332, + "scope": 377, "src": "1435:17:2", "stateVariable": false, "storageLocation": "default", @@ -785,7 +785,7 @@ "typeString": "address" }, "typeName": { - "id": 321, + "id": 366, "name": "address", "nodeType": "ElementaryTypeName", "src": "1435:7:2", @@ -802,12 +802,12 @@ }, "payable": false, "returnParameters": { - "id": 326, + "id": 371, "nodeType": "ParameterList", "parameters": [], "src": "1471:0:2" }, - "scope": 356, + "scope": 401, "src": "1408:111:2", "stateMutability": "nonpayable", "superFunction": null, @@ -815,7 +815,7 @@ }, { "body": { - "id": 354, + "id": 399, "nodeType": "Block", "src": "1726:133:2", "statements": [ @@ -829,18 +829,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 342, + "id": 387, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 338, + "id": 383, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1745:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -855,7 +855,7 @@ { "argumentTypes": null, "hexValue": "30", - "id": 340, + "id": 385, "isConstant": false, "isLValue": false, "isPure": true, @@ -878,7 +878,7 @@ "typeString": "int_const 0" } ], - "id": 339, + "id": 384, "isConstant": false, "isLValue": false, "isPure": true, @@ -891,7 +891,7 @@ }, "typeName": "address" }, - "id": 341, + "id": 386, "isConstant": false, "isLValue": false, "isPure": true, @@ -919,21 +919,21 @@ "typeString": "bool" } ], - "id": 337, + "id": 382, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 440, - 441 + 487, + 488 ], - "referencedDeclaration": 440, + "referencedDeclaration": 487, "src": "1737:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 343, + "id": 388, "isConstant": false, "isLValue": false, "isPure": false, @@ -947,7 +947,7 @@ "typeString": "tuple()" } }, - "id": 344, + "id": 389, "nodeType": "ExpressionStatement", "src": "1737:32:2" }, @@ -957,11 +957,11 @@ "arguments": [ { "argumentTypes": null, - "id": 346, + "id": 391, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1806:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -970,11 +970,11 @@ }, { "argumentTypes": null, - "id": 347, + "id": 392, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1813:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -993,18 +993,18 @@ "typeString": "address" } ], - "id": 345, + "id": 390, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 284, + "referencedDeclaration": 329, "src": "1785:20:2", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, - "id": 348, + "id": 393, "isConstant": false, "isLValue": false, "isPure": false, @@ -1018,25 +1018,25 @@ "typeString": "tuple()" } }, - "id": 349, + "id": 394, "nodeType": "EmitStatement", "src": "1780:43:2" }, { "expression": { "argumentTypes": null, - "id": 352, + "id": 397, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 350, + "id": 395, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1834:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1047,11 +1047,11 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 351, + "id": 396, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1842:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1064,14 +1064,14 @@ "typeString": "address" } }, - "id": 353, + "id": 398, "nodeType": "ExpressionStatement", "src": "1834:17:2" } ] }, "documentation": "@dev Transfers control of the contract to a newOwner.\r\n@param _newOwner The address to transfer ownership to.\r", - "id": 355, + "id": 400, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -1079,15 +1079,15 @@ "name": "_transferOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 335, + "id": 380, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 334, + "id": 379, "name": "_newOwner", "nodeType": "VariableDeclaration", - "scope": 355, + "scope": 400, "src": "1698:17:2", "stateVariable": false, "storageLocation": "default", @@ -1096,7 +1096,7 @@ "typeString": "address" }, "typeName": { - "id": 333, + "id": 378, "name": "address", "nodeType": "ElementaryTypeName", "src": "1698:7:2", @@ -1113,19 +1113,19 @@ }, "payable": false, "returnParameters": { - "id": 336, + "id": 381, "nodeType": "ParameterList", "parameters": [], "src": "1726:0:2" }, - "scope": 356, + "scope": 401, "src": "1670:189:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], - "scope": 357, + "scope": 402, "src": "225:1637:2" } ], @@ -1135,14 +1135,14 @@ "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "exportedSymbols": { "Ownable": [ - 356 + 401 ] }, - "id": 357, + "id": 402, "nodeType": "SourceUnit", "nodes": [ { - "id": 272, + "id": 317, "literals": [ "solidity", "^", @@ -1158,19 +1158,19 @@ "contractKind": "contract", "documentation": "@title Ownable\r\n@dev The Ownable contract has an owner address, and provides basic authorization control\r\nfunctions, this simplifies the implementation of \"user permissions\".\r", "fullyImplemented": true, - "id": 356, + "id": 401, "linearizedBaseContracts": [ - 356 + 401 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 274, + "id": 319, "name": "owner", "nodeType": "VariableDeclaration", - "scope": 356, + "scope": 401, "src": "249:20:2", "stateVariable": true, "storageLocation": "default", @@ -1179,7 +1179,7 @@ "typeString": "address" }, "typeName": { - "id": 273, + "id": 318, "name": "address", "nodeType": "ElementaryTypeName", "src": "249:7:2", @@ -1194,20 +1194,20 @@ { "anonymous": false, "documentation": null, - "id": 278, + "id": 323, "name": "OwnershipRenounced", "nodeType": "EventDefinition", "parameters": { - "id": 277, + "id": 322, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 276, + "id": 321, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", - "scope": 278, + "scope": 323, "src": "305:29:2", "stateVariable": false, "storageLocation": "default", @@ -1216,7 +1216,7 @@ "typeString": "address" }, "typeName": { - "id": 275, + "id": 320, "name": "address", "nodeType": "ElementaryTypeName", "src": "305:7:2", @@ -1236,20 +1236,20 @@ { "anonymous": false, "documentation": null, - "id": 284, + "id": 329, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { - "id": 283, + "id": 328, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 280, + "id": 325, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", - "scope": 284, + "scope": 329, "src": "379:29:2", "stateVariable": false, "storageLocation": "default", @@ -1258,7 +1258,7 @@ "typeString": "address" }, "typeName": { - "id": 279, + "id": 324, "name": "address", "nodeType": "ElementaryTypeName", "src": "379:7:2", @@ -1272,11 +1272,11 @@ }, { "constant": false, - "id": 282, + "id": 327, "indexed": true, "name": "newOwner", "nodeType": "VariableDeclaration", - "scope": 284, + "scope": 329, "src": "419:24:2", "stateVariable": false, "storageLocation": "default", @@ -1285,7 +1285,7 @@ "typeString": "address" }, "typeName": { - "id": 281, + "id": 326, "name": "address", "nodeType": "ElementaryTypeName", "src": "419:7:2", @@ -1304,25 +1304,25 @@ }, { "body": { - "id": 292, + "id": 337, "nodeType": "Block", "src": "610:37:2", "statements": [ { "expression": { "argumentTypes": null, - "id": 290, + "id": 335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 287, + "id": 332, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "621:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1335,18 +1335,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 288, + "id": 333, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, + "referencedDeclaration": 484, "src": "629:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 289, + "id": 334, "isConstant": false, "isLValue": false, "isPure": false, @@ -1366,14 +1366,14 @@ "typeString": "address" } }, - "id": 291, + "id": 336, "nodeType": "ExpressionStatement", "src": "621:18:2" } ] }, "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\r\naccount.\r", - "id": 293, + "id": 338, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -1381,19 +1381,19 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 285, + "id": 330, "nodeType": "ParameterList", "parameters": [], "src": "600:2:2" }, "payable": false, "returnParameters": { - "id": 286, + "id": 331, "nodeType": "ParameterList", "parameters": [], "src": "610:0:2" }, - "scope": 356, + "scope": 401, "src": "589:58:2", "stateMutability": "nonpayable", "superFunction": null, @@ -1401,7 +1401,7 @@ }, { "body": { - "id": 303, + "id": 348, "nodeType": "Block", "src": "761:59:2", "statements": [ @@ -1415,7 +1415,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 299, + "id": 344, "isConstant": false, "isLValue": false, "isPure": false, @@ -1424,18 +1424,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 296, + "id": 341, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, + "referencedDeclaration": 484, "src": "780:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 297, + "id": 342, "isConstant": false, "isLValue": false, "isPure": false, @@ -1453,11 +1453,11 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 298, + "id": 343, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "794:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1478,21 +1478,21 @@ "typeString": "bool" } ], - "id": 295, + "id": 340, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 440, - 441 + 487, + 488 ], - "referencedDeclaration": 440, + "referencedDeclaration": 487, "src": "772:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 300, + "id": 345, "isConstant": false, "isLValue": false, "isPure": false, @@ -1506,23 +1506,23 @@ "typeString": "tuple()" } }, - "id": 301, + "id": 346, "nodeType": "ExpressionStatement", "src": "772:28:2" }, { - "id": 302, + "id": 347, "nodeType": "PlaceholderStatement", "src": "811:1:2" } ] }, "documentation": "@dev Throws if called by any account other than the owner.\r", - "id": 304, + "id": 349, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { - "id": 294, + "id": 339, "nodeType": "ParameterList", "parameters": [], "src": "758:2:2" @@ -1532,7 +1532,7 @@ }, { "body": { - "id": 319, + "id": 364, "nodeType": "Block", "src": "1152:78:2", "statements": [ @@ -1542,11 +1542,11 @@ "arguments": [ { "argumentTypes": null, - "id": 310, + "id": 355, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1187:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1561,18 +1561,18 @@ "typeString": "address" } ], - "id": 309, + "id": 354, "name": "OwnershipRenounced", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 278, + "referencedDeclaration": 323, "src": "1168:18:2", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 311, + "id": 356, "isConstant": false, "isLValue": false, "isPure": false, @@ -1586,25 +1586,25 @@ "typeString": "tuple()" } }, - "id": 312, + "id": 357, "nodeType": "EmitStatement", "src": "1163:30:2" }, { "expression": { "argumentTypes": null, - "id": 317, + "id": 362, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 313, + "id": 358, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1204:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1619,7 +1619,7 @@ { "argumentTypes": null, "hexValue": "30", - "id": 315, + "id": 360, "isConstant": false, "isLValue": false, "isPure": true, @@ -1642,7 +1642,7 @@ "typeString": "int_const 0" } ], - "id": 314, + "id": 359, "isConstant": false, "isLValue": false, "isPure": true, @@ -1655,7 +1655,7 @@ }, "typeName": "address" }, - "id": 316, + "id": 361, "isConstant": false, "isLValue": false, "isPure": true, @@ -1675,28 +1675,28 @@ "typeString": "address" } }, - "id": 318, + "id": 363, "nodeType": "ExpressionStatement", "src": "1204:18:2" } ] }, "documentation": "@dev Allows the current owner to relinquish control of the contract.\r\n@notice Renouncing to ownership will leave the contract without an owner.\r\nIt will not be possible to call the functions with the `onlyOwner`\r\nmodifier anymore.\r", - "id": 320, + "id": 365, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 307, + "id": 352, "modifierName": { "argumentTypes": null, - "id": 306, + "id": 351, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, + "referencedDeclaration": 349, "src": "1142:9:2", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", @@ -1710,19 +1710,19 @@ "name": "renounceOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 305, + "id": 350, "nodeType": "ParameterList", "parameters": [], "src": "1132:2:2" }, "payable": false, "returnParameters": { - "id": 308, + "id": 353, "nodeType": "ParameterList", "parameters": [], "src": "1152:0:2" }, - "scope": 356, + "scope": 401, "src": "1106:124:2", "stateMutability": "nonpayable", "superFunction": null, @@ -1730,7 +1730,7 @@ }, { "body": { - "id": 331, + "id": 376, "nodeType": "Block", "src": "1471:48:2", "statements": [ @@ -1740,11 +1740,11 @@ "arguments": [ { "argumentTypes": null, - "id": 328, + "id": 373, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 322, + "referencedDeclaration": 367, "src": "1501:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1759,18 +1759,18 @@ "typeString": "address" } ], - "id": 327, + "id": 372, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 355, + "referencedDeclaration": 400, "src": "1482:18:2", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 329, + "id": 374, "isConstant": false, "isLValue": false, "isPure": false, @@ -1784,28 +1784,28 @@ "typeString": "tuple()" } }, - "id": 330, + "id": 375, "nodeType": "ExpressionStatement", "src": "1482:29:2" } ] }, "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\r\n@param _newOwner The address to transfer ownership to.\r", - "id": 332, + "id": 377, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 325, + "id": 370, "modifierName": { "argumentTypes": null, - "id": 324, + "id": 369, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, + "referencedDeclaration": 349, "src": "1461:9:2", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", @@ -1819,15 +1819,15 @@ "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 323, + "id": 368, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 322, + "id": 367, "name": "_newOwner", "nodeType": "VariableDeclaration", - "scope": 332, + "scope": 377, "src": "1435:17:2", "stateVariable": false, "storageLocation": "default", @@ -1836,7 +1836,7 @@ "typeString": "address" }, "typeName": { - "id": 321, + "id": 366, "name": "address", "nodeType": "ElementaryTypeName", "src": "1435:7:2", @@ -1853,12 +1853,12 @@ }, "payable": false, "returnParameters": { - "id": 326, + "id": 371, "nodeType": "ParameterList", "parameters": [], "src": "1471:0:2" }, - "scope": 356, + "scope": 401, "src": "1408:111:2", "stateMutability": "nonpayable", "superFunction": null, @@ -1866,7 +1866,7 @@ }, { "body": { - "id": 354, + "id": 399, "nodeType": "Block", "src": "1726:133:2", "statements": [ @@ -1880,18 +1880,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 342, + "id": 387, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 338, + "id": 383, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1745:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1906,7 +1906,7 @@ { "argumentTypes": null, "hexValue": "30", - "id": 340, + "id": 385, "isConstant": false, "isLValue": false, "isPure": true, @@ -1929,7 +1929,7 @@ "typeString": "int_const 0" } ], - "id": 339, + "id": 384, "isConstant": false, "isLValue": false, "isPure": true, @@ -1942,7 +1942,7 @@ }, "typeName": "address" }, - "id": 341, + "id": 386, "isConstant": false, "isLValue": false, "isPure": true, @@ -1970,21 +1970,21 @@ "typeString": "bool" } ], - "id": 337, + "id": 382, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 440, - 441 + 487, + 488 ], - "referencedDeclaration": 440, + "referencedDeclaration": 487, "src": "1737:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 343, + "id": 388, "isConstant": false, "isLValue": false, "isPure": false, @@ -1998,7 +1998,7 @@ "typeString": "tuple()" } }, - "id": 344, + "id": 389, "nodeType": "ExpressionStatement", "src": "1737:32:2" }, @@ -2008,11 +2008,11 @@ "arguments": [ { "argumentTypes": null, - "id": 346, + "id": 391, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1806:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2021,11 +2021,11 @@ }, { "argumentTypes": null, - "id": 347, + "id": 392, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1813:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2044,18 +2044,18 @@ "typeString": "address" } ], - "id": 345, + "id": 390, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 284, + "referencedDeclaration": 329, "src": "1785:20:2", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, - "id": 348, + "id": 393, "isConstant": false, "isLValue": false, "isPure": false, @@ -2069,25 +2069,25 @@ "typeString": "tuple()" } }, - "id": 349, + "id": 394, "nodeType": "EmitStatement", "src": "1780:43:2" }, { "expression": { "argumentTypes": null, - "id": 352, + "id": 397, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 350, + "id": 395, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, + "referencedDeclaration": 319, "src": "1834:5:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2098,11 +2098,11 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 351, + "id": 396, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 334, + "referencedDeclaration": 379, "src": "1842:9:2", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2115,14 +2115,14 @@ "typeString": "address" } }, - "id": 353, + "id": 398, "nodeType": "ExpressionStatement", "src": "1834:17:2" } ] }, "documentation": "@dev Transfers control of the contract to a newOwner.\r\n@param _newOwner The address to transfer ownership to.\r", - "id": 355, + "id": 400, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2130,15 +2130,15 @@ "name": "_transferOwnership", "nodeType": "FunctionDefinition", "parameters": { - "id": 335, + "id": 380, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 334, + "id": 379, "name": "_newOwner", "nodeType": "VariableDeclaration", - "scope": 355, + "scope": 400, "src": "1698:17:2", "stateVariable": false, "storageLocation": "default", @@ -2147,7 +2147,7 @@ "typeString": "address" }, "typeName": { - "id": 333, + "id": 378, "name": "address", "nodeType": "ElementaryTypeName", "src": "1698:7:2", @@ -2164,19 +2164,19 @@ }, "payable": false, "returnParameters": { - "id": 336, + "id": 381, "nodeType": "ParameterList", "parameters": [], "src": "1726:0:2" }, - "scope": 356, + "scope": 401, "src": "1670:189:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], - "scope": 357, + "scope": 402, "src": "225:1637:2" } ], @@ -2188,5 +2188,5 @@ }, "networks": {}, "schemaVersion": "2.0.1", - "updatedAt": "2018-08-23T15:01:05.599Z" + "updatedAt": "2018-08-24T14:07:59.987Z" } \ No newline at end of file diff --git a/smart-contracts/build/contracts/RecordFactory.json b/smart-contracts/build/contracts/RecordFactory.json index 57f3b31..c925345 100644 --- a/smart-contracts/build/contracts/RecordFactory.json +++ b/smart-contracts/build/contracts/RecordFactory.json @@ -100,10 +100,6 @@ "name": "_doctor", "type": "address" }, - { - "name": "_record", - "type": "uint256" - }, { "name": "_attachments", "type": "uint256[]" @@ -121,24 +117,24 @@ "type": "function" } ], - "bytecode": "0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106ff806100536000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635cdb868414610067578063715018a61461012b5780638da5cb5b14610142578063f2fde38b14610199575b600080fd5b34801561007357600080fd5b50610115600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101dc565b6040518082815260200191505060405180910390f35b34801561013757600080fd5b506101406103d9565b005b34801561014e57600080fd5b506101576104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a557600080fd5b506101da600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610500565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561023957600080fd5b60016080604051908101604052808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152509080600181540180825580915050906001820390600052602060002090600402016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003019080519060200190610368929190610661565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a4949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561043457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055b57600080fd5b61056481610567565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105a357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b82805482825590600052602060002090810192821561069d579160200282015b8281111561069c578251825591602001919060010190610681565b5b5090506106aa91906106ae565b5090565b6106d091905b808211156106cc5760008160009055506001016106b4565b5090565b905600a165627a7a72305820b218f79c29ad4e6310d452d36523f704940e7dc5e9dc14369534fed0796d8c770029", - "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635cdb868414610067578063715018a61461012b5780638da5cb5b14610142578063f2fde38b14610199575b600080fd5b34801561007357600080fd5b50610115600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101dc565b6040518082815260200191505060405180910390f35b34801561013757600080fd5b506101406103d9565b005b34801561014e57600080fd5b506101576104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a557600080fd5b506101da600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610500565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561023957600080fd5b60016080604051908101604052808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152509080600181540180825580915050906001820390600052602060002090600402016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003019080519060200190610368929190610661565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a4949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561043457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055b57600080fd5b61056481610567565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105a357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b82805482825590600052602060002090810192821561069d579160200282015b8281111561069c578251825591602001919060010190610681565b5b5090506106aa91906106ae565b5090565b6106d091905b808211156106cc5760008160009055506001016106b4565b5090565b905600a165627a7a72305820b218f79c29ad4e6310d452d36523f704940e7dc5e9dc14369534fed0796d8c770029", - "sourceMap": "55:730:3:-;;;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;55:730:3;;;;;;", - "deployedSourceMap": "55:730:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;348:432;;8:9:-1;5:2;;;30:1;27;20:12;5:2;348:432:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;249:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;1408:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;348:432:3;503:10;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;536:7:3;549:151;;;;;;;;;580:8;549:151;;;;;;611:7;549:151;;;;;;641:7;549:151;;;;676:12;549:151;;;536:165;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;536:165:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;528:173;;712:8;;;;;;;;766:5;754:10;736:36;;744:8;736:36;;;;;;;;;;;;348:432;;;;;;:::o;1106:124:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;249:20::-;;;;;;;;;;;;;:::o;1408:111::-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;1670:189::-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o;55:730:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.4.24;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\ncontract RecordFactory is Ownable {\r\n\r\n struct Record {\r\n address patient;\r\n address doctor;\r\n\r\n uint record;\r\n uint[] attachments;\r\n }\r\n\r\n Record[] records;\r\n\r\n event Created(address indexed patient,address indexed doctor, uint indexed record);\r\n\r\n function create(\r\n address _patient,\r\n address _doctor,\r\n uint _record,\r\n uint[] _attachments\r\n ) public onlyOwner returns (uint index) {\r\n\r\n index = records.push(Record({\r\n patient: _patient,\r\n doctor: _doctor,\r\n record: _record,\r\n attachments: _attachments\r\n }));\r\n index --;\r\n emit Created(_patient, msg.sender, index);\r\n }\r\n\r\n}\r\n", + "bytecode": "0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106f4806100536000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632bfdced714610067578063715018a6146101215780638da5cb5b14610138578063f2fde38b1461018f575b600080fd5b34801561007357600080fd5b5061010b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101d2565b6040518082815260200191505060405180910390f35b34801561012d57600080fd5b506101366103ce565b005b34801561014457600080fd5b5061014d6104d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104f5565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561022f57600080fd5b6000825111151561023f57600080fd5b60016060604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001848152509080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201908051906020019061035e929190610656565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a49392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561042957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055057600080fd5b6105598161055c565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561059857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054828255906000526020600020908101928215610692579160200282015b82811115610691578251825591602001919060010190610676565b5b50905061069f91906106a3565b5090565b6106c591905b808211156106c15760008160009055506001016106a9565b5090565b905600a165627a7a7230582006ce36e7f53d677453c96519765601ccb18e04f0ddfb615ea75d37979f320fb00029", + "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632bfdced714610067578063715018a6146101215780638da5cb5b14610138578063f2fde38b1461018f575b600080fd5b34801561007357600080fd5b5061010b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101d2565b6040518082815260200191505060405180910390f35b34801561012d57600080fd5b506101366103ce565b005b34801561014457600080fd5b5061014d6104d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104f5565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561022f57600080fd5b6000825111151561023f57600080fd5b60016060604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001848152509080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201908051906020019061035e929190610656565b5050509050808060019003915050803373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a260405160405180910390a49392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561042957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561055057600080fd5b6105598161055c565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561059857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054828255906000526020600020908101928215610692579160200282015b82811115610691578251825591602001919060010190610676565b5b50905061069f91906106a3565b5090565b6106c591905b808211156106c15760008160009055506001016106a9565b5090565b905600a165627a7a7230582006ce36e7f53d677453c96519765601ccb18e04f0ddfb615ea75d37979f320fb00029", + "sourceMap": "55:696:3:-;;;629:10:2;621:5;;:18;;;;;;;;;;;;;;;;;;55:696:3;;;;;;", + "deployedSourceMap": "55:696:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;324:422;;8:9:-1;5:2;;;30:1;27;20:12;5:2;324:422:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:124:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:124:2;;;;;;249:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;249:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;1408:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;324:422:3;456:10;794:5:2;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;509:1:3;487:12;:19;:23;479:32;;;;;;;;532:7;545:121;;;;;;;;;576:8;545:121;;;;;;607:7;545:121;;;;;;642:12;545:121;;;532:135;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;532:135:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;524:143;;678:8;;;;;;;;732:5;720:10;702:36;;710:8;702:36;;;;;;;;;;;;324:422;;;;;:::o;1106:124:2:-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1187:5;;;;;;;;;;;1168:25;;;;;;;;;;;;1220:1;1204:5;;:18;;;;;;;;;;;;;;;;;;1106:124::o;249:20::-;;;;;;;;;;;;;:::o;1408:111::-;794:5;;;;;;;;;;;780:19;;:10;:19;;;772:28;;;;;;;;1482:29;1501:9;1482:18;:29::i;:::-;1408:111;:::o;1670:189::-;1766:1;1745:23;;:9;:23;;;;1737:32;;;;;;;;1813:9;1785:38;;1806:5;;;;;;;;;;;1785:38;;;;;;;;;;;;1842:9;1834:5;;:17;;;;;;;;;;;;;;;;;;1670:189;:::o;55:696:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.24;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\ncontract RecordFactory is Ownable {\r\n\r\n struct Record {\r\n address patient;\r\n address doctor;\r\n uint[] attachments;\r\n }\r\n\r\n Record[] records;\r\n\r\n event Created(address indexed patient,address indexed doctor, uint indexed record);\r\n\r\n function create(\r\n address _patient,\r\n address _doctor,\r\n uint[] _attachments\r\n ) public onlyOwner returns (uint index) {\r\n require(_attachments.length > 0);\r\n\r\n index = records.push(Record({\r\n patient: _patient,\r\n doctor: _doctor,\r\n attachments: _attachments\r\n }));\r\n index --;\r\n emit Created(_patient, msg.sender, index);\r\n }\r\n\r\n}\r\n", "sourcePath": "D:\\SourceCode\\MedX\\MedX\\smart-contracts\\contracts\\RecordFactory.sol", "ast": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/RecordFactory.sol", "exportedSymbols": { "RecordFactory": [ - 422 + 469 ] }, - "id": 423, + "id": 470, "nodeType": "SourceUnit", "nodes": [ { - "id": 358, + "id": 403, "literals": [ "solidity", "^", @@ -151,10 +147,10 @@ { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 359, + "id": 404, "nodeType": "ImportDirective", - "scope": 423, - "sourceUnit": 357, + "scope": 470, + "sourceUnit": 402, "src": "28:23:3", "symbolAliases": [], "unitAlias": "" @@ -165,45 +161,45 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 360, + "id": 405, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, + "referencedDeclaration": 401, "src": "81:7:3", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", + "typeIdentifier": "t_contract$_Ownable_$401", "typeString": "contract Ownable" } }, - "id": 361, + "id": 406, "nodeType": "InheritanceSpecifier", "src": "81:7:3" } ], "contractDependencies": [ - 356 + 401 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 422, + "id": 469, "linearizedBaseContracts": [ - 422, - 356 + 469, + 401 ], "name": "RecordFactory", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "RecordFactory.Record", - "id": 371, + "id": 414, "members": [ { "constant": false, - "id": 363, + "id": 408, "name": "patient", "nodeType": "VariableDeclaration", - "scope": 371, + "scope": 414, "src": "123:15:3", "stateVariable": false, "storageLocation": "default", @@ -212,7 +208,7 @@ "typeString": "address" }, "typeName": { - "id": 362, + "id": 407, "name": "address", "nodeType": "ElementaryTypeName", "src": "123:7:3", @@ -226,10 +222,10 @@ }, { "constant": false, - "id": 365, + "id": 410, "name": "doctor", "nodeType": "VariableDeclaration", - "scope": 371, + "scope": 414, "src": "149:14:3", "stateVariable": false, "storageLocation": "default", @@ -238,7 +234,7 @@ "typeString": "address" }, "typeName": { - "id": 364, + "id": 409, "name": "address", "nodeType": "ElementaryTypeName", "src": "149:7:3", @@ -252,37 +248,11 @@ }, { "constant": false, - "id": 367, - "name": "record", - "nodeType": "VariableDeclaration", - "scope": 371, - "src": "176:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 366, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "176:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 370, + "id": 413, "name": "attachments", "nodeType": "VariableDeclaration", - "scope": 371, - "src": "198:18:3", + "scope": 414, + "src": "174:18:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -291,19 +261,19 @@ }, "typeName": { "baseType": { - "id": 368, + "id": 411, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "198:4:3", + "src": "174:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 369, + "id": 412, "length": null, "nodeType": "ArrayTypeName", - "src": "198:6:3", + "src": "174:6:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -315,42 +285,42 @@ ], "name": "Record", "nodeType": "StructDefinition", - "scope": 422, - "src": "98:126:3", + "scope": 469, + "src": "98:102:3", "visibility": "public" }, { "constant": false, - "id": 374, + "id": 417, "name": "records", "nodeType": "VariableDeclaration", - "scope": 422, - "src": "232:16:3", + "scope": 469, + "src": "208:16:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage", "typeString": "struct RecordFactory.Record[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 372, + "id": 415, "name": "Record", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "232:6:3", + "referencedDeclaration": 414, + "src": "208:6:3", "typeDescriptions": { - "typeIdentifier": "t_struct$_Record_$371_storage_ptr", + "typeIdentifier": "t_struct$_Record_$414_storage_ptr", "typeString": "struct RecordFactory.Record" } }, - "id": 373, + "id": 416, "length": null, "nodeType": "ArrayTypeName", - "src": "232:8:3", + "src": "208:8:3", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage_ptr", "typeString": "struct RecordFactory.Record[]" } }, @@ -360,21 +330,21 @@ { "anonymous": false, "documentation": null, - "id": 382, + "id": 425, "name": "Created", "nodeType": "EventDefinition", "parameters": { - "id": 381, + "id": 424, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 376, + "id": 419, "indexed": true, "name": "patient", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "271:23:3", + "scope": 425, + "src": "247:23:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -382,10 +352,10 @@ "typeString": "address" }, "typeName": { - "id": 375, + "id": 418, "name": "address", "nodeType": "ElementaryTypeName", - "src": "271:7:3", + "src": "247:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -396,12 +366,12 @@ }, { "constant": false, - "id": 378, + "id": 421, "indexed": true, "name": "doctor", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "295:22:3", + "scope": 425, + "src": "271:22:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -409,10 +379,10 @@ "typeString": "address" }, "typeName": { - "id": 377, + "id": 420, "name": "address", "nodeType": "ElementaryTypeName", - "src": "295:7:3", + "src": "271:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -423,12 +393,12 @@ }, { "constant": false, - "id": 380, + "id": 423, "indexed": true, "name": "record", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "319:19:3", + "scope": 425, + "src": "295:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -436,10 +406,10 @@ "typeString": "uint256" }, "typeName": { - "id": 379, + "id": 422, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "319:4:3", + "src": "295:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -449,32 +419,142 @@ "visibility": "internal" } ], - "src": "270:69:3" + "src": "246:69:3" }, - "src": "257:83:3" + "src": "233:83:3" }, { "body": { - "id": 420, + "id": 467, "nodeType": "Block", - "src": "515:265:3", + "src": "468:278:3", "statements": [ { "expression": { "argumentTypes": null, - "id": 408, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 440, + "name": "_attachments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "487:12:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "487:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "509:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "487:23:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 439, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 487, + 488 + ], + "referencedDeclaration": 487, + "src": "479:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "479:32:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 445, + "nodeType": "ExpressionStatement", + "src": "479:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 455, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 398, + "id": 446, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "528:5:3", + "referencedDeclaration": 437, + "src": "524:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -490,12 +570,12 @@ "arguments": [ { "argumentTypes": null, - "id": 402, + "id": 450, "name": "_patient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "580:8:3", + "referencedDeclaration": 427, + "src": "576:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -503,12 +583,12 @@ }, { "argumentTypes": null, - "id": 403, + "id": 451, "name": "_doctor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "611:7:3", + "referencedDeclaration": 429, + "src": "607:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -516,25 +596,12 @@ }, { "argumentTypes": null, - "id": 404, - "name": "_record", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 388, - "src": "641:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 405, + "id": 452, "name": "_attachments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 391, - "src": "676:12:3", + "referencedDeclaration": 432, + "src": "642:12:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" @@ -543,18 +610,18 @@ ], "expression": { "argumentTypes": null, - "id": 401, + "id": 449, "name": "Record", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "549:6:3", + "referencedDeclaration": 414, + "src": "545:6:3", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Record_$371_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_Record_$414_storage_ptr_$", "typeString": "type(struct RecordFactory.Record storage pointer)" } }, - "id": 406, + "id": 453, "isConstant": false, "isLValue": false, "isPure": false, @@ -563,13 +630,12 @@ "names": [ "patient", "doctor", - "record", "attachments" ], "nodeType": "FunctionCall", - "src": "549:151:3", + "src": "545:121:3", "typeDescriptions": { - "typeIdentifier": "t_struct$_Record_$371_memory", + "typeIdentifier": "t_struct$_Record_$414_memory", "typeString": "struct RecordFactory.Record memory" } } @@ -577,24 +643,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_Record_$371_memory", + "typeIdentifier": "t_struct$_Record_$414_memory", "typeString": "struct RecordFactory.Record memory" } ], "expression": { "argumentTypes": null, - "id": 399, + "id": 447, "name": "records", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 374, - "src": "536:7:3", + "referencedDeclaration": 417, + "src": "532:7:3", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage", "typeString": "struct RecordFactory.Record storage ref[] storage ref" } }, - "id": 400, + "id": 448, "isConstant": false, "isLValue": false, "isPure": false, @@ -602,13 +668,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "536:12:3", + "src": "532:12:3", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Record_$371_storage_$returns$_t_uint256_$", + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Record_$414_storage_$returns$_t_uint256_$", "typeString": "function (struct RecordFactory.Record storage ref) returns (uint256)" } }, - "id": 407, + "id": 454, "isConstant": false, "isLValue": false, "isPure": false, @@ -616,26 +682,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "536:165:3", + "src": "532:135:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "528:173:3", + "src": "524:143:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 409, + "id": 456, "nodeType": "ExpressionStatement", - "src": "528:173:3" + "src": "524:143:3" }, { "expression": { "argumentTypes": null, - "id": 411, + "id": 458, "isConstant": false, "isLValue": false, "isPure": false, @@ -643,15 +709,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "712:8:3", + "src": "678:8:3", "subExpression": { "argumentTypes": null, - "id": 410, + "id": 457, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "712:5:3", + "referencedDeclaration": 437, + "src": "678:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -662,9 +728,9 @@ "typeString": "uint256" } }, - "id": 412, + "id": 459, "nodeType": "ExpressionStatement", - "src": "712:8:3" + "src": "678:8:3" }, { "eventCall": { @@ -672,12 +738,12 @@ "arguments": [ { "argumentTypes": null, - "id": 414, + "id": 461, "name": "_patient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "744:8:3", + "referencedDeclaration": 427, + "src": "710:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -687,18 +753,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 415, + "id": 462, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "754:3:3", + "referencedDeclaration": 484, + "src": "720:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 416, + "id": 463, "isConstant": false, "isLValue": false, "isPure": false, @@ -706,7 +772,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "754:10:3", + "src": "720:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -714,12 +780,12 @@ }, { "argumentTypes": null, - "id": 417, + "id": 464, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "766:5:3", + "referencedDeclaration": 437, + "src": "732:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -741,18 +807,18 @@ "typeString": "uint256" } ], - "id": 413, + "id": 460, "name": "Created", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 382, - "src": "736:7:3", + "referencedDeclaration": 425, + "src": "702:7:3", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 418, + "id": 465, "isConstant": false, "isLValue": false, "isPure": false, @@ -760,57 +826,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "736:36:3", + "src": "702:36:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 419, + "id": 466, "nodeType": "EmitStatement", - "src": "731:41:3" + "src": "697:41:3" } ] }, "documentation": null, - "id": 421, + "id": 468, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 394, + "id": 435, "modifierName": { "argumentTypes": null, - "id": 393, + "id": 434, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "484:9:3", + "referencedDeclaration": 349, + "src": "437:9:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "484:9:3" + "src": "437:9:3" } ], "name": "create", "nodeType": "FunctionDefinition", "parameters": { - "id": 392, + "id": 433, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 384, + "id": 427, "name": "_patient", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "374:16:3", + "scope": 468, + "src": "350:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -818,10 +884,10 @@ "typeString": "address" }, "typeName": { - "id": 383, + "id": 426, "name": "address", "nodeType": "ElementaryTypeName", - "src": "374:7:3", + "src": "350:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -832,11 +898,11 @@ }, { "constant": false, - "id": 386, + "id": 429, "name": "_doctor", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "401:15:3", + "scope": 468, + "src": "377:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -844,10 +910,10 @@ "typeString": "address" }, "typeName": { - "id": 385, + "id": 428, "name": "address", "nodeType": "ElementaryTypeName", - "src": "401:7:3", + "src": "377:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -858,37 +924,11 @@ }, { "constant": false, - "id": 388, - "name": "_record", - "nodeType": "VariableDeclaration", - "scope": 421, - "src": "427:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "427:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 391, + "id": 432, "name": "_attachments", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "450:19:3", + "scope": 468, + "src": "403:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -897,19 +937,19 @@ }, "typeName": { "baseType": { - "id": 389, + "id": 430, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "450:4:3", + "src": "403:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 390, + "id": 431, "length": null, "nodeType": "ArrayTypeName", - "src": "450:6:3", + "src": "403:6:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -919,20 +959,20 @@ "visibility": "internal" } ], - "src": "363:113:3" + "src": "339:90:3" }, "payable": false, "returnParameters": { - "id": 397, + "id": 438, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 396, + "id": 437, "name": "index", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "503:10:3", + "scope": 468, + "src": "456:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -940,10 +980,10 @@ "typeString": "uint256" }, "typeName": { - "id": 395, + "id": 436, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "503:4:3", + "src": "456:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -953,33 +993,33 @@ "visibility": "internal" } ], - "src": "502:12:3" + "src": "455:12:3" }, - "scope": 422, - "src": "348:432:3", + "scope": 469, + "src": "324:422:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 423, - "src": "55:730:3" + "scope": 470, + "src": "55:696:3" } ], - "src": "0:787:3" + "src": "0:753:3" }, "legacyAST": { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/RecordFactory.sol", "exportedSymbols": { "RecordFactory": [ - 422 + 469 ] }, - "id": 423, + "id": 470, "nodeType": "SourceUnit", "nodes": [ { - "id": 358, + "id": 403, "literals": [ "solidity", "^", @@ -992,10 +1032,10 @@ { "absolutePath": "/D/SourceCode/MedX/MedX/smart-contracts/contracts/Ownable.sol", "file": "./Ownable.sol", - "id": 359, + "id": 404, "nodeType": "ImportDirective", - "scope": 423, - "sourceUnit": 357, + "scope": 470, + "sourceUnit": 402, "src": "28:23:3", "symbolAliases": [], "unitAlias": "" @@ -1006,45 +1046,45 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 360, + "id": 405, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 356, + "referencedDeclaration": 401, "src": "81:7:3", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$356", + "typeIdentifier": "t_contract$_Ownable_$401", "typeString": "contract Ownable" } }, - "id": 361, + "id": 406, "nodeType": "InheritanceSpecifier", "src": "81:7:3" } ], "contractDependencies": [ - 356 + 401 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 422, + "id": 469, "linearizedBaseContracts": [ - 422, - 356 + 469, + 401 ], "name": "RecordFactory", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "RecordFactory.Record", - "id": 371, + "id": 414, "members": [ { "constant": false, - "id": 363, + "id": 408, "name": "patient", "nodeType": "VariableDeclaration", - "scope": 371, + "scope": 414, "src": "123:15:3", "stateVariable": false, "storageLocation": "default", @@ -1053,7 +1093,7 @@ "typeString": "address" }, "typeName": { - "id": 362, + "id": 407, "name": "address", "nodeType": "ElementaryTypeName", "src": "123:7:3", @@ -1067,10 +1107,10 @@ }, { "constant": false, - "id": 365, + "id": 410, "name": "doctor", "nodeType": "VariableDeclaration", - "scope": 371, + "scope": 414, "src": "149:14:3", "stateVariable": false, "storageLocation": "default", @@ -1079,7 +1119,7 @@ "typeString": "address" }, "typeName": { - "id": 364, + "id": 409, "name": "address", "nodeType": "ElementaryTypeName", "src": "149:7:3", @@ -1093,37 +1133,11 @@ }, { "constant": false, - "id": 367, - "name": "record", - "nodeType": "VariableDeclaration", - "scope": 371, - "src": "176:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 366, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "176:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 370, + "id": 413, "name": "attachments", "nodeType": "VariableDeclaration", - "scope": 371, - "src": "198:18:3", + "scope": 414, + "src": "174:18:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1132,19 +1146,19 @@ }, "typeName": { "baseType": { - "id": 368, + "id": 411, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "198:4:3", + "src": "174:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 369, + "id": 412, "length": null, "nodeType": "ArrayTypeName", - "src": "198:6:3", + "src": "174:6:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -1156,42 +1170,42 @@ ], "name": "Record", "nodeType": "StructDefinition", - "scope": 422, - "src": "98:126:3", + "scope": 469, + "src": "98:102:3", "visibility": "public" }, { "constant": false, - "id": 374, + "id": 417, "name": "records", "nodeType": "VariableDeclaration", - "scope": 422, - "src": "232:16:3", + "scope": 469, + "src": "208:16:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage", "typeString": "struct RecordFactory.Record[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 372, + "id": 415, "name": "Record", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "232:6:3", + "referencedDeclaration": 414, + "src": "208:6:3", "typeDescriptions": { - "typeIdentifier": "t_struct$_Record_$371_storage_ptr", + "typeIdentifier": "t_struct$_Record_$414_storage_ptr", "typeString": "struct RecordFactory.Record" } }, - "id": 373, + "id": 416, "length": null, "nodeType": "ArrayTypeName", - "src": "232:8:3", + "src": "208:8:3", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage_ptr", "typeString": "struct RecordFactory.Record[]" } }, @@ -1201,21 +1215,21 @@ { "anonymous": false, "documentation": null, - "id": 382, + "id": 425, "name": "Created", "nodeType": "EventDefinition", "parameters": { - "id": 381, + "id": 424, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 376, + "id": 419, "indexed": true, "name": "patient", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "271:23:3", + "scope": 425, + "src": "247:23:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1223,10 +1237,10 @@ "typeString": "address" }, "typeName": { - "id": 375, + "id": 418, "name": "address", "nodeType": "ElementaryTypeName", - "src": "271:7:3", + "src": "247:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1237,12 +1251,12 @@ }, { "constant": false, - "id": 378, + "id": 421, "indexed": true, "name": "doctor", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "295:22:3", + "scope": 425, + "src": "271:22:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1250,10 +1264,10 @@ "typeString": "address" }, "typeName": { - "id": 377, + "id": 420, "name": "address", "nodeType": "ElementaryTypeName", - "src": "295:7:3", + "src": "271:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1264,12 +1278,12 @@ }, { "constant": false, - "id": 380, + "id": 423, "indexed": true, "name": "record", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "319:19:3", + "scope": 425, + "src": "295:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1277,10 +1291,10 @@ "typeString": "uint256" }, "typeName": { - "id": 379, + "id": 422, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "319:4:3", + "src": "295:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1290,32 +1304,142 @@ "visibility": "internal" } ], - "src": "270:69:3" + "src": "246:69:3" }, - "src": "257:83:3" + "src": "233:83:3" }, { "body": { - "id": 420, + "id": 467, "nodeType": "Block", - "src": "515:265:3", + "src": "468:278:3", "statements": [ { "expression": { "argumentTypes": null, - "id": 408, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 440, + "name": "_attachments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "487:12:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "487:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "509:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "487:23:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 439, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 487, + 488 + ], + "referencedDeclaration": 487, + "src": "479:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "479:32:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 445, + "nodeType": "ExpressionStatement", + "src": "479:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 455, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 398, + "id": 446, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "528:5:3", + "referencedDeclaration": 437, + "src": "524:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1331,12 +1455,12 @@ "arguments": [ { "argumentTypes": null, - "id": 402, + "id": 450, "name": "_patient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "580:8:3", + "referencedDeclaration": 427, + "src": "576:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1344,12 +1468,12 @@ }, { "argumentTypes": null, - "id": 403, + "id": 451, "name": "_doctor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "611:7:3", + "referencedDeclaration": 429, + "src": "607:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1357,25 +1481,12 @@ }, { "argumentTypes": null, - "id": 404, - "name": "_record", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 388, - "src": "641:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 405, + "id": 452, "name": "_attachments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 391, - "src": "676:12:3", + "referencedDeclaration": 432, + "src": "642:12:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" @@ -1384,18 +1495,18 @@ ], "expression": { "argumentTypes": null, - "id": 401, + "id": 449, "name": "Record", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "549:6:3", + "referencedDeclaration": 414, + "src": "545:6:3", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Record_$371_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_Record_$414_storage_ptr_$", "typeString": "type(struct RecordFactory.Record storage pointer)" } }, - "id": 406, + "id": 453, "isConstant": false, "isLValue": false, "isPure": false, @@ -1404,13 +1515,12 @@ "names": [ "patient", "doctor", - "record", "attachments" ], "nodeType": "FunctionCall", - "src": "549:151:3", + "src": "545:121:3", "typeDescriptions": { - "typeIdentifier": "t_struct$_Record_$371_memory", + "typeIdentifier": "t_struct$_Record_$414_memory", "typeString": "struct RecordFactory.Record memory" } } @@ -1418,24 +1528,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_Record_$371_memory", + "typeIdentifier": "t_struct$_Record_$414_memory", "typeString": "struct RecordFactory.Record memory" } ], "expression": { "argumentTypes": null, - "id": 399, + "id": 447, "name": "records", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 374, - "src": "536:7:3", + "referencedDeclaration": 417, + "src": "532:7:3", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Record_$371_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_Record_$414_storage_$dyn_storage", "typeString": "struct RecordFactory.Record storage ref[] storage ref" } }, - "id": 400, + "id": 448, "isConstant": false, "isLValue": false, "isPure": false, @@ -1443,13 +1553,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "536:12:3", + "src": "532:12:3", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Record_$371_storage_$returns$_t_uint256_$", + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Record_$414_storage_$returns$_t_uint256_$", "typeString": "function (struct RecordFactory.Record storage ref) returns (uint256)" } }, - "id": 407, + "id": 454, "isConstant": false, "isLValue": false, "isPure": false, @@ -1457,26 +1567,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "536:165:3", + "src": "532:135:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "528:173:3", + "src": "524:143:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 409, + "id": 456, "nodeType": "ExpressionStatement", - "src": "528:173:3" + "src": "524:143:3" }, { "expression": { "argumentTypes": null, - "id": 411, + "id": 458, "isConstant": false, "isLValue": false, "isPure": false, @@ -1484,15 +1594,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "712:8:3", + "src": "678:8:3", "subExpression": { "argumentTypes": null, - "id": 410, + "id": 457, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "712:5:3", + "referencedDeclaration": 437, + "src": "678:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1503,9 +1613,9 @@ "typeString": "uint256" } }, - "id": 412, + "id": 459, "nodeType": "ExpressionStatement", - "src": "712:8:3" + "src": "678:8:3" }, { "eventCall": { @@ -1513,12 +1623,12 @@ "arguments": [ { "argumentTypes": null, - "id": 414, + "id": 461, "name": "_patient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "744:8:3", + "referencedDeclaration": 427, + "src": "710:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1528,18 +1638,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 415, + "id": 462, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 437, - "src": "754:3:3", + "referencedDeclaration": 484, + "src": "720:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 416, + "id": 463, "isConstant": false, "isLValue": false, "isPure": false, @@ -1547,7 +1657,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "754:10:3", + "src": "720:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1555,12 +1665,12 @@ }, { "argumentTypes": null, - "id": 417, + "id": 464, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "766:5:3", + "referencedDeclaration": 437, + "src": "732:5:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1582,18 +1692,18 @@ "typeString": "uint256" } ], - "id": 413, + "id": 460, "name": "Created", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 382, - "src": "736:7:3", + "referencedDeclaration": 425, + "src": "702:7:3", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 418, + "id": 465, "isConstant": false, "isLValue": false, "isPure": false, @@ -1601,57 +1711,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "736:36:3", + "src": "702:36:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 419, + "id": 466, "nodeType": "EmitStatement", - "src": "731:41:3" + "src": "697:41:3" } ] }, "documentation": null, - "id": 421, + "id": 468, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 394, + "id": 435, "modifierName": { "argumentTypes": null, - "id": 393, + "id": 434, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 304, - "src": "484:9:3", + "referencedDeclaration": 349, + "src": "437:9:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "484:9:3" + "src": "437:9:3" } ], "name": "create", "nodeType": "FunctionDefinition", "parameters": { - "id": 392, + "id": 433, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 384, + "id": 427, "name": "_patient", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "374:16:3", + "scope": 468, + "src": "350:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1659,10 +1769,10 @@ "typeString": "address" }, "typeName": { - "id": 383, + "id": 426, "name": "address", "nodeType": "ElementaryTypeName", - "src": "374:7:3", + "src": "350:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1673,11 +1783,11 @@ }, { "constant": false, - "id": 386, + "id": 429, "name": "_doctor", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "401:15:3", + "scope": 468, + "src": "377:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1685,10 +1795,10 @@ "typeString": "address" }, "typeName": { - "id": 385, + "id": 428, "name": "address", "nodeType": "ElementaryTypeName", - "src": "401:7:3", + "src": "377:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1699,37 +1809,11 @@ }, { "constant": false, - "id": 388, - "name": "_record", - "nodeType": "VariableDeclaration", - "scope": 421, - "src": "427:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "427:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 391, + "id": 432, "name": "_attachments", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "450:19:3", + "scope": 468, + "src": "403:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1738,19 +1822,19 @@ }, "typeName": { "baseType": { - "id": 389, + "id": 430, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "450:4:3", + "src": "403:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 390, + "id": 431, "length": null, "nodeType": "ArrayTypeName", - "src": "450:6:3", + "src": "403:6:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -1760,20 +1844,20 @@ "visibility": "internal" } ], - "src": "363:113:3" + "src": "339:90:3" }, "payable": false, "returnParameters": { - "id": 397, + "id": 438, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 396, + "id": 437, "name": "index", "nodeType": "VariableDeclaration", - "scope": 421, - "src": "503:10:3", + "scope": 468, + "src": "456:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1781,10 +1865,10 @@ "typeString": "uint256" }, "typeName": { - "id": 395, + "id": 436, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "503:4:3", + "src": "456:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1794,20 +1878,20 @@ "visibility": "internal" } ], - "src": "502:12:3" + "src": "455:12:3" }, - "scope": 422, - "src": "348:432:3", + "scope": 469, + "src": "324:422:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 423, - "src": "55:730:3" + "scope": 470, + "src": "55:696:3" } ], - "src": "0:787:3" + "src": "0:753:3" }, "compiler": { "name": "solc", @@ -1822,5 +1906,5 @@ } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-08-23T15:01:05.600Z" + "updatedAt": "2018-08-24T14:07:59.989Z" } \ No newline at end of file diff --git a/smart-contracts/contracts/EncryptedFileFactory.sol b/smart-contracts/contracts/EncryptedFileFactory.sol index cf735a6..82467c9 100644 --- a/smart-contracts/contracts/EncryptedFileFactory.sol +++ b/smart-contracts/contracts/EncryptedFileFactory.sol @@ -1,19 +1,22 @@ pragma solidity ^0.4.24; -pragma experimental ABIEncoderV2; import "./Ownable.sol"; contract EncryptedFileFactory is Ownable { - string[] public HashMethods = ["SHA-512"]; string[] public EncryptionMethods = ["AES"]; + struct Multihash { + bytes32 digest; + uint8 hashFunction; + uint8 size; + } + struct EncryptedFile { - string filePath; - string dataHash; - uint hashMethod; + Multihash filePath; + Multihash dataHash; uint encriptionMethod; - mapping(address=>string) keys; + mapping(address=>bytes32[4]) keys; } EncryptedFile[] public encryptedFiles; @@ -24,29 +27,39 @@ contract EncryptedFileFactory is Ownable { function create( address _by, address[] _keysOwners, - string[] _keys, - string _filePath, - string _dataHash, - uint _hashMethod, + bytes32[4][] _keys, + bytes32 _filePath_digest, + uint8 _filePath_hashFunction, + uint8 _filePath_size, + bytes32 _dataHash_digest, + uint8 _dataHash_hashFunction, + uint8 _dataHash_size, uint _encriptionMethod ) public onlyOwner returns (uint index) { index = encryptedFiles.push(EncryptedFile({ - filePath: _filePath, - dataHash: _dataHash, - hashMethod: _hashMethod, + filePath: Multihash({ + digest: _filePath_digest, + hashFunction: _filePath_hashFunction, + size: _filePath_size + }), + dataHash: Multihash({ + digest: _dataHash_digest, + hashFunction: _dataHash_hashFunction, + size: _dataHash_size + }), encriptionMethod: _encriptionMethod })); index --; EncryptedFile storage _encryptedFile = encryptedFiles[i]; - for (uint i = 0; i < _keys.length; i++) { - _encryptedFile.keys[_keysOwners[i]] = _keys[i]; + for (uint i = 0; i < _keysOwners.length; i++) { + _encryptedFile.keys[_keysOwners[i]] = [_keys[0][i], _keys[1][i],_keys[2][i], _keys[3][i]]; emit GivenAccess(_by, _keysOwners[i],index); } } - function giveAccess(uint _index, address _to, address _by, string _key) public onlyOwner { + function giveAccess(uint _index, address _to, address _by, bytes32[4] _key) public onlyOwner { encryptedFiles[_index].keys[_to] = _key; emit GivenAccess(_by, _to, _index); } diff --git a/smart-contracts/contracts/MedX.sol b/smart-contracts/contracts/MedX.sol index 1e33089..5b50ad8 100644 --- a/smart-contracts/contracts/MedX.sol +++ b/smart-contracts/contracts/MedX.sol @@ -1,5 +1,4 @@ pragma solidity ^0.4.24; -pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./RecordFactory.sol"; @@ -15,34 +14,33 @@ contract MedX is Ownable{ recordFactory = new RecordFactory(); } - function createRecordFull( + function createRecord( address _patient, - string _patientsKey, - string _doctorsKey, - string _record_filePath, - string _record_dataHash, - uint _record_hashMethod, - uint _record_encriptionMethod, - uint[] _attachments + address[] _keysOwners, + bytes32[4][] _keys, + bytes32[] _filePath_digest, + uint8[] _filePath_hashFunction, + uint8[] _filePath_size, + bytes32[] _dataHash_digest, + uint8[] _dataHash_hashFunction, + uint8[] _dataHash_size, + uint[] _encriptionMethod ) public returns (uint index) { - - string[] memory keys; - keys[0] = _doctorsKey; - keys[1] = _patientsKey; - - address[] memory owners; - owners[0] = msg.sender; - owners[1] = msg.sender; - - - uint recFileIndex = encyptedFileFactory.create( - msg.sender, owners, keys, - _record_filePath, _record_dataHash, _record_hashMethod, _record_encriptionMethod - ); - - index = recordFactory.create( - _patient, msg.sender, - recFileIndex, new uint[](0) - ); + uint[] memory attachments; + + for (uint i = 0; i < _encriptionMethod.length; i++) { + attachments[i] = encyptedFileFactory.create( + msg.sender, _keysOwners, _keys, + _filePath_digest[i], + _filePath_hashFunction[i], + _filePath_size[i], + _dataHash_digest[i], + _dataHash_hashFunction[i], + _dataHash_size[i], + _encriptionMethod[i] + ); + } + + index = recordFactory.create(_patient, msg.sender, attachments); } } \ No newline at end of file diff --git a/smart-contracts/contracts/RecordFactory.sol b/smart-contracts/contracts/RecordFactory.sol index 24545be..ed5368a 100644 --- a/smart-contracts/contracts/RecordFactory.sol +++ b/smart-contracts/contracts/RecordFactory.sol @@ -7,8 +7,6 @@ contract RecordFactory is Ownable { struct Record { address patient; address doctor; - - uint record; uint[] attachments; } @@ -19,14 +17,13 @@ contract RecordFactory is Ownable { function create( address _patient, address _doctor, - uint _record, uint[] _attachments ) public onlyOwner returns (uint index) { + require(_attachments.length > 0); index = records.push(Record({ patient: _patient, doctor: _doctor, - record: _record, attachments: _attachments })); index --;