diff --git a/indy-besu/docs/design/auth.md b/indy-besu/docs/design/auth.md index b3c45bc76..404a9de70 100644 --- a/indy-besu/docs/design/auth.md +++ b/indy-besu/docs/design/auth.md @@ -188,12 +188,12 @@ Contract name: **transactionAllowed** ### DID Document management -| Contract | Method | Required Role | Action Description | -|---------------|--------------------------------|-----------------------------|---------------------------------| -| DidRegistry | createDid | Trustee, Endorser, Steward | Create a new DID Document | -| DidRegistry | updateDid | DID owner | Update DID an existing Document | -| DidRegistry | deactivateDid | DID owner | Deactivate an existing DID | -| DidRegistry | resolveDid | any | Resolve DID Document for a DID | +| Contract | Method | Required Role | Action Description | +|-------------------|--------------------------------|-----------------------------|---------------------------------| +| IndyDidRegistry | createDid | Trustee, Endorser, Steward | Create a new DID Document | +| IndyDidRegistry | updateDid | DID owner | Update DID an existing Document | +| IndyDidRegistry | deactivateDid | DID owner | Deactivate an existing DID | +| IndyDidRegistry | resolveDid | any | Resolve DID Document for a DID | ### CL Registry management diff --git a/indy-besu/docs/design/cl-registry.md b/indy-besu/docs/design/cl-registry.md index 697cec365..17261d830 100644 --- a/indy-besu/docs/design/cl-registry.md +++ b/indy-besu/docs/design/cl-registry.md @@ -9,7 +9,7 @@ | parameter | value | |--------------------|-----------------------------------------------------------------| | id | “did:” method-name “:” namespace “:” method-specific-id | -| method-name | “indy2” | +| method-name | “indy2”, “indy”, “sov”, “ethr” | | namespace | “testnet”/"mainnet" | | indy-id | /anoncreds/v0/SCHEMA// | @@ -136,7 +136,7 @@ Contract name: **SchemaRegistry** | parameter | value | |--------------------|---------------------------------------------------------| | id | “did:” method-name “:” namespace “:” method-specific-id | -| method-name | “indy2” | +| method-name | “indy2”, “indy”, “sov”, “ethr” | | namespace | “testnet”/"mainnet" | | indy-id | /anoncreds/v0/CLAIM_DEF// | diff --git a/indy-besu/docs/design/did-methods.md b/indy-besu/docs/design/did-methods.md index 139ee7564..85fa624bf 100644 --- a/indy-besu/docs/design/did-methods.md +++ b/indy-besu/docs/design/did-methods.md @@ -36,7 +36,7 @@ Example: | parameter | value | |--------------------|---------------------------------------------------------| | did | “did:” method-name “:” namespace “:” method-specific-id | -| method-name | "indy2" | +| method-name | “indy2”, “indy”, “sov” | | namespace | “testnet”/"mainnet" | | method-specific-id | indy-id | | indy-id | Base58(Truncate_msb(16(SHA256(publicKey)))) | diff --git a/indy-besu/docs/design/did-registry.md b/indy-besu/docs/design/did-registry.md index 335d2b7a0..7ea67960a 100644 --- a/indy-besu/docs/design/did-registry.md +++ b/indy-besu/docs/design/did-registry.md @@ -132,7 +132,7 @@ Each DID Document MUST have a metadata section when a representation is produced ## Transactions (Smart Contract's methods) -Contract name: **DidRegistry** +Contract name: **IndyDidRegistry** ### Create DID @@ -143,13 +143,13 @@ Contract name: **DidRegistry** * Valid DID Document must be provided * Format: ``` - DidRegistry.createDid( + IndyDidRegistry.createDid( didDoc DidDoc ) ``` * Example: ``` - DidRegistry.createDid( + IndyDidRegistry.createDid( didDoc: { id:"did:indy2:testnet:SEp33q43PsdP7nDATyySSH", verificationMethod: [ @@ -180,13 +180,13 @@ Contract name: **DidRegistry** * Sender must be DID creator * Format: ``` - DidRegistry.updateDid( + IndyDidRegistry.updateDid( didDoc DidDoc ) ``` * Example: ``` - DidRegistry.updatedDid( + IndyDidRegistry.updatedDid( didDoc: { id:"did:indy2:testnet:SEp33q43PsdP7nDATyySSH", verificationMethod: [ @@ -217,13 +217,13 @@ Contract name: **DidRegistry** * Sender must be DID creator * Format: ``` - DidRegistry.deactivateDid( + IndyDidRegistry.deactivateDid( string did ) ``` * Example: ``` - DidRegistry.deactivateDid( + IndyDidRegistry.deactivateDid( "did:indy2:testnet:SEp33q43PsdP7nDATyySSH" ) ``` @@ -238,13 +238,13 @@ Contract name: **DidRegistry** * DID must exist * Format: ``` - DidRegistry.resolveDid( + IndyDidRegistry.resolveDid( string id, ) returns (DidDocumentStorage) ``` * Example: ``` - DidRegistry.resolveDid( + IndyDidRegistry.resolveDid( "did:indy2:testnet:SEp33q43PsdP7nDATyySSH" ) ``` diff --git a/indy-besu/docs/design/vdr.md b/indy-besu/docs/design/vdr.md index ed6def28a..7763a68c4 100644 --- a/indy-besu/docs/design/vdr.md +++ b/indy-besu/docs/design/vdr.md @@ -224,7 +224,7 @@ struct BuildTxnOptions {} ``` ```rust -/// Prepare transaction executing `DidRegistry.createDid` smart contract method to create a new DID on the Ledger +/// Prepare transaction executing `IndyDidRegistry.createDid` smart contract method to create a new DID on the Ledger /// /// #Params /// param: client: LedgerClient - Ledger client @@ -247,7 +247,7 @@ fn indy_vdr_build_create_did_transaction( ##### Single step contract execution ```rust -/// Single step function executing DidRegistry.createDid smart contract method to publish a new DID Document +/// Single step function executing `IndyDidRegistry.createDid` smart contract method to publish a new DID Document /// /// #Params /// param: client: LedgerClient - Ledger client @@ -270,7 +270,7 @@ fn indy_vdr_create_did( ##### Request builder ```rust -/// Prepare transaction executing `DidRegistry.updateDid` smart contract method to update an existing DID Document +/// Prepare transaction executing `IndyDidRegistry.updateDid` smart contract method to update an existing DID Document /// /// #Params /// param: client: LedgerClient - Ledger client @@ -291,7 +291,7 @@ fn indy_vdr_build_update_did_transaction( ##### Single step contract execution ```rust -/// Single step function executing DidRegistry.updateDid smart contract method to publish DID Document +/// Single step function executing `IndyDidRegistry.updateDid smart` contract method to publish DID Document /// /// #Params /// param: client: LedgerClient - Ledger client @@ -314,7 +314,7 @@ fn indy_vdr_update_did( ##### Request builder ```rust -/// Prepare transaction executing `DidRegistry.deactivateDid` smart contract method to deactivate an existing DID +/// Prepare transaction executing `IndyDidRegistry.deactivateDid` smart contract method to deactivate an existing DID /// /// #Params /// param: client: LedgerClient - Ledger client @@ -335,7 +335,7 @@ fn indy_vdr_build_deactivate_did_transaction( ##### Single step contract execution ```rust -/// Single step function executing DidRegistry.deactivateDid smart contract method to publish DID Document +/// Single step function executing `IndyDidRegistry.deactivateDid` smart contract method to publish DID Document /// /// #Params /// param: client: LedgerClient - Ledger client @@ -358,7 +358,7 @@ fn indy_vdr_deactivate_did( ##### Request builder ```rust -/// Prepare transaction executing `DidRegistry.resolveDid` smart contract method to resolve a DID +/// Prepare transaction executing `IndyDidRegistry.resolveDid` smart contract method to resolve a DID /// /// #Params /// param: client: Ledger - client (Ethereum client - for example web3::Http) @@ -375,7 +375,7 @@ fn indy_vdr_build_resolve_did_transaction( ``` ```rust -/// Parse response for of `DidRegistry.resolveDid` smart contract +/// Parse response for of `IndyDidRegistry.resolveDid` smart contract /// /// #Params /// param: client: Ledger - client (Ethereum client - for example web3::Http) @@ -392,7 +392,7 @@ fn indy_vdr_parse_resolve_did_response( ##### Single step contract execution ```rust -/// Single step function executing DidRegistry.resolveDid smart contract method to resolve DID Document with metadata +/// Single step function executing `IndyDidRegistry.resolveDid` smart contract method to resolve DID Document with metadata /// /// #Params /// param: client - Ledger client (Ethereum client - for example web3::Http) @@ -409,7 +409,7 @@ fn indy_vdr_resolve_did( ``` ```rust -/// Single step function executing dereferencing DID-URL and DidRegistry.resolveDid smart contract method to resolve DID Document with metadata +/// Single step function executing dereferencing DID-URL and `IndyDidRegistry.resolveDid` smart contract method to resolve DID Document with metadata /// /// #Params /// param: client - Ledger client (Ethereum client - for example web3::Http) diff --git a/indy-besu/network/config/besu/genesis.json b/indy-besu/network/config/besu/genesis.json index ef9c1e2a1..a308d59a3 100644 --- a/indy-besu/network/config/besu/genesis.json +++ b/indy-besu/network/config/besu/genesis.json @@ -76,23 +76,23 @@ "0x0000000000000000000000000000000000008888": { "comment": "Proxy: Account permissioning smart contract", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000009559148a5a3fe772c2800a4fc84121e62ff43fd2" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000af926ec0acfe1ea2df5da1154ff901ffe158cc77" } }, - "0x9559148a5a3fe772c2800a4fc84121e62ff43fd2": { + "0xaf926ec0acfe1ea2df5da1154ff901ffe158cc77": { "comment": "Implementation: Account permissioning smart contract", "balance": "0", - "code": "0x60806040526004361061004a5760003560e01c8063485cc9551461004f5780634f1ef2861461007157806352d1902d14610084578063936421d5146100ac578063ad3cb1cc146100dc575b600080fd5b34801561005b57600080fd5b5061006f61006a36600461082c565b61011a565b005b61006f61007f366004610875565b610246565b34801561009057600080fd5b50610099610265565b6040519081526020015b60405180910390f35b3480156100b857600080fd5b506100cc6100c7366004610937565b610282565b60405190151581526020016100a3565b3480156100e857600080fd5b5061010d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a39190610a0c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156101605750825b905060008267ffffffffffffffff16600114801561017d5750303b155b90508115801561018b575080155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156101d357845460ff60401b1916600160401b1785555b600180546001600160a01b0319166001600160a01b0389161790556101f7866103a8565b831561023d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b61024e6103d2565b61025782610479565b61026182826104df565b5050565b600061026f6105a6565b50600080516020610ad183398151915290565b60006001600160a01b03871615801561030b575060018054604051634f4bdc7b60e11b81526001600160a01b0390911691639e97b8f6916102c891908c90600401610a3f565b602060405180830381865afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103099190610a79565b155b156103185750600061039d565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061034b906000908c90600401610a3f565b602060405180830381865afa158015610368573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038c9190610a79565b156103995750600061039d565b5060015b979650505050505050565b6103b06105ef565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061045957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661044d600080516020610ad1833981519152546001600160a01b031690565b6001600160a01b031614155b156104775760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610539575060408051601f3d908101601f1916820190925261053691810190610a9b565b60015b61056657604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610ad1833981519152811461059757604051632a87526960e21b81526004810182905260240161055d565b6105a18383610638565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104775760405163703e46dd60e11b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661047757604051631afcd79f60e31b815260040160405180910390fd5b6106418261068e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610686576105a182826106f3565b610261610769565b806001600160a01b03163b6000036106c457604051634c9c8ce360e01b81526001600160a01b038216600482015260240161055d565b600080516020610ad183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516107109190610ab4565b600060405180830381855af49150503d806000811461074b576040519150601f19603f3d011682016040523d82523d6000602084013e610750565b606091505b5091509150610760858383610788565b95945050505050565b34156104775760405163b398979f60e01b815260040160405180910390fd5b60608261079d57610798826107e7565b6107e0565b81511580156107b457506001600160a01b0384163b155b156107dd57604051639996b31560e01b81526001600160a01b038516600482015260240161055d565b50805b9392505050565b8051156107f75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461082757600080fd5b919050565b6000806040838503121561083f57600080fd5b61084883610810565b915061085660208401610810565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561088857600080fd5b61089183610810565b9150602083013567ffffffffffffffff808211156108ae57600080fd5b818501915085601f8301126108c257600080fd5b8135818111156108d4576108d461085f565b604051601f8201601f19908116603f011681019083821181831017156108fc576108fc61085f565b8160405282815288602084870101111561091557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060c0888a03121561095257600080fd5b61095b88610810565b965061096960208901610810565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8082111561099b57600080fd5b818a0191508a601f8301126109af57600080fd5b8135818111156109be57600080fd5b8b60208285010111156109d057600080fd5b60208301945080935050505092959891949750929550565b60005b83811015610a035781810151838201526020016109eb565b50506000910152565b6020815260008251806020840152610a2b8160408501602087016109e8565b601f01601f19169190910160400192915050565b6040810160048410610a6157634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b600060208284031215610a8b57600080fd5b815180151581146107e057600080fd5b600060208284031215610aad57600080fd5b5051919050565b60008251610ac68184602087016109e8565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220682234c19d5769dad07c415069ca6b81640464d46ca57262f5a69f7db2af004b64736f6c63430008150033" + "code": "0x60806040526004361061004a5760003560e01c8063485cc9551461004f5780634f1ef2861461007157806352d1902d14610084578063936421d5146100ac578063ad3cb1cc146100dc575b600080fd5b34801561005b57600080fd5b5061006f61006a36600461082c565b61011a565b005b61006f61007f366004610875565b610246565b34801561009057600080fd5b50610099610265565b6040519081526020015b60405180910390f35b3480156100b857600080fd5b506100cc6100c7366004610937565b610282565b60405190151581526020016100a3565b3480156100e857600080fd5b5061010d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a39190610a0c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156101605750825b905060008267ffffffffffffffff16600114801561017d5750303b155b90508115801561018b575080155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156101d357845460ff60401b1916600160401b1785555b600180546001600160a01b0319166001600160a01b0389161790556101f7866103a8565b831561023d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b61024e6103d2565b61025782610479565b61026182826104df565b5050565b600061026f6105a6565b50600080516020610ad183398151915290565b60006001600160a01b03871615801561030b575060018054604051634f4bdc7b60e11b81526001600160a01b0390911691639e97b8f6916102c891908c90600401610a3f565b602060405180830381865afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103099190610a79565b155b156103185750600061039d565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061034b906000908c90600401610a3f565b602060405180830381865afa158015610368573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038c9190610a79565b156103995750600061039d565b5060015b979650505050505050565b6103b06105ef565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061045957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661044d600080516020610ad1833981519152546001600160a01b031690565b6001600160a01b031614155b156104775760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610539575060408051601f3d908101601f1916820190925261053691810190610a9b565b60015b61056657604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610ad1833981519152811461059757604051632a87526960e21b81526004810182905260240161055d565b6105a18383610638565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104775760405163703e46dd60e11b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661047757604051631afcd79f60e31b815260040160405180910390fd5b6106418261068e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610686576105a182826106f3565b610261610769565b806001600160a01b03163b6000036106c457604051634c9c8ce360e01b81526001600160a01b038216600482015260240161055d565b600080516020610ad183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516107109190610ab4565b600060405180830381855af49150503d806000811461074b576040519150601f19603f3d011682016040523d82523d6000602084013e610750565b606091505b5091509150610760858383610788565b95945050505050565b34156104775760405163b398979f60e01b815260040160405180910390fd5b60608261079d57610798826107e7565b6107e0565b81511580156107b457506001600160a01b0384163b155b156107dd57604051639996b31560e01b81526001600160a01b038516600482015260240161055d565b50805b9392505050565b8051156107f75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461082757600080fd5b919050565b6000806040838503121561083f57600080fd5b61084883610810565b915061085660208401610810565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561088857600080fd5b61089183610810565b9150602083013567ffffffffffffffff808211156108ae57600080fd5b818501915085601f8301126108c257600080fd5b8135818111156108d4576108d461085f565b604051601f8201601f19908116603f011681019083821181831017156108fc576108fc61085f565b8160405282815288602084870101111561091557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060c0888a03121561095257600080fd5b61095b88610810565b965061096960208901610810565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8082111561099b57600080fd5b818a0191508a601f8301126109af57600080fd5b8135818111156109be57600080fd5b8b60208285010111156109d057600080fd5b60208301945080935050505092959891949750929550565b60005b83811015610a035781810151838201526020016109eb565b50506000910152565b6020815260008251806020840152610a2b8160408501602087016109e8565b601f01601f19169190910160400192915050565b6040810160048410610a6157634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b600060208284031215610a8b57600080fd5b815180151581146107e057600080fd5b600060208284031215610aad57600080fd5b5051919050565b60008251610ac68184602087016109e8565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220fa5012d79f6d2df14337451f8cfad6dd18164efd61b4b8de6dd1072cd27b8c4264736f6c63430008140033" }, "0x0000000000000000000000000000000000006666": { "comment": "Proxy: Smart contract to manage account roles", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "aedead2c33b41c31b4afd2246c6bf5131c209d4b0ca6c2247778ac7be7443a00": "0000000000000000000000000000000000000000000000000000000000000001", @@ -105,18 +105,18 @@ "88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c3": "0000000000000000000000000000000000000000000000000000000000000001", "a15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c": "0000000000000000000000000000000000000000000000000000000000000005", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000042e207d898eeb493e3648a033df9657cbc883e17" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000ade94cfdeae7a82237f83a3bc41fbc940def1db7" } }, - "0x42e207d898eeb493e3648a033df9657cbc883e17": { + "0xade94cfdeae7a82237f83a3bc41fbc940def1db7": { "comment": "Implementation: Smart contract to manage account roles", "balance": "0", - "code": "0x6080604052600436106100865760003560e01c806388a5bf6e1161005957806388a5bf6e146101425780639e97b8f614610162578063ad3cb1cc14610182578063c4d66de8146101c0578063d02971ca146101e057600080fd5b8063442767331461008b5780634cbb87d3146100da5780634f1ef2861461010a57806352d1902d1461011f575b600080fd5b34801561009757600080fd5b506100c46100a6366004610bc5565b6001600160a01b031660009081526001602052604090205460ff1690565b6040516100d19190610bf6565b60405180910390f35b3480156100e657600080fd5b506100fa6100f5366004610c2d565b610215565b60405190151581526020016100d1565b61011d610118366004610c76565b61037d565b005b34801561012b57600080fd5b5061013461039c565b6040519081526020016100d1565b34801561014e57600080fd5b506100c461015d366004610c2d565b6103b9565b34801561016e57600080fd5b506100fa61017d366004610c2d565b61052e565b34801561018e57600080fd5b506101b3604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100d19190610d5c565b3480156101cc57600080fd5b5061011d6101db366004610bc5565b610577565b3480156101ec57600080fd5b506102006101fb366004610d8f565b6106f2565b60405163ffffffff90911681526020016100d1565b60008260006002600083600381111561023057610230610be0565b600381111561024157610241610be0565b815260208101919091526040016000205460ff169050610261813361052e565b6102855760405163472511eb60e11b81523360048201526024015b60405180910390fd5b61028f858561052e565b15610370576001600160a01b0384166000908152600160205260408120805460ff1916905560039086828111156102c8576102c8610be0565b60038111156102d9576102d9610be0565b815260208101919091526040016000908120805463ffffffff16916102fd83610dc0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f5a8379f4a3380f87fd5924475f76a3471ac8d775668601653e3f9ef69a3dd2718760405161035f9190610bf6565b60405180910390a360019250610375565b600092505b505092915050565b610385610738565b61038e826107df565b6103988282610845565b5050565b60006103a6610907565b50600080516020610e3983398151915290565b6000826000600260008360038111156103d4576103d4610be0565b60038111156103e5576103e5610be0565b815260208101919091526040016000205460ff169050610405813361052e565b6104245760405163472511eb60e11b815233600482015260240161027c565b61042e858561052e565b610525576001600160a01b03841660009081526001602081905260409091208054879260ff199091169083600381111561046a5761046a610be0565b02179055506003600086600381111561048557610485610be0565b600381111561049657610496610be0565b815260208101919091526040016000908120805463ffffffff16916104ba83610de0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f47307e88f3e82b4e8cdffde5a264aa53a2ee17636fd8df7effe0a098da4956568760405161051c9190610bf6565b60405180910390a35b50929392505050565b600082600381111561054257610542610be0565b6001600160a01b03831660009081526001602052604090205460ff16600381111561056f5761056f610be0565b149392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105c15750805467ffffffffffffffff808416911610155b156105df5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155610609610950565b60026020527fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e08054600160ff1991821681179092557f679795a0195a1b76cdebb7c51d74e058aee92919b8c3389af86ef24535e8a28c805482168317905560036000527f88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c3805490911690911790556106a08361095e565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006003600083600381111561070a5761070a610be0565b600381111561071b5761071b610be0565b815260208101919091526040016000205463ffffffff1692915050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806107bf57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107b3600080516020610e39833981519152546001600160a01b031690565b6001600160a01b031614155b156107dd5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561082a57600080fd5b505afa15801561083e573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e03565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b038316600482015260240161027c565b600080516020610e3983398151915281146108f857604051632a87526960e21b81526004810182905260240161027c565b6109028383610988565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107dd5760405163703e46dd60e11b815260040160405180910390fd5b61095b6001336103b9565b50565b6109666109de565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b61099182610a27565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156109d6576109028282610a8c565b610398610b02565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107dd57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610a5d57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161027c565b600080516020610e3983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610aa99190610e1c565b600060405180830381855af49150503d8060008114610ae4576040519150601f19603f3d011682016040523d82523d6000602084013e610ae9565b606091505b5091509150610af9858383610b21565b95945050505050565b34156107dd5760405163b398979f60e01b815260040160405180910390fd5b606082610b3657610b3182610b80565b610b79565b8151158015610b4d57506001600160a01b0384163b155b15610b7657604051639996b31560e01b81526001600160a01b038516600482015260240161027c565b50805b9392505050565b805115610b905780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610bc057600080fd5b919050565b600060208284031215610bd757600080fd5b610b7982610ba9565b634e487b7160e01b600052602160045260246000fd5b6020810160048310610c1857634e487b7160e01b600052602160045260246000fd5b91905290565b803560048110610bc057600080fd5b60008060408385031215610c4057600080fd5b610c4983610c1e565b9150610c5760208401610ba9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c8957600080fd5b610c9283610ba9565b9150602083013567ffffffffffffffff80821115610caf57600080fd5b818501915085601f830112610cc357600080fd5b813581811115610cd557610cd5610c60565b604051601f8201601f19908116603f01168101908382118183101715610cfd57610cfd610c60565b81604052828152886020848701011115610d1657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610d53578181015183820152602001610d3b565b50506000910152565b6020815260008251806020840152610d7b816040850160208701610d38565b601f01601f19169190910160400192915050565b600060208284031215610da157600080fd5b610b7982610c1e565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff821680610dd657610dd6610daa565b6000190192915050565b600063ffffffff808316818103610df957610df9610daa565b6001019392505050565b600060208284031215610e1557600080fd5b5051919050565b60008251610e2e818460208701610d38565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122087176c31f0eeac8854a81200abc477592ce10af55cd7b4a8cbdbb725ed4e4a4b64736f6c63430008150033" + "code": "0x6080604052600436106100865760003560e01c806388a5bf6e1161005957806388a5bf6e146101425780639e97b8f614610162578063ad3cb1cc14610182578063c4d66de8146101c0578063d02971ca146101e057600080fd5b8063442767331461008b5780634cbb87d3146100da5780634f1ef2861461010a57806352d1902d1461011f575b600080fd5b34801561009757600080fd5b506100c46100a6366004610bc5565b6001600160a01b031660009081526001602052604090205460ff1690565b6040516100d19190610bf6565b60405180910390f35b3480156100e657600080fd5b506100fa6100f5366004610c2d565b610215565b60405190151581526020016100d1565b61011d610118366004610c76565b61037d565b005b34801561012b57600080fd5b5061013461039c565b6040519081526020016100d1565b34801561014e57600080fd5b506100c461015d366004610c2d565b6103b9565b34801561016e57600080fd5b506100fa61017d366004610c2d565b61052e565b34801561018e57600080fd5b506101b3604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100d19190610d5c565b3480156101cc57600080fd5b5061011d6101db366004610bc5565b610577565b3480156101ec57600080fd5b506102006101fb366004610d8f565b6106f2565b60405163ffffffff90911681526020016100d1565b60008260006002600083600381111561023057610230610be0565b600381111561024157610241610be0565b815260208101919091526040016000205460ff169050610261813361052e565b6102855760405163472511eb60e11b81523360048201526024015b60405180910390fd5b61028f858561052e565b15610370576001600160a01b0384166000908152600160205260408120805460ff1916905560039086828111156102c8576102c8610be0565b60038111156102d9576102d9610be0565b815260208101919091526040016000908120805463ffffffff16916102fd83610dc0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f5a8379f4a3380f87fd5924475f76a3471ac8d775668601653e3f9ef69a3dd2718760405161035f9190610bf6565b60405180910390a360019250610375565b600092505b505092915050565b610385610738565b61038e826107df565b6103988282610845565b5050565b60006103a6610907565b50600080516020610e3983398151915290565b6000826000600260008360038111156103d4576103d4610be0565b60038111156103e5576103e5610be0565b815260208101919091526040016000205460ff169050610405813361052e565b6104245760405163472511eb60e11b815233600482015260240161027c565b61042e858561052e565b610525576001600160a01b03841660009081526001602081905260409091208054879260ff199091169083600381111561046a5761046a610be0565b02179055506003600086600381111561048557610485610be0565b600381111561049657610496610be0565b815260208101919091526040016000908120805463ffffffff16916104ba83610de0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f47307e88f3e82b4e8cdffde5a264aa53a2ee17636fd8df7effe0a098da4956568760405161051c9190610bf6565b60405180910390a35b50929392505050565b600082600381111561054257610542610be0565b6001600160a01b03831660009081526001602052604090205460ff16600381111561056f5761056f610be0565b149392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105c15750805467ffffffffffffffff808416911610155b156105df5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155610609610950565b60026020527fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e08054600160ff1991821681179092557f679795a0195a1b76cdebb7c51d74e058aee92919b8c3389af86ef24535e8a28c805482168317905560036000527f88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c3805490911690911790556106a08361095e565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006003600083600381111561070a5761070a610be0565b600381111561071b5761071b610be0565b815260208101919091526040016000205463ffffffff1692915050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806107bf57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107b3600080516020610e39833981519152546001600160a01b031690565b6001600160a01b031614155b156107dd5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561082a57600080fd5b505afa15801561083e573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e03565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b038316600482015260240161027c565b600080516020610e3983398151915281146108f857604051632a87526960e21b81526004810182905260240161027c565b6109028383610988565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107dd5760405163703e46dd60e11b815260040160405180910390fd5b61095b6001336103b9565b50565b6109666109de565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b61099182610a27565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156109d6576109028282610a8c565b610398610b02565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107dd57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610a5d57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161027c565b600080516020610e3983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610aa99190610e1c565b600060405180830381855af49150503d8060008114610ae4576040519150601f19603f3d011682016040523d82523d6000602084013e610ae9565b606091505b5091509150610af9858383610b21565b95945050505050565b34156107dd5760405163b398979f60e01b815260040160405180910390fd5b606082610b3657610b3182610b80565b610b79565b8151158015610b4d57506001600160a01b0384163b155b15610b7657604051639996b31560e01b81526001600160a01b038516600482015260240161027c565b50805b9392505050565b805115610b905780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610bc057600080fd5b919050565b600060208284031215610bd757600080fd5b610b7982610ba9565b634e487b7160e01b600052602160045260246000fd5b6020810160048310610c1857634e487b7160e01b600052602160045260246000fd5b91905290565b803560048110610bc057600080fd5b60008060408385031215610c4057600080fd5b610c4983610c1e565b9150610c5760208401610ba9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c8957600080fd5b610c9283610ba9565b9150602083013567ffffffffffffffff80821115610caf57600080fd5b818501915085601f830112610cc357600080fd5b813581811115610cd557610cd5610c60565b604051601f8201601f19908116603f01168101908382118183101715610cfd57610cfd610c60565b81604052828152886020848701011115610d1657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610d53578181015183820152602001610d3b565b50506000910152565b6020815260008251806020840152610d7b816040850160208701610d38565b601f01601f19169190910160400192915050565b600060208284031215610da157600080fd5b610b7982610c1e565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff821680610dd657610dd6610daa565b6000190192915050565b600063ffffffff808316818103610df957610df9610daa565b6001019392505050565b600060208284031215610e1557600080fd5b5051919050565b60008251610e2e818460208701610d38565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122084b9c016f0d123b1684b5e9339cba44ad7e114e6c24770eb69581f25c6daa10b64736f6c63430008140033" }, "0x0000000000000000000000000000000000007777": { "comment": "Proxy: Smart contract to manage validator nodes", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000006666", @@ -130,88 +130,113 @@ "149d22bf3f008a1407770ecbdb723975d92c5073caa510ba413c1db0f8063ed8": "0000000000000000000000886328869e4e1f401e1052a5f4aae8b45f42610201", "7f33ce678224e207038746a5939df116c5dff1ccc6e79de84c95388c521e898c": "000000000000000000000f48de4a0c2939e62891f3c6aca68982975477e45301", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000046e176c8993fdb8d8c3c98b481a560eed5cc8a20" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000d43d7f76ba2a9cc9f64d0d7c9245be66ccbd4a62" } }, - "0x46e176c8993fdb8d8c3c98b481a560eed5cc8a20": { + "0xd43d7f76ba2a9cc9f64d0d7c9245be66ccbd4a62": { "comment": "Implementation: Smart contract to manage validator nodes", "balance": "0", - "code": "0x6080604052600436106100705760003560e01c806352d1902d1161004e57806352d1902d146100ca57806398772d88146100f2578063ad3cb1cc14610112578063b7ab4db51461015057600080fd5b806340a141ff146100755780634d238c8e146100975780634f1ef286146100b7575b600080fd5b34801561008157600080fd5b50610095610090366004610f0a565b610172565b005b3480156100a357600080fd5b506100956100b2366004610f0a565b610430565b6100956100c5366004610f95565b610722565b3480156100d657600080fd5b506100df610741565b6040519081526020015b60405180910390f35b3480156100fe57600080fd5b5061009561010d36600461103b565b61075e565b34801561011e57600080fd5b50610143604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100e9919061115c565b34801561015c57600080fd5b50610165610a27565b6040516100e9919061118f565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906101a59060039033906004016111dc565b602060405180830381865afa1580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e69190611216565b61020a5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b806001600160a01b0381166102325760405163713ce51160e01b815260040160405180910390fd5b6002546001036102555760405163f1a1929360e01b815260040160405180910390fd5b6001600160a01b03828116600090815260036020908152604091829020825180840190935254928316808352600160a01b90930460ff1690820152906102b957604051635a4887e160e01b81526001600160a01b0384166004820152602401610201565b600081602001519050600060028260ff16815481106102da576102da611238565b6000918252602082200154600280546001600160a01b0390921693509061030390600190611264565b8154811061031357610313611238565b600091825260209091200154600280546001600160a01b039092169250829160ff861690811061034557610345611238565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600390915260409020805460ff60a01b1916600160a01b60ff86160217905560028054806103a2576103a2611277565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0384168083526003825260409283902080546001600160a81b0319169055600254925160ff9093168352339290917fb10fc4fba5b5eb2a6e82796887299220653537d6a5fc8a3fb60937bd2442ea29910160405180910390a3505050505050565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906104639060039033906004016111dc565b602060405180830381865afa158015610480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a49190611216565b6104c35760405163472511eb60e11b8152336004820152602401610201565b806001600160a01b0381166104eb5760405163713ce51160e01b815260040160405180910390fd5b6002546101001161051357604051635dd7a94360e11b81526101006004820152602401610201565b60025460005b8160ff168160ff1610156106495760006003600060028460ff168154811061054357610543611238565b60009182526020808320909101546001600160a01b039081168452838201949094526040928301909120825180840190935254928316825260ff600160a01b909304831690820152600280549193509184169081106105a4576105a4611238565b6000918252602090912001546001600160a01b039081169086160361060a5760028260ff16815481106105d9576105d9611238565b60009182526020909120015460405163164688df60e21b81526001600160a01b039091166004820152602401610201565b80516001600160a01b0316330361063657604051635154e66760e11b8152336004820152602401610201565b50806106418161128d565b915050610519565b506040805180820182523380825260ff84811660208085019182526001600160a01b038981166000818152600384528881209751885495518716600160a01b026001600160a81b03199096169316929092179390931790955560028054600181018255958190527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90950180546001600160a01b0319168317905593549451949091168452909290917f4583e1f70afe5f9f38886187732a4b1336bad46fc758cdd6ad86815931d6f6c2910160405180910390a3505050565b61072a610a89565b61073382610b30565b61073d8282610b96565b5050565b600061074b610c58565b506000805160206112fb83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806107a85750805467ffffffffffffffff808416911610155b156107c65760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155825160000361080a57604051635a7582eb60e11b815260040160405180910390fd5b82516101001161083157604051635dd7a94360e11b81526101006004820152602401610201565b60005b83518110156109ae5760006001600160a01b031684828151811061085a5761085a611238565b6020026020010151602001516001600160a01b03160361088d5760405163d4c3bd5160e01b815260040160405180910390fd5b60006001600160a01b03168482815181106108aa576108aa611238565b6020026020010151600001516001600160a01b0316036108dd5760405163713ce51160e01b815260040160405180910390fd5b60008482815181106108f1576108f1611238565b60209081029190910181015180516002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b039384166001600160a01b0319909116179055604080518082018252848601518416815260ff80891682880190815295518516845260039096529120905181549351909416600160a01b026001600160a81b0319909316939091169290921717905550806109a6816112ac565b915050610834565b50600180546001600160a01b0319166001600160a01b0387161790556109d384610ca1565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020018280548015610a7f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a61575b5050505050905090565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610b1057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b046000805160206112fb833981519152546001600160a01b031690565b6001600160a01b031614155b15610b2e5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610b7b57600080fd5b505afa158015610b8f573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610bf0575060408051601f3d908101601f19168201909252610bed918101906112c5565b60015b610c1857604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610201565b6000805160206112fb8339815191528114610c4957604051632a87526960e21b815260048101829052602401610201565b610c538383610ccb565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2e5760405163703e46dd60e11b815260040160405180910390fd5b610ca9610d21565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610cd482610d6a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610d1957610c538282610dcf565b61073d610e47565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b2e57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610da057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610201565b6000805160206112fb83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610dec91906112de565b600060405180830381855af49150503d8060008114610e27576040519150601f19603f3d011682016040523d82523d6000602084013e610e2c565b606091505b5091509150610e3c858383610e66565b925050505b92915050565b3415610b2e5760405163b398979f60e01b815260040160405180910390fd5b606082610e7b57610e7682610ec5565b610ebe565b8151158015610e9257506001600160a01b0384163b155b15610ebb57604051639996b31560e01b81526001600160a01b0385166004820152602401610201565b50805b9392505050565b805115610ed55780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610f0557600080fd5b919050565b600060208284031215610f1c57600080fd5b610ebe82610eee565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610f5e57610f5e610f25565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610f8d57610f8d610f25565b604052919050565b60008060408385031215610fa857600080fd5b610fb183610eee565b915060208084013567ffffffffffffffff80821115610fcf57600080fd5b818601915086601f830112610fe357600080fd5b813581811115610ff557610ff5610f25565b611007601f8201601f19168501610f64565b9150808252878482850101111561101d57600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060006060848603121561105057600080fd5b61105984610eee565b92506020611068818601610eee565b925060408086013567ffffffffffffffff8082111561108657600080fd5b818801915088601f83011261109a57600080fd5b8135818111156110ac576110ac610f25565b6110ba858260051b01610f64565b818152858101925060069190911b83018501908a8211156110da57600080fd5b928501925b818410156111285784848c0312156110f75760008081fd5b6110ff610f3b565b61110885610eee565b8152611115878601610eee565b81880152835292840192918501916110df565b8096505050505050509250925092565b60005b8381101561115357818101518382015260200161113b565b50506000910152565b602081526000825180602084015261117b816040850160208701611138565b601f01601f19169190910160400192915050565b6020808252825182820181905260009190848201906040850190845b818110156111d05783516001600160a01b0316835292840192918401916001016111ab565b50909695505050505050565b60408101600484106111fe57634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b60006020828403121561122857600080fd5b81518015158114610ebe57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610e4157610e4161124e565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff81036112a3576112a361124e565b60010192915050565b6000600182016112be576112be61124e565b5060010190565b6000602082840312156112d757600080fd5b5051919050565b600082516112f0818460208701611138565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220aa9456bfd75b25953e5f9d020af610b9fd012849f1f82126a2b153e28979ed5864736f6c63430008150033" + "code": "0x6080604052600436106100705760003560e01c806352d1902d1161004e57806352d1902d146100ca57806398772d88146100f2578063ad3cb1cc14610112578063b7ab4db51461015057600080fd5b806340a141ff146100755780634d238c8e146100975780634f1ef286146100b7575b600080fd5b34801561008157600080fd5b50610095610090366004610f0a565b610172565b005b3480156100a357600080fd5b506100956100b2366004610f0a565b610430565b6100956100c5366004610f95565b610722565b3480156100d657600080fd5b506100df610741565b6040519081526020015b60405180910390f35b3480156100fe57600080fd5b5061009561010d36600461103b565b61075e565b34801561011e57600080fd5b50610143604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100e9919061115c565b34801561015c57600080fd5b50610165610a27565b6040516100e9919061118f565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906101a59060039033906004016111dc565b602060405180830381865afa1580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e69190611216565b61020a5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b806001600160a01b0381166102325760405163713ce51160e01b815260040160405180910390fd5b6002546001036102555760405163f1a1929360e01b815260040160405180910390fd5b6001600160a01b03828116600090815260036020908152604091829020825180840190935254928316808352600160a01b90930460ff1690820152906102b957604051635a4887e160e01b81526001600160a01b0384166004820152602401610201565b600081602001519050600060028260ff16815481106102da576102da611238565b6000918252602082200154600280546001600160a01b0390921693509061030390600190611264565b8154811061031357610313611238565b600091825260209091200154600280546001600160a01b039092169250829160ff861690811061034557610345611238565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600390915260409020805460ff60a01b1916600160a01b60ff86160217905560028054806103a2576103a2611277565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0384168083526003825260409283902080546001600160a81b0319169055600254925160ff9093168352339290917fb10fc4fba5b5eb2a6e82796887299220653537d6a5fc8a3fb60937bd2442ea29910160405180910390a3505050505050565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906104639060039033906004016111dc565b602060405180830381865afa158015610480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a49190611216565b6104c35760405163472511eb60e11b8152336004820152602401610201565b806001600160a01b0381166104eb5760405163713ce51160e01b815260040160405180910390fd5b6002546101001161051357604051635dd7a94360e11b81526101006004820152602401610201565b60025460005b8160ff168160ff1610156106495760006003600060028460ff168154811061054357610543611238565b60009182526020808320909101546001600160a01b039081168452838201949094526040928301909120825180840190935254928316825260ff600160a01b909304831690820152600280549193509184169081106105a4576105a4611238565b6000918252602090912001546001600160a01b039081169086160361060a5760028260ff16815481106105d9576105d9611238565b60009182526020909120015460405163164688df60e21b81526001600160a01b039091166004820152602401610201565b80516001600160a01b0316330361063657604051635154e66760e11b8152336004820152602401610201565b50806106418161128d565b915050610519565b506040805180820182523380825260ff84811660208085019182526001600160a01b038981166000818152600384528881209751885495518716600160a01b026001600160a81b03199096169316929092179390931790955560028054600181018255958190527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90950180546001600160a01b0319168317905593549451949091168452909290917f4583e1f70afe5f9f38886187732a4b1336bad46fc758cdd6ad86815931d6f6c2910160405180910390a3505050565b61072a610a89565b61073382610b30565b61073d8282610b96565b5050565b600061074b610c58565b506000805160206112fb83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806107a85750805467ffffffffffffffff808416911610155b156107c65760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155825160000361080a57604051635a7582eb60e11b815260040160405180910390fd5b82516101001161083157604051635dd7a94360e11b81526101006004820152602401610201565b60005b83518110156109ae5760006001600160a01b031684828151811061085a5761085a611238565b6020026020010151602001516001600160a01b03160361088d5760405163d4c3bd5160e01b815260040160405180910390fd5b60006001600160a01b03168482815181106108aa576108aa611238565b6020026020010151600001516001600160a01b0316036108dd5760405163713ce51160e01b815260040160405180910390fd5b60008482815181106108f1576108f1611238565b60209081029190910181015180516002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b039384166001600160a01b0319909116179055604080518082018252848601518416815260ff80891682880190815295518516845260039096529120905181549351909416600160a01b026001600160a81b0319909316939091169290921717905550806109a6816112ac565b915050610834565b50600180546001600160a01b0319166001600160a01b0387161790556109d384610ca1565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020018280548015610a7f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a61575b5050505050905090565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610b1057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b046000805160206112fb833981519152546001600160a01b031690565b6001600160a01b031614155b15610b2e5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610b7b57600080fd5b505afa158015610b8f573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610bf0575060408051601f3d908101601f19168201909252610bed918101906112c5565b60015b610c1857604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610201565b6000805160206112fb8339815191528114610c4957604051632a87526960e21b815260048101829052602401610201565b610c538383610ccb565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2e5760405163703e46dd60e11b815260040160405180910390fd5b610ca9610d21565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610cd482610d6a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610d1957610c538282610dcf565b61073d610e47565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b2e57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610da057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610201565b6000805160206112fb83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610dec91906112de565b600060405180830381855af49150503d8060008114610e27576040519150601f19603f3d011682016040523d82523d6000602084013e610e2c565b606091505b5091509150610e3c858383610e66565b925050505b92915050565b3415610b2e5760405163b398979f60e01b815260040160405180910390fd5b606082610e7b57610e7682610ec5565b610ebe565b8151158015610e9257506001600160a01b0384163b155b15610ebb57604051639996b31560e01b81526001600160a01b0385166004820152602401610201565b50805b9392505050565b805115610ed55780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610f0557600080fd5b919050565b600060208284031215610f1c57600080fd5b610ebe82610eee565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610f5e57610f5e610f25565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610f8d57610f8d610f25565b604052919050565b60008060408385031215610fa857600080fd5b610fb183610eee565b915060208084013567ffffffffffffffff80821115610fcf57600080fd5b818601915086601f830112610fe357600080fd5b813581811115610ff557610ff5610f25565b611007601f8201601f19168501610f64565b9150808252878482850101111561101d57600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060006060848603121561105057600080fd5b61105984610eee565b92506020611068818601610eee565b925060408086013567ffffffffffffffff8082111561108657600080fd5b818801915088601f83011261109a57600080fd5b8135818111156110ac576110ac610f25565b6110ba858260051b01610f64565b818152858101925060069190911b83018501908a8211156110da57600080fd5b928501925b818410156111285784848c0312156110f75760008081fd5b6110ff610f3b565b61110885610eee565b8152611115878601610eee565b81880152835292840192918501916110df565b8096505050505050509250925092565b60005b8381101561115357818101518382015260200161113b565b50506000910152565b602081526000825180602084015261117b816040850160208701611138565b601f01601f19169190910160400192915050565b6020808252825182820181905260009190848201906040850190845b818110156111d05783516001600160a01b0316835292840192918401916001016111ab565b50909695505050505050565b60408101600484106111fe57634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b60006020828403121561122857600080fd5b81518015158114610ebe57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610e4157610e4161124e565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff81036112a3576112a361124e565b60010192915050565b6000600182016112be576112be61124e565b5060010190565b6000602082840312156112d757600080fd5b5051919050565b600082516112f0818460208701611138565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e9ae43f43d0568a1c6ef2d1786bfcad7f4b35a9335946e6d56c9be7300a36ca664736f6c63430008140033" }, "0x0000000000000000000000000000000000009999": { "comment": "Proxy: Smart contract to manage proxy contract upgrades", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000006b01f5ccf71b99bf6046ca794d4468c49362d8bc" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000431b0ec220a7f17b7c89ddd7375f36929332d3c8" } }, - "0x6b01f5ccf71b99bf6046ca794d4468c49362d8bc": { + "0x431b0ec220a7f17b7c89ddd7375f36929332d3c8": { "comment": "Implementation: Smart contract to manage proxy contract upgrades", "balance": "0", - "code": "0x6080604052600436106100705760003560e01c80637e5465ba1161004e5780637e5465ba146100d2578063ad3cb1cc146100f2578063c4d66de814610130578063e8f158641461015057600080fd5b80634f1ef2861461007557806352d1902d1461008a578063574a81d7146100b2575b600080fd5b610088610083366004610c59565b610170565b005b34801561009657600080fd5b5061009f61018f565b6040519081526020015b60405180910390f35b3480156100be57600080fd5b506100886100cd366004610d1b565b6101ac565b3480156100de57600080fd5b506100886100ed366004610d1b565b6101d3565b3480156100fe57600080fd5b50610123604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a99190610d72565b34801561013c57600080fd5b5061008861014b366004610da5565b610475565b34801561015c57600080fd5b5061008861016b366004610d1b565b610565565b610178610791565b61018182610838565b61018b8282610845565b5050565b6000610199610902565b50600080516020610f6083398151915290565b6101b6828261094b565b61018b57604051638af69cf160e01b815260040160405180910390fd5b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610206906001903390600401610de2565b602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610e08565b61026b5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b6001600160a01b0380831660009081526001602090815260408083209385168352929052908120600201548391839190036102cc57604051633af3b55760e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b0380851660009081526001602090815260408083209387168352928152828220338352905220548490849060ff1615610332576040516316d5788b60e31b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038087166000908152600160208181526040808420948a16808552858352818520338652808452918520805460ff191685179055845293905291909101805463ffffffff169161038883610e40565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316856001600160a01b0316876001600160a01b03167fc42e62d9f6b29d37599fcb472a6f30bc6e8c8d6fbbcb774ac585c02b314bd2ad60405160405180910390a46103fb868661094b565b1561046d576040805163278f794360e11b81526001600160a01b03878116600483015260248201929092526000604482015290871690634f1ef28690606401600060405180830381600087803b15801561045457600080fd5b505af1158015610468573d6000803e3d6000fd5b505050505b505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104bf5750805467ffffffffffffffff808416911610155b156104dd5760405163f92ee8a960e01b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815468ff0000000000000000191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610598906001903390600401610de2565b602060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610e08565b6105f85760405163472511eb60e11b8152336004820152602401610262565b80806001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610653575060408051601f3d908101601f1916820190925261065091810190610e63565b60015b61067b57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915281146106ac57604051632a87526960e21b815260048101829052602401610262565b6001600160a01b03808516600090815260016020908152604080832093871683529290522060020154849084901561070a57604051634cc571cf60e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038681166000818152600160208181526040808420958b16808552959091528083209182018054640100000000600160c01b031916336401000000008102919091179091554260029093019290925551909392917fe33956f8d60ae2b38d9860e46ec9b53d8fb58aa99a9404b1195b7ce35d2941dc91a45050505b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061081857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661080c600080516020610f60833981519152546001600160a01b031690565b6001600160a01b031614155b156108365760405163703e46dd60e11b815260040160405180910390fd5b565b61084230826101ac565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e63565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610262565b600080516020610f6083398151915281146108f857604051632a87526960e21b815260048101829052602401610262565b61078c8383610a28565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108365760405163703e46dd60e11b815260040160405180910390fd5b60008054604051636814b8e560e11b815282916001600160a01b03169063d02971ca9061097d90600190600401610e7c565b602060405180830381865afa15801561099a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109be9190610e8a565b6001600160a01b03808616600090815260016020818152604080842094891684529390529181209091015491925063ffffffff90911690610a0a610a03846006610eb0565b600a610a7e565b90508063ffffffff168263ffffffff16101593505050505b92915050565b610a3182610aa8565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a765761078c8282610b0d565b61018b610b83565b600081610a8c600185610ed8565b610a969190610ef5565b610aa1906001610f26565b9392505050565b806001600160a01b03163b600003610ade57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610b2a9190610f43565b600060405180830381855af49150503d8060008114610b65576040519150601f19603f3d011682016040523d82523d6000602084013e610b6a565b606091505b5091509150610b7a858383610ba2565b95945050505050565b34156108365760405163b398979f60e01b815260040160405180910390fd5b606082610bb757610bb282610bfe565b610aa1565b8151158015610bce57506001600160a01b0384163b155b15610bf757604051639996b31560e01b81526001600160a01b0385166004820152602401610262565b5092915050565b805115610c0e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610c3e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c6c57600080fd5b610c7583610c27565b9150602083013567ffffffffffffffff80821115610c9257600080fd5b818501915085601f830112610ca657600080fd5b813581811115610cb857610cb8610c43565b604051601f8201601f19908116603f01168101908382118183101715610ce057610ce0610c43565b81604052828152886020848701011115610cf957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060408385031215610d2e57600080fd5b610d3783610c27565b9150610d4560208401610c27565b90509250929050565b60005b83811015610d69578181015183820152602001610d51565b50506000910152565b6020815260008251806020840152610d91816040850160208701610d4e565b601f01601f19169190910160400192915050565b600060208284031215610db757600080fd5b610aa182610c27565b60048110610dde57634e487b7160e01b600052602160045260246000fd5b9052565b60408101610df08285610dc0565b6001600160a01b039290921660209190910152919050565b600060208284031215610e1a57600080fd5b81518015158114610aa157600080fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103610e5957610e59610e2a565b6001019392505050565b600060208284031215610e7557600080fd5b5051919050565b60208101610a228284610dc0565b600060208284031215610e9c57600080fd5b815163ffffffff81168114610aa157600080fd5b63ffffffff818116838216028082169190828114610ed057610ed0610e2a565b505092915050565b63ffffffff828116828216039080821115610bf757610bf7610e2a565b600063ffffffff80841680610f1a57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b63ffffffff818116838216019080821115610bf757610bf7610e2a565b60008251610f55818460208701610d4e565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212202100ada902756d4dd181765a28b2c82f16c75cc475fdfa21316f7f065845770564736f6c63430008150033" - }, - "0x0000000000000000000000000000000000001111": { - "comment": "Regex library to validate DID syntax", - "balance": "0", - "code": "0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c806332ac752b1461004557806355e79d291461006d575b600080fd5b6100586100533660046120b3565b610082565b60405190151581526020015b60405180910390f35b6100756100f8565b6040516100649190612164565b604080518082019091526000808252610114602083015290815b83518110156100f05760008482815181106100b9576100b96121b2565b602001015160f81c60f81b60f81c90506100da81846020015163ffffffff16565b92505080806100e8906121c8565b91505061009c565b505192915050565b6040518060600160405280604081526020016122066040913981565b604080518082019091526000815261209360208201528160ff16606403610150575050604080518082019091526000815261016b602082015290565b505060408051808201909152600081526101a7602082015290565b604080518082019091526000815261209360208201528160ff1660690361015057505060408051808201909152600081526101c2602082015290565b60408051808201909152600081526120936020820152610150565b604080518082019091526000815261209360208201528160ff1660640361015057505060408051808201909152600081526101fe602082015290565b604080518082019091526000815261209360208201528160ff16603a03610150575050604080518082019091526000815261023a602082015290565b604080518082019091526000815261209360208201528160ff16606903610276575050604080518082019091526000815261029c602082015290565b8160ff1660730361015057505060408051808201909152600081526102d8602082015290565b604080518082019091526000815261209360208201528160ff16606e036101505750506040805180820190915260008152610314602082015290565b604080518082019091526000815261209360208201528160ff16606f036101505750506040805180820190915260008152610350602082015290565b604080518082019091526000815261209360208201528160ff16606403610150575050604080518082019091526000815261038c602082015290565b604080518082019091526000815261209360208201528160ff1660760361015057505060408051808201909152600081526103c8602082015290565b604080518082019091526000815261209360208201528160ff166079036101505750506040805180820190915260008152610405602082015290565b604080518082019091526000815261209360208201525b8160ff16603a036101505750506040805180820190915260008152610441602082015290565b604080518082019091526000815261209360208201528160ff166032036103df57505060408051808201909152600081526103c8602082015290565b6040805180820190915260008152612093602082015260308260ff161015801561046f575060398260ff1611155b8061048d575060418260ff161015801561048d5750605a8260ff1611155b806104ab575060618260ff16101580156104ab5750607a8260ff1611155b1561015057505060408051808201909152600081526104cb602082015290565b6040805180820190915260008152612093602082015260308260ff16101580156104f9575060398260ff1611155b80610517575060418260ff16101580156105175750605a8260ff1611155b80610535575060618260ff16101580156105355750607a8260ff1611155b1561055557505060408051808201909152600081526104cb602082015290565b8160ff16603a03610150575050604080518082019091526000815261057b602082015290565b604080518082019091526000815261209360208201528160ff16603014806105a657508160ff166049145b806105b457508160ff16604f145b806105c257508160ff16606c145b156105e257505060408051808201909152600081526106b0602082015290565b60318260ff16101580156105fa575060398260ff1611155b80610618575060418260ff1610158015610618575060488260ff1611155b806106365750604a8260ff16101580156106365750604e8260ff1611155b80610654575060508260ff16101580156106545750605a8260ff1611155b80610672575060618260ff16101580156106725750606b8260ff1611155b806106905750606d8260ff16101580156106905750607a8260ff1611155b15610150575050604080518082019091526000815261073a602082015290565b6040805180820190915260008152612093602082015260308260ff16101580156106de575060398260ff1611155b806106fc575060418260ff16101580156106fc5750605a8260ff1611155b8061071a575060618260ff161015801561071a5750607a8260ff1611155b1561055557505060408051808201909152600081526106b0602082015290565b604080518082019091526000815261209360208201528160ff166030148061076557508160ff166049145b8061077357508160ff16604f145b8061078157508160ff16606c145b156107a157505060408051808201909152600081526106b0602082015290565b60318260ff16101580156107b9575060398260ff1611155b806107d7575060418260ff16101580156107d7575060488260ff1611155b806107f55750604a8260ff16101580156107f55750604e8260ff1611155b80610813575060508260ff16101580156108135750605a8260ff1611155b80610831575060618260ff16101580156108315750606b8260ff1611155b8061084f5750606d8260ff161015801561084f5750607a8260ff1611155b15610555575050604080518082019091526000815261086f602082015290565b604080518082019091526000815261209360208201528160ff166030148061089a57508160ff166049145b806108a857508160ff16604f145b806108b657508160ff16606c145b156108d657505060408051808201909152600081526106b0602082015290565b60318260ff16101580156108ee575060398260ff1611155b8061090c575060418260ff161015801561090c575060488260ff1611155b8061092a5750604a8260ff161015801561092a5750604e8260ff1611155b80610948575060508260ff16101580156109485750605a8260ff1611155b80610966575060618260ff16101580156109665750606b8260ff1611155b806109845750606d8260ff16101580156109845750607a8260ff1611155b1561055557505060408051808201909152600081526109a4602082015290565b604080518082019091526000815261209360208201528160ff16603014806109cf57508160ff166049145b806109dd57508160ff16604f145b806109eb57508160ff16606c145b15610a0b57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015610a23575060398260ff1611155b80610a41575060418260ff1610158015610a41575060488260ff1611155b80610a5f5750604a8260ff1610158015610a5f5750604e8260ff1611155b80610a7d575060508260ff1610158015610a7d5750605a8260ff1611155b80610a9b575060618260ff1610158015610a9b5750606b8260ff1611155b80610ab95750606d8260ff1610158015610ab95750607a8260ff1611155b156105555750506040805180820190915260008152610ad9602082015290565b604080518082019091526000815261209360208201528160ff1660301480610b0457508160ff166049145b80610b1257508160ff16604f145b80610b2057508160ff16606c145b15610b4057505060408051808201909152600081526106b0602082015290565b60318260ff1610158015610b58575060398260ff1611155b80610b76575060418260ff1610158015610b76575060488260ff1611155b80610b945750604a8260ff1610158015610b945750604e8260ff1611155b80610bb2575060508260ff1610158015610bb25750605a8260ff1611155b80610bd0575060618260ff1610158015610bd05750606b8260ff1611155b80610bee5750606d8260ff1610158015610bee5750607a8260ff1611155b156105555750506040805180820190915260008152610c0e602082015290565b604080518082019091526000815261209360208201528160ff1660301480610c3957508160ff166049145b80610c4757508160ff16604f145b80610c5557508160ff16606c145b15610c7557505060408051808201909152600081526106b0602082015290565b60318260ff1610158015610c8d575060398260ff1611155b80610cab575060418260ff1610158015610cab575060488260ff1611155b80610cc95750604a8260ff1610158015610cc95750604e8260ff1611155b80610ce7575060508260ff1610158015610ce75750605a8260ff1611155b80610d05575060618260ff1610158015610d055750606b8260ff1611155b80610d235750606d8260ff1610158015610d235750607a8260ff1611155b156105555750506040805180820190915260008152610d43602082015290565b604080518082019091526000815261209360208201528160ff1660301480610d6e57508160ff166049145b80610d7c57508160ff16604f145b80610d8a57508160ff16606c145b15610daa57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015610dc2575060398260ff1611155b80610de0575060418260ff1610158015610de0575060488260ff1611155b80610dfe5750604a8260ff1610158015610dfe5750604e8260ff1611155b80610e1c575060508260ff1610158015610e1c5750605a8260ff1611155b80610e3a575060618260ff1610158015610e3a5750606b8260ff1611155b80610e585750606d8260ff1610158015610e585750607a8260ff1611155b156105555750506040805180820190915260008152610e78602082015290565b604080518082019091526000815261209360208201528160ff1660301480610ea357508160ff166049145b80610eb157508160ff16604f145b80610ebf57508160ff16606c145b15610edf57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015610ef7575060398260ff1611155b80610f15575060418260ff1610158015610f15575060488260ff1611155b80610f335750604a8260ff1610158015610f335750604e8260ff1611155b80610f51575060508260ff1610158015610f515750605a8260ff1611155b80610f6f575060618260ff1610158015610f6f5750606b8260ff1611155b80610f8d5750606d8260ff1610158015610f8d5750607a8260ff1611155b156105555750506040805180820190915260008152610fad602082015290565b604080518082019091526000815261209360208201528160ff1660301480610fd857508160ff166049145b80610fe657508160ff16604f145b80610ff457508160ff16606c145b1561101457505060408051808201909152600081526106b0602082015290565b60318260ff161015801561102c575060398260ff1611155b8061104a575060418260ff161015801561104a575060488260ff1611155b806110685750604a8260ff16101580156110685750604e8260ff1611155b80611086575060508260ff16101580156110865750605a8260ff1611155b806110a4575060618260ff16101580156110a45750606b8260ff1611155b806110c25750606d8260ff16101580156110c25750607a8260ff1611155b1561055557505060408051808201909152600081526110e2602082015290565b604080518082019091526000815261209360208201528160ff166030148061110d57508160ff166049145b8061111b57508160ff16604f145b8061112957508160ff16606c145b1561114957505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611161575060398260ff1611155b8061117f575060418260ff161015801561117f575060488260ff1611155b8061119d5750604a8260ff161015801561119d5750604e8260ff1611155b806111bb575060508260ff16101580156111bb5750605a8260ff1611155b806111d9575060618260ff16101580156111d95750606b8260ff1611155b806111f75750606d8260ff16101580156111f75750607a8260ff1611155b156105555750506040805180820190915260008152611217602082015290565b604080518082019091526000815261209360208201528160ff166030148061124257508160ff166049145b8061125057508160ff16604f145b8061125e57508160ff16606c145b1561127e57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611296575060398260ff1611155b806112b4575060418260ff16101580156112b4575060488260ff1611155b806112d25750604a8260ff16101580156112d25750604e8260ff1611155b806112f0575060508260ff16101580156112f05750605a8260ff1611155b8061130e575060618260ff161015801561130e5750606b8260ff1611155b8061132c5750606d8260ff161015801561132c5750607a8260ff1611155b15610555575050604080518082019091526000815261134c602082015290565b604080518082019091526000815261209360208201528160ff166030148061137757508160ff166049145b8061138557508160ff16604f145b8061139357508160ff16606c145b156113b357505060408051808201909152600081526106b0602082015290565b60318260ff16101580156113cb575060398260ff1611155b806113e9575060418260ff16101580156113e9575060488260ff1611155b806114075750604a8260ff16101580156114075750604e8260ff1611155b80611425575060508260ff16101580156114255750605a8260ff1611155b80611443575060618260ff16101580156114435750606b8260ff1611155b806114615750606d8260ff16101580156114615750607a8260ff1611155b156105555750506040805180820190915260008152611481602082015290565b604080518082019091526000815261209360208201528160ff16603014806114ac57508160ff166049145b806114ba57508160ff16604f145b806114c857508160ff16606c145b156114e857505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611500575060398260ff1611155b8061151e575060418260ff161015801561151e575060488260ff1611155b8061153c5750604a8260ff161015801561153c5750604e8260ff1611155b8061155a575060508260ff161015801561155a5750605a8260ff1611155b80611578575060618260ff16101580156115785750606b8260ff1611155b806115965750606d8260ff16101580156115965750607a8260ff1611155b1561055557505060408051808201909152600081526115b6602082015290565b604080518082019091526000815261209360208201528160ff16603014806115e157508160ff166049145b806115ef57508160ff16604f145b806115fd57508160ff16606c145b1561161d57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611635575060398260ff1611155b80611653575060418260ff1610158015611653575060488260ff1611155b806116715750604a8260ff16101580156116715750604e8260ff1611155b8061168f575060508260ff161015801561168f5750605a8260ff1611155b806116ad575060618260ff16101580156116ad5750606b8260ff1611155b806116cb5750606d8260ff16101580156116cb5750607a8260ff1611155b1561055557505060408051808201909152600081526116eb602082015290565b604080518082019091526000815261209360208201528160ff166030148061171657508160ff166049145b8061172457508160ff16604f145b8061173257508160ff16606c145b1561175257505060408051808201909152600081526106b0602082015290565b60318260ff161015801561176a575060398260ff1611155b80611788575060418260ff1610158015611788575060488260ff1611155b806117a65750604a8260ff16101580156117a65750604e8260ff1611155b806117c4575060508260ff16101580156117c45750605a8260ff1611155b806117e2575060618260ff16101580156117e25750606b8260ff1611155b806118005750606d8260ff16101580156118005750607a8260ff1611155b156105555750506040805180820190915260008152611820602082015290565b604080518082019091526000815261209360208201528160ff166030148061184b57508160ff166049145b8061185957508160ff16604f145b8061186757508160ff16606c145b1561188757505060408051808201909152600081526106b0602082015290565b60318260ff161015801561189f575060398260ff1611155b806118bd575060418260ff16101580156118bd575060488260ff1611155b806118db5750604a8260ff16101580156118db5750604e8260ff1611155b806118f9575060508260ff16101580156118f95750605a8260ff1611155b80611917575060618260ff16101580156119175750606b8260ff1611155b806119355750606d8260ff16101580156119355750607a8260ff1611155b156105555750506040805180820190915260008152611955602082015290565b604080518082019091526000815261209360208201528160ff166030148061198057508160ff166049145b8061198e57508160ff16604f145b8061199c57508160ff16606c145b156119bc57505060408051808201909152600081526106b0602082015290565b60318260ff16101580156119d4575060398260ff1611155b806119f2575060418260ff16101580156119f2575060488260ff1611155b80611a105750604a8260ff1610158015611a105750604e8260ff1611155b80611a2e575060508260ff1610158015611a2e5750605a8260ff1611155b80611a4c575060618260ff1610158015611a4c5750606b8260ff1611155b80611a6a5750606d8260ff1610158015611a6a5750607a8260ff1611155b156105555750506040805180820190915260008152611a8a602082015290565b604080518082019091526000815261209360208201528160ff1660301480611ab557508160ff166049145b80611ac357508160ff16604f145b80611ad157508160ff16606c145b15611af157505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611b09575060398260ff1611155b80611b27575060418260ff1610158015611b27575060488260ff1611155b80611b455750604a8260ff1610158015611b455750604e8260ff1611155b80611b63575060508260ff1610158015611b635750605a8260ff1611155b80611b81575060618260ff1610158015611b815750606b8260ff1611155b80611b9f5750606d8260ff1610158015611b9f5750607a8260ff1611155b156105555750506040805180820190915260008152611bbf602082015290565b604080518082019091526000815261209360208201528160ff1660301480611bea57508160ff166049145b80611bf857508160ff16604f145b80611c0657508160ff16606c145b15611c2657505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611c3e575060398260ff1611155b80611c5c575060418260ff1610158015611c5c575060488260ff1611155b80611c7a5750604a8260ff1610158015611c7a5750604e8260ff1611155b80611c98575060508260ff1610158015611c985750605a8260ff1611155b80611cb6575060618260ff1610158015611cb65750606b8260ff1611155b80611cd45750606d8260ff1610158015611cd45750607a8260ff1611155b156105555750506040805180820190915260008152611cf4602082015290565b604080518082019091526000815261209360208201528160ff1660301480611d1f57508160ff166049145b80611d2d57508160ff16604f145b80611d3b57508160ff16606c145b15611d5b57505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611d73575060398260ff1611155b80611d91575060418260ff1610158015611d91575060488260ff1611155b80611daf5750604a8260ff1610158015611daf5750604e8260ff1611155b80611dcd575060508260ff1610158015611dcd5750605a8260ff1611155b80611deb575060618260ff1610158015611deb5750606b8260ff1611155b80611e095750606d8260ff1610158015611e095750607a8260ff1611155b156105555750506040805180820190915260008152611e29602082015290565b604080518082019091526000815261209360208201528160ff1660301480611e5457508160ff166049145b80611e6257508160ff16604f145b80611e7057508160ff16606c145b15611e9057505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611ea8575060398260ff1611155b80611ec6575060418260ff1610158015611ec6575060488260ff1611155b80611ee45750604a8260ff1610158015611ee45750604e8260ff1611155b80611f02575060508260ff1610158015611f025750605a8260ff1611155b80611f20575060618260ff1610158015611f205750606b8260ff1611155b80611f3e5750606d8260ff1610158015611f3e5750607a8260ff1611155b156105555750506040805180820190915260018152611f5e602082015290565b604080518082019091526000815261209360208201528160ff1660301480611f8957508160ff166049145b80611f9757508160ff16604f145b80611fa557508160ff16606c145b15611fc557505060408051808201909152600081526106b0602082015290565b60318260ff1610158015611fdd575060398260ff1611155b80611ffb575060418260ff1610158015611ffb575060488260ff1611155b806120195750604a8260ff16101580156120195750604e8260ff1611155b80612037575060508260ff16101580156120375750605a8260ff1611155b80612055575060618260ff16101580156120555750606b8260ff1611155b806120735750606d8260ff16101580156120735750607a8260ff1611155b1561055557505060408051808201909152600181526106b0602082015290565b61209b6121ef565b565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156120c557600080fd5b813567ffffffffffffffff808211156120dd57600080fd5b818401915084601f8301126120f157600080fd5b8135818111156121035761210361209d565b604051601f8201601f19908116603f0116810190838211818310171561212b5761212b61209d565b8160405282815287602084870101111561214457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b8181101561219157858101830151858201604001528201612175565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016121e857634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052605160045260246000fdfe6469643a28696e6479327c696e64797c736f76293a285b612d7a412d5a302d395d2b3a292b5b312d39412d484a2d4e502d5a612d6b6d2d7a5d7b32312c32327da2646970667358221220714c9b9760d79d145e7f1deb0af53f2fee7cdff44e675a07205b9250290b441364736f6c63430008150033", - "storage": {} + "code": "0x6080604052600436106100705760003560e01c80637e5465ba1161004e5780637e5465ba146100d2578063ad3cb1cc146100f2578063c4d66de814610130578063e8f158641461015057600080fd5b80634f1ef2861461007557806352d1902d1461008a578063574a81d7146100b2575b600080fd5b610088610083366004610c59565b610170565b005b34801561009657600080fd5b5061009f61018f565b6040519081526020015b60405180910390f35b3480156100be57600080fd5b506100886100cd366004610d1b565b6101ac565b3480156100de57600080fd5b506100886100ed366004610d1b565b6101d3565b3480156100fe57600080fd5b50610123604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a99190610d72565b34801561013c57600080fd5b5061008861014b366004610da5565b610475565b34801561015c57600080fd5b5061008861016b366004610d1b565b610565565b610178610791565b61018182610838565b61018b8282610845565b5050565b6000610199610902565b50600080516020610f6083398151915290565b6101b6828261094b565b61018b57604051638af69cf160e01b815260040160405180910390fd5b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610206906001903390600401610de2565b602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610e08565b61026b5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b6001600160a01b0380831660009081526001602090815260408083209385168352929052908120600201548391839190036102cc57604051633af3b55760e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b0380851660009081526001602090815260408083209387168352928152828220338352905220548490849060ff1615610332576040516316d5788b60e31b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038087166000908152600160208181526040808420948a16808552858352818520338652808452918520805460ff191685179055845293905291909101805463ffffffff169161038883610e40565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316856001600160a01b0316876001600160a01b03167fc42e62d9f6b29d37599fcb472a6f30bc6e8c8d6fbbcb774ac585c02b314bd2ad60405160405180910390a46103fb868661094b565b1561046d576040805163278f794360e11b81526001600160a01b03878116600483015260248201929092526000604482015290871690634f1ef28690606401600060405180830381600087803b15801561045457600080fd5b505af1158015610468573d6000803e3d6000fd5b505050505b505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104bf5750805467ffffffffffffffff808416911610155b156104dd5760405163f92ee8a960e01b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815468ff0000000000000000191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610598906001903390600401610de2565b602060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610e08565b6105f85760405163472511eb60e11b8152336004820152602401610262565b80806001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610653575060408051601f3d908101601f1916820190925261065091810190610e63565b60015b61067b57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915281146106ac57604051632a87526960e21b815260048101829052602401610262565b6001600160a01b03808516600090815260016020908152604080832093871683529290522060020154849084901561070a57604051634cc571cf60e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038681166000818152600160208181526040808420958b16808552959091528083209182018054640100000000600160c01b031916336401000000008102919091179091554260029093019290925551909392917fe33956f8d60ae2b38d9860e46ec9b53d8fb58aa99a9404b1195b7ce35d2941dc91a45050505b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061081857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661080c600080516020610f60833981519152546001600160a01b031690565b6001600160a01b031614155b156108365760405163703e46dd60e11b815260040160405180910390fd5b565b61084230826101ac565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e63565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610262565b600080516020610f6083398151915281146108f857604051632a87526960e21b815260048101829052602401610262565b61078c8383610a28565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108365760405163703e46dd60e11b815260040160405180910390fd5b60008054604051636814b8e560e11b815282916001600160a01b03169063d02971ca9061097d90600190600401610e7c565b602060405180830381865afa15801561099a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109be9190610e8a565b6001600160a01b03808616600090815260016020818152604080842094891684529390529181209091015491925063ffffffff90911690610a0a610a03846006610eb0565b600a610a7e565b90508063ffffffff168263ffffffff16101593505050505b92915050565b610a3182610aa8565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a765761078c8282610b0d565b61018b610b83565b600081610a8c600185610ed8565b610a969190610ef5565b610aa1906001610f26565b9392505050565b806001600160a01b03163b600003610ade57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610b2a9190610f43565b600060405180830381855af49150503d8060008114610b65576040519150601f19603f3d011682016040523d82523d6000602084013e610b6a565b606091505b5091509150610b7a858383610ba2565b95945050505050565b34156108365760405163b398979f60e01b815260040160405180910390fd5b606082610bb757610bb282610bfe565b610aa1565b8151158015610bce57506001600160a01b0384163b155b15610bf757604051639996b31560e01b81526001600160a01b0385166004820152602401610262565b5092915050565b805115610c0e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610c3e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c6c57600080fd5b610c7583610c27565b9150602083013567ffffffffffffffff80821115610c9257600080fd5b818501915085601f830112610ca657600080fd5b813581811115610cb857610cb8610c43565b604051601f8201601f19908116603f01168101908382118183101715610ce057610ce0610c43565b81604052828152886020848701011115610cf957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060408385031215610d2e57600080fd5b610d3783610c27565b9150610d4560208401610c27565b90509250929050565b60005b83811015610d69578181015183820152602001610d51565b50506000910152565b6020815260008251806020840152610d91816040850160208701610d4e565b601f01601f19169190910160400192915050565b600060208284031215610db757600080fd5b610aa182610c27565b60048110610dde57634e487b7160e01b600052602160045260246000fd5b9052565b60408101610df08285610dc0565b6001600160a01b039290921660209190910152919050565b600060208284031215610e1a57600080fd5b81518015158114610aa157600080fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103610e5957610e59610e2a565b6001019392505050565b600060208284031215610e7557600080fd5b5051919050565b60208101610a228284610dc0565b600060208284031215610e9c57600080fd5b815163ffffffff81168114610aa157600080fd5b63ffffffff818116838216028082169190828114610ed057610ed0610e2a565b505092915050565b63ffffffff828116828216039080821115610bf757610bf7610e2a565b600063ffffffff80841680610f1a57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b63ffffffff818116838216019080821115610bf757610bf7610e2a565b60008251610f55818460208701610d4e565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205fe475f8e009841b6e43cc3d20c2bfdb424045adc5b64515bf6b91cf6a29783464736f6c63430008140033" }, "0x0000000000000000000000000000000000002222": { "comment": "Library to validate DID", "balance": "0", - "code": "0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c80635fbac08e14610045578063d84a06e11461005a575b600080fd5b6100586100533660046104a8565b61006d565b005b61005861006836600461091f565b610110565b6040516332ac752b60e01b8152730000000000000000000000000000000000001111906332ac752b906100a4908490600401610b42565b602060405180830381865af41580156100c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e59190610b55565b61010d5780604051631859e3bb60e11b81526004016101049190610b42565b60405180910390fd5b50565b80608001515160000361013c5780602001516040516320198af360e11b81526004016101049190610b42565b60005b8160800151518110156102105761018a61017d8360800151838151811061016857610168610b77565b60200260200101516020015160000151610214565b6001600160801b03161590565b156101fe576101be8260600151836080015183815181106101ad576101ad610b77565b602002602001015160000151610225565b6101fe57816080015181815181106101d8576101d8610b77565b6020026020010151600001516040516339360df960e11b81526004016101049190610b42565b8061020881610b8d565b91505061013f565b5050565b600061021f8261029c565b92915050565b60008061023183610214565b905060005b84518110156102915761026f8261026987848151811061025857610258610b77565b602002602001015160000151610214565b906102b7565b1561027f5760019250505061021f565b8061028981610b8d565b915050610236565b506000949350505050565b6000806020830190506102b08184516102c3565b9392505050565b60006102b083836102cf565b60006102b08383610319565b60006001600160801b0383811690831681146102ef57600091505061021f565b6103116102fc8560801c90565b6103068560801c90565b839081902091201490565b949350505050565b60006102b0838360006001600160801b0383111561034a5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b0382111561037257604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156103be576103be610386565b60405290565b604080519081016001600160401b03811182821017156103be576103be610386565b60405161016081016001600160401b03811182821017156103be576103be610386565b604051601f8201601f191681016001600160401b038111828210171561043157610431610386565b604052919050565b600082601f83011261044a57600080fd5b81356001600160401b0381111561046357610463610386565b610476601f8201601f1916602001610409565b81815284602083860101111561048b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156104ba57600080fd5b81356001600160401b038111156104d057600080fd5b61031184828501610439565b60006001600160401b038211156104f5576104f5610386565b5060051b60200190565b600082601f83011261051057600080fd5b81356020610525610520836104dc565b610409565b82815260059290921b8401810191818101908684111561054457600080fd5b8286015b848110156105835780356001600160401b038111156105675760008081fd5b6105758986838b0101610439565b845250918301918301610548565b509695505050505050565b600060a082840312156105a057600080fd5b6105a861039c565b905081356001600160401b03808211156105c157600080fd5b6105cd85838601610439565b835260208401359150808211156105e357600080fd5b6105ef85838601610439565b6020840152604084013591508082111561060857600080fd5b61061485838601610439565b6040840152606084013591508082111561062d57600080fd5b61063985838601610439565b6060840152608084013591508082111561065257600080fd5b5061065f84828501610439565b60808301525092915050565b600082601f83011261067c57600080fd5b8135602061068c610520836104dc565b82815260059290921b840181019181810190868411156106ab57600080fd5b8286015b848110156105835780356001600160401b038111156106ce5760008081fd5b6106dc8986838b010161058e565b8452509183019183016106af565b600082601f8301126106fb57600080fd5b8135602061070b610520836104dc565b82815260059290921b8401810191818101908684111561072a57600080fd5b8286015b848110156105835780356001600160401b038082111561074e5760008081fd5b908801906040828b03601f19018113156107685760008081fd5b6107706103c4565b87840135838111156107825760008081fd5b6107908d8a83880101610439565b8252509083013590828211156107a65760008081fd5b6107b48c898487010161058e565b81890152865250505091830191830161072e565b600082601f8301126107d957600080fd5b813560206107e9610520836104dc565b82815260059290921b8401810191818101908684111561080857600080fd5b8286015b848110156105835780356001600160401b038082111561082c5760008081fd5b9088019060a0828b03601f19018113156108465760008081fd5b61084e61039c565b87840135838111156108605760008081fd5b61086e8d8a83880101610439565b825250604080850135848111156108855760008081fd5b6108938e8b83890101610439565b8a84015250606080860135858111156108ac5760008081fd5b6108ba8f8c838a0101610439565b83850152506080915081860135858111156108d55760008081fd5b6108e38f8c838a01016104ff565b828501525050828501359250838311156108fd5760008081fd5b61090b8d8a858801016104ff565b90820152865250505091830191830161080c565b60006020828403121561093157600080fd5b81356001600160401b038082111561094857600080fd5b90830190610160828603121561095d57600080fd5b6109656103e6565b82358281111561097457600080fd5b610980878286016104ff565b82525060208301358281111561099557600080fd5b6109a187828601610439565b6020830152506040830135828111156109b957600080fd5b6109c5878286016104ff565b6040830152506060830135828111156109dd57600080fd5b6109e98782860161066b565b606083015250608083013582811115610a0157600080fd5b610a0d878286016106ea565b60808301525060a083013582811115610a2557600080fd5b610a31878286016106ea565b60a08301525060c083013582811115610a4957600080fd5b610a55878286016106ea565b60c08301525060e083013582811115610a6d57600080fd5b610a79878286016106ea565b60e0830152506101008084013583811115610a9357600080fd5b610a9f888287016106ea565b8284015250506101208084013583811115610ab957600080fd5b610ac5888287016107c8565b8284015250506101408084013583811115610adf57600080fd5b610aeb888287016104ff565b918301919091525095945050505050565b6000815180845260005b81811015610b2257602081850181015186830182015201610b06565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006102b06020830184610afc565b600060208284031215610b6757600080fd5b815180151581146102b057600080fd5b634e487b7160e01b600052603260045260246000fd5b600060018201610bad57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212205758b661ec0babee0cfb7341cfa4beb170bc28ef89f48ac4665763ca8dbaa9eb64736f6c63430008150033", + "code": "0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c80635fbac08e14610045578063d84a06e11461005a575b600080fd5b610058610053366004610d5e565b61006d565b005b6100586100683660046111d5565b6100fa565b6000610078826101ee565b90506100878160000151610339565b6100af5781604051631859e3bb60e11b81526004016100a691906113b2565b60405180910390fd5b60006100bd82602001515190565b9050806015141580156100d1575080601614155b156100f5578160200151604051631859e3bb60e11b81526004016100a691906113b2565b505050565b8060800151516000036101265780602001516040516320198af360e11b81526004016100a691906113b2565b60005b8160800151518110156101ea576101648260800151828151811061014f5761014f611400565b602002602001015160200151600001516103d9565b156101d85761019882606001518360800151838151811061018757610187611400565b6020026020010151600001516103ea565b6101d857816080015181815181106101b2576101b2611400565b6020026020010151600001516040516339360df960e11b81526004016100a691906113b2565b806101e28161142c565b915050610129565b5050565b6040805180820190915260608082526020820152600061020d83610454565b90506000610233604051806040016040528060018152602001601d60f91b815250610454565b9050600080610242848461045f565b955092509050801580610280575061027e61027760405180604001604052806003815260200162191a5960ea1b815250610454565b83906104ad565b155b156102a05785604051631859e3bb60e11b81526004016100a691906113b2565b6102aa848461045f565b955092509050806102d05785604051631859e3bb60e11b81526004016100a691906113b2565b60408051808201909152606080825260208201526102ed836104b9565b81526040805180820190915260018152601d60f91b602082015261031b9061031490610454565b86906104c4565b945061032a91508490506104b9565b60208201529695505050505050565b60008061034583610454565b905061037661036f60405180604001604052806004815260200163696e647960e01b815250610454565b82906104ad565b806103a557506103a561036f6040518060400160405280600581526020016434b7323c9960d91b815250610454565b806103d257506103d261036f6040518060400160405280600381526020016239b7bb60e91b815250610454565b9392505050565b60006103e3825190565b1592915050565b6000805b8351811015610448576104278385838151811061040d5761040d611400565b6020026020010151600001516104ee90919063ffffffff16565b1561043657600191505061044e565b806104408161142c565b9150506103ee565b50600090505b92915050565b600061044e8261050b565b600080808061046e868661051f565b9050600019810361048a576000866000935093509350506104a6565b61049e86826001600160801b03881661062a565b935093509350505b9250925092565b60006103d28383610697565b606061044e826106e1565b60008080806104d38686610758565b9050600019810361048a5760008087935093509350506104a6565b60006103d26104fc83610454565b61050585610454565b906104ad565b6000806020830190506103d281845161084a565b60006001600160801b038381169083168083036105415760009250505061044e565b81158061054d57508181115b1561055e576000199250505061044e565b600061056a8660801c90565b905060006105788660801c90565b90506000610587825160001a90565b90505b6000610597848784610856565b905060001981036105b257600019965050505050505061044e565b948590039492830192858511156105d357600019965050505050505061044e565b848320858520036105ff576105e88960801c90565b6105f29085611445565b965050505050505061044e565b8560010361061757600019965050505050505061044e565b600019909501946001909301925061058a565b60008060008061063a8760801c90565b90506001600160801b0387168587018181111561066a576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b0383811690831681146106b757600091505061044e565b6106d96106c48560801c90565b6106ce8560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b0381111561070457610704610c3c565b6040519080825280601f01601f19166020018201604052801561072e576020820181803683370190505b50905060208101610752816107438560801c90565b6001600160801b03861661091e565b50919050565b60006001600160801b0383811690831680830361077a5760009250505061044e565b81158061078657508181115b15610797576000199250505061044e565b60006107a38660801c90565b905060006107b18660801c90565b905060006107be8761092c565b905060001984015b60006107d3858885610971565b905060001981036107ef5760001997505050505050505061044e565b808211156108085760001997505050505050505061044e565b85842082820386810188902090910361082a57975061044e9650505050505050565b8115610838575095506107c6565b6000199850505050505050505061044e565b60006103d28383610a25565b6000602083116108725761086b848484610a31565b90506103d2565b83601f8416808503820160ff8516600080516020611459833981519152025b818810156108d357875181186108a681610b42565b156108c7578489036108ba8a60208a610a31565b01955050505050506103d2565b60208901985050610891565b826000036108e9576000199450505050506103d2565b6108f4828488610a31565b9450600019850361090d576000199450505050506103d2565b509190910391909101949350505050565b8083828460045afa50505050565b60006001600160801b038216808203610958576040516365f4e9df60e01b815260040160405180910390fd5b6103d2600182036109698560801c90565b015160001a90565b6000602083116109865761086b848484610b8d565b601f831684840181156109be5781900360006109a3828487610b8d565b905060001981146109bc57908690030191506103d29050565b505b60ff8416600080516020611459833981519152025b86821115610a1757601f19909101805190919081186109f181610b42565b15610a1157878303610a0584602089610b8d565b019450505050506103d2565b506109d3565b506000199695505050505050565b60006103d28383610bd6565b8251600090816020851115610a4557602094505b60128510610acf5760ff8416600080516020611459833981519152028218610a756001600160801b038217610b42565b600003610aab5760109150601a8610610aa657610a9a6001600160401b038217610b42565b600003610aa657601891505b610ac9565b610abd6001600160c01b038217610b42565b600003610ac957600891505b50610b0d565b600a8510610b0d5760ff8416600080516020611459833981519152028218610aff6001600160c01b038217610b42565b600003610b0b57600891505b505b84811015610b355781811a60ff85168103610b2c575091506103d29050565b50600101610b0d565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b60006020831115610b9d57602092505b83515b8315610bca576000199093019280841a60ff84168103610bc45784925050506103d2565b50610ba0565b50600019949350505050565b60006001600160801b03831115610c005760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b03821115610c2857604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715610c7457610c74610c3c565b60405290565b604080519081016001600160401b0381118282101715610c7457610c74610c3c565b60405161016081016001600160401b0381118282101715610c7457610c74610c3c565b604051601f8201601f191681016001600160401b0381118282101715610ce757610ce7610c3c565b604052919050565b600082601f830112610d0057600080fd5b81356001600160401b03811115610d1957610d19610c3c565b610d2c601f8201601f1916602001610cbf565b818152846020838601011115610d4157600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215610d7057600080fd5b81356001600160401b03811115610d8657600080fd5b6106d984828501610cef565b60006001600160401b03821115610dab57610dab610c3c565b5060051b60200190565b600082601f830112610dc657600080fd5b81356020610ddb610dd683610d92565b610cbf565b82815260059290921b84018101918181019086841115610dfa57600080fd5b8286015b84811015610e395780356001600160401b03811115610e1d5760008081fd5b610e2b8986838b0101610cef565b845250918301918301610dfe565b509695505050505050565b600060a08284031215610e5657600080fd5b610e5e610c52565b905081356001600160401b0380821115610e7757600080fd5b610e8385838601610cef565b83526020840135915080821115610e9957600080fd5b610ea585838601610cef565b60208401526040840135915080821115610ebe57600080fd5b610eca85838601610cef565b60408401526060840135915080821115610ee357600080fd5b610eef85838601610cef565b60608401526080840135915080821115610f0857600080fd5b50610f1584828501610cef565b60808301525092915050565b600082601f830112610f3257600080fd5b81356020610f42610dd683610d92565b82815260059290921b84018101918181019086841115610f6157600080fd5b8286015b84811015610e395780356001600160401b03811115610f845760008081fd5b610f928986838b0101610e44565b845250918301918301610f65565b600082601f830112610fb157600080fd5b81356020610fc1610dd683610d92565b82815260059290921b84018101918181019086841115610fe057600080fd5b8286015b84811015610e395780356001600160401b03808211156110045760008081fd5b908801906040828b03601f190181131561101e5760008081fd5b611026610c7a565b87840135838111156110385760008081fd5b6110468d8a83880101610cef565b82525090830135908282111561105c5760008081fd5b61106a8c8984870101610e44565b818901528652505050918301918301610fe4565b600082601f83011261108f57600080fd5b8135602061109f610dd683610d92565b82815260059290921b840181019181810190868411156110be57600080fd5b8286015b84811015610e395780356001600160401b03808211156110e25760008081fd5b9088019060a0828b03601f19018113156110fc5760008081fd5b611104610c52565b87840135838111156111165760008081fd5b6111248d8a83880101610cef565b8252506040808501358481111561113b5760008081fd5b6111498e8b83890101610cef565b8a84015250606080860135858111156111625760008081fd5b6111708f8c838a0101610cef565b838501525060809150818601358581111561118b5760008081fd5b6111998f8c838a0101610db5565b828501525050828501359250838311156111b35760008081fd5b6111c18d8a85880101610db5565b9082015286525050509183019183016110c2565b6000602082840312156111e757600080fd5b81356001600160401b03808211156111fe57600080fd5b90830190610160828603121561121357600080fd5b61121b610c9c565b82358281111561122a57600080fd5b61123687828601610db5565b82525060208301358281111561124b57600080fd5b61125787828601610cef565b60208301525060408301358281111561126f57600080fd5b61127b87828601610db5565b60408301525060608301358281111561129357600080fd5b61129f87828601610f21565b6060830152506080830135828111156112b757600080fd5b6112c387828601610fa0565b60808301525060a0830135828111156112db57600080fd5b6112e787828601610fa0565b60a08301525060c0830135828111156112ff57600080fd5b61130b87828601610fa0565b60c08301525060e08301358281111561132357600080fd5b61132f87828601610fa0565b60e083015250610100808401358381111561134957600080fd5b61135588828701610fa0565b828401525050610120808401358381111561136f57600080fd5b61137b8882870161107e565b828401525050610140808401358381111561139557600080fd5b6113a188828701610db5565b918301919091525095945050505050565b600060208083528351808285015260005b818110156113df578581018301518582016040015282016113c3565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161143e5761143e611416565b5060010190565b8181038181111561044e5761044e61141656fe0101010101010101010101010101010101010101010101010101010101010101a2646970667358221220833f1b49ef5ac6781719253949241ffa9f23a6d4d3389c95b1f4bd38e3e2cccd64736f6c63430008140033", "storage": {} }, "0x0000000000000000000000000000000000003333": { "comment": "Proxy: Smart contract to manage DIDs", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000ab725dceb7b0611b626a62180ab65898e7ea13e5" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000004def1dfa07d1c68b0282f323b268e9d26418e776" } }, - "0xab725dceb7b0611b626a62180ab65898e7ea13e5": { + "0x4def1dfa07d1c68b0282f323b268e9d26418e776": { "comment": "Implementation: Smart contract to manage DIDs", "balance": "0", - "code": "0x60806040526004361061007b5760003560e01c8063869957a51161004e578063869957a51461010e578063ad3cb1cc1461012e578063c4d66de81461016c578063f4653a1d1461018c57600080fd5b80633633852c146100805780634f1ef286146100b657806352d1902d146100cb57806356f7317d146100ee575b600080fd5b34801561008c57600080fd5b506100a061009b366004612dd5565b6101ac565b6040516100ad91906130e8565b60405180910390f35b6100c96100c43660046132b8565b61202a565b005b3480156100d757600080fd5b506100e0612049565b6040519081526020016100ad565b3480156100fa57600080fd5b506100c9610109366004613379565b612066565b34801561011a57600080fd5b506100c9610129366004613379565b612361565b34801561013a57600080fd5b5061015f604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ad91906133b4565b34801561017857600080fd5b506100c96101873660046133c7565b612611565b34801561019857600080fd5b506100c96101a7366004612dd5565b6126f3565b6101b4612d43565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506101fb915083906133e2565b908152604051908190036020019020600c0154600003610239578060405163186a887560e11b815260040161023091906133b4565b60405180910390fd5b6001848460405161024b9291906133fe565b90815260408051918290036020908101832080546101c09281028501830184526101a0850181815291938593908401928592849284919060009088015b828210156103345783829060005260206000200180546102a79061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d39061340e565b80156103205780601f106102f557610100808354040283529160200191610320565b820191906000526020600020905b81548152906001019060200180831161030357829003601f168201915b505050505081526020019060010190610288565b50505050815260200160018201805461034c9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546103789061340e565b80156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050815260200160028201805480602002602001604051908101604052809291908181526020016000905b8282101561049f5783829060005260206000200180546104129061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461043e9061340e565b801561048b5780601f106104605761010080835404028352916020019161048b565b820191906000526020600020905b81548152906001019060200180831161046e57829003601f168201915b5050505050815260200190600101906103f3565b50505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b828210156107d857838290600052602060002090600502016040518060a00160405290816000820180546104ff9061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461052b9061340e565b80156105785780601f1061054d57610100808354040283529160200191610578565b820191906000526020600020905b81548152906001019060200180831161055b57829003601f168201915b505050505081526020016001820180546105919061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546105bd9061340e565b801561060a5780601f106105df5761010080835404028352916020019161060a565b820191906000526020600020905b8154815290600101906020018083116105ed57829003601f168201915b505050505081526020016002820180546106239061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461064f9061340e565b801561069c5780601f106106715761010080835404028352916020019161069c565b820191906000526020600020905b81548152906001019060200180831161067f57829003601f168201915b505050505081526020016003820180546106b59061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546106e19061340e565b801561072e5780601f106107035761010080835404028352916020019161072e565b820191906000526020600020905b81548152906001019060200180831161071157829003601f168201915b505050505081526020016004820180546107479061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546107739061340e565b80156107c05780601f10610795576101008083540402835291602001916107c0565b820191906000526020600020905b8154815290600101906020018083116107a357829003601f168201915b505050505081525050815260200190600101906104cc565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610bb757838290600052602060002090600602016040518060400160405290816000820180546108389061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546108649061340e565b80156108b15780601f10610886576101008083540402835291602001916108b1565b820191906000526020600020905b81548152906001019060200180831161089457829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546108da9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546109069061340e565b80156109535780601f1061092857610100808354040283529160200191610953565b820191906000526020600020905b81548152906001019060200180831161093657829003601f168201915b5050505050815260200160018201805461096c9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546109989061340e565b80156109e55780601f106109ba576101008083540402835291602001916109e5565b820191906000526020600020905b8154815290600101906020018083116109c857829003601f168201915b505050505081526020016002820180546109fe9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2a9061340e565b8015610a775780601f10610a4c57610100808354040283529160200191610a77565b820191906000526020600020905b815481529060010190602001808311610a5a57829003601f168201915b50505050508152602001600382018054610a909061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc9061340e565b8015610b095780601f10610ade57610100808354040283529160200191610b09565b820191906000526020600020905b815481529060010190602001808311610aec57829003601f168201915b50505050508152602001600482018054610b229061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4e9061340e565b8015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b5050505050815250508152505081526020019060010190610805565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610f965783829060005260206000209060060201604051806040016040529081600082018054610c179061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c439061340e565b8015610c905780601f10610c6557610100808354040283529160200191610c90565b820191906000526020600020905b815481529060010190602001808311610c7357829003601f168201915b50505050508152602001600182016040518060a0016040529081600082018054610cb99061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce59061340e565b8015610d325780601f10610d0757610100808354040283529160200191610d32565b820191906000526020600020905b815481529060010190602001808311610d1557829003601f168201915b50505050508152602001600182018054610d4b9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d779061340e565b8015610dc45780601f10610d9957610100808354040283529160200191610dc4565b820191906000526020600020905b815481529060010190602001808311610da757829003601f168201915b50505050508152602001600282018054610ddd9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e099061340e565b8015610e565780601f10610e2b57610100808354040283529160200191610e56565b820191906000526020600020905b815481529060010190602001808311610e3957829003601f168201915b50505050508152602001600382018054610e6f9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9b9061340e565b8015610ee85780601f10610ebd57610100808354040283529160200191610ee8565b820191906000526020600020905b815481529060010190602001808311610ecb57829003601f168201915b50505050508152602001600482018054610f019061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2d9061340e565b8015610f7a5780601f10610f4f57610100808354040283529160200191610f7a565b820191906000526020600020905b815481529060010190602001808311610f5d57829003601f168201915b5050505050815250508152505081526020019060010190610be4565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156113755783829060005260206000209060060201604051806040016040529081600082018054610ff69061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546110229061340e565b801561106f5780601f106110445761010080835404028352916020019161106f565b820191906000526020600020905b81548152906001019060200180831161105257829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546110989061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546110c49061340e565b80156111115780601f106110e657610100808354040283529160200191611111565b820191906000526020600020905b8154815290600101906020018083116110f457829003601f168201915b5050505050815260200160018201805461112a9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546111569061340e565b80156111a35780601f10611178576101008083540402835291602001916111a3565b820191906000526020600020905b81548152906001019060200180831161118657829003601f168201915b505050505081526020016002820180546111bc9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546111e89061340e565b80156112355780601f1061120a57610100808354040283529160200191611235565b820191906000526020600020905b81548152906001019060200180831161121857829003601f168201915b5050505050815260200160038201805461124e9061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461127a9061340e565b80156112c75780601f1061129c576101008083540402835291602001916112c7565b820191906000526020600020905b8154815290600101906020018083116112aa57829003601f168201915b505050505081526020016004820180546112e09061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461130c9061340e565b80156113595780601f1061132e57610100808354040283529160200191611359565b820191906000526020600020905b81548152906001019060200180831161133c57829003601f168201915b5050505050815250508152505081526020019060010190610fc3565b50505050815260200160078201805480602002602001604051908101604052809291908181526020016000905b8282101561175457838290600052602060002090600602016040518060400160405290816000820180546113d59061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546114019061340e565b801561144e5780601f106114235761010080835404028352916020019161144e565b820191906000526020600020905b81548152906001019060200180831161143157829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546114779061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546114a39061340e565b80156114f05780601f106114c5576101008083540402835291602001916114f0565b820191906000526020600020905b8154815290600101906020018083116114d357829003601f168201915b505050505081526020016001820180546115099061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546115359061340e565b80156115825780601f1061155757610100808354040283529160200191611582565b820191906000526020600020905b81548152906001019060200180831161156557829003601f168201915b5050505050815260200160028201805461159b9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546115c79061340e565b80156116145780601f106115e957610100808354040283529160200191611614565b820191906000526020600020905b8154815290600101906020018083116115f757829003601f168201915b5050505050815260200160038201805461162d9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546116599061340e565b80156116a65780601f1061167b576101008083540402835291602001916116a6565b820191906000526020600020905b81548152906001019060200180831161168957829003601f168201915b505050505081526020016004820180546116bf9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546116eb9061340e565b80156117385780601f1061170d57610100808354040283529160200191611738565b820191906000526020600020905b81548152906001019060200180831161171b57829003601f168201915b50505050508152505081525050815260200190600101906113a2565b50505050815260200160088201805480602002602001604051908101604052809291908181526020016000905b82821015611b3357838290600052602060002090600602016040518060400160405290816000820180546117b49061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546117e09061340e565b801561182d5780601f106118025761010080835404028352916020019161182d565b820191906000526020600020905b81548152906001019060200180831161181057829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546118569061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546118829061340e565b80156118cf5780601f106118a4576101008083540402835291602001916118cf565b820191906000526020600020905b8154815290600101906020018083116118b257829003601f168201915b505050505081526020016001820180546118e89061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546119149061340e565b80156119615780601f1061193657610100808354040283529160200191611961565b820191906000526020600020905b81548152906001019060200180831161194457829003601f168201915b5050505050815260200160028201805461197a9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546119a69061340e565b80156119f35780601f106119c8576101008083540402835291602001916119f3565b820191906000526020600020905b8154815290600101906020018083116119d657829003601f168201915b50505050508152602001600382018054611a0c9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611a389061340e565b8015611a855780601f10611a5a57610100808354040283529160200191611a85565b820191906000526020600020905b815481529060010190602001808311611a6857829003601f168201915b50505050508152602001600482018054611a9e9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611aca9061340e565b8015611b175780601f10611aec57610100808354040283529160200191611b17565b820191906000526020600020905b815481529060010190602001808311611afa57829003601f168201915b5050505050815250508152505081526020019060010190611781565b50505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015611efa57838290600052602060002090600502016040518060a0016040529081600082018054611b939061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbf9061340e565b8015611c0c5780601f10611be157610100808354040283529160200191611c0c565b820191906000526020600020905b815481529060010190602001808311611bef57829003601f168201915b50505050508152602001600182018054611c259061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c519061340e565b8015611c9e5780601f10611c7357610100808354040283529160200191611c9e565b820191906000526020600020905b815481529060010190602001808311611c8157829003601f168201915b50505050508152602001600282018054611cb79061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611ce39061340e565b8015611d305780601f10611d0557610100808354040283529160200191611d30565b820191906000526020600020905b815481529060010190602001808311611d1357829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b82821015611e0a578382906000526020600020018054611d7d9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611da99061340e565b8015611df65780601f10611dcb57610100808354040283529160200191611df6565b820191906000526020600020905b815481529060010190602001808311611dd957829003601f168201915b505050505081526020019060010190611d5e565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611ee3578382906000526020600020018054611e569061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611e829061340e565b8015611ecf5780601f10611ea457610100808354040283529160200191611ecf565b820191906000526020600020905b815481529060010190602001808311611eb257829003601f168201915b505050505081526020019060010190611e37565b505050508152505081526020019060010190611b60565b505050508152602001600a8201805480602002602001604051908101604052809291908181526020016000905b82821015611fd3578382906000526020600020018054611f469061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611f729061340e565b8015611fbf5780601f10611f9457610100808354040283529160200191611fbf565b820191906000526020600020905b815481529060010190602001808311611fa257829003601f168201915b505050505081526020019060010190611f27565b50505091525050815260408051608081018252600b8401546001600160a01b03168152600c840154602080830191909152600d85015492820192909252600e9093015460ff16151560608401520152949350505050565b6120326128dd565b61203b82612984565b61204582826129ea565b5050565b6000612053612aac565b506000805160206144b383398151915290565b6120736020820182613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506120b8915083906133e2565b908152604051908190036020019020600c01546000036120ed578060405163186a887560e11b815260040161023091906133b4565b6120fa6020830183613448565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516001925061213f915083906133e2565b908152604051908190036020019020600e015460ff16156121755780604051630341716360e51b815260040161023091906133b4565b6121826020840184613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506121c7915083906133e2565b908152604051908190036020019020600b0154336001600160a01b039091161461223a57336001826040516121fc91906133e2565b908152604051908190036020018120600b015463a964fc1960e01b82526001600160a01b039283166004830152919091166024820152604401610230565b60405163d84a06e160e01b81527300000000000000000000000000000000000022229063d84a06e19061227190879060040161384a565b60006040518083038186803b15801561228957600080fd5b505af415801561229d573d6000803e3d6000fd5b505050508360018580602001906122b49190613448565b6040516122c29291906133fe565b9081526040519081900360200190206122db8282614343565b5042905060016122ee6020870187613448565b6040516122fc9291906133fe565b9081526020016040518091039020600b01600201819055507f7e7500a71b0209575a3b4858a2a662e94b0cad314ecb249f3526e9b2f86a01468480602001906123459190613448565b60405161235392919061447d565b60405180910390a150505050565b61236e6020820182613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506123b3915083906133e2565b908152604051908190036020019020600c0154156123e65780604051630eb7cd9560e01b815260040161023091906133b4565b730000000000000000000000000000000000002222635fbac08e61240d6020850185613448565b6040518363ffffffff1660e01b815260040161242a92919061447d565b60006040518083038186803b15801561244257600080fd5b505af4158015612456573d6000803e3d6000fd5b505060405163d84a06e160e01b8152730000000000000000000000000000000000002222925063d84a06e1915061249190859060040161384a565b60006040518083038186803b1580156124a957600080fd5b505af41580156124bd573d6000803e3d6000fd5b505050508160018380602001906124d49190613448565b6040516124e29291906133fe565b9081526040519081900360200190206124fb8282614343565b50339050600161250e6020850185613448565b60405161251c9291906133fe565b9081526020016040518091039020600b0160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055504260018380602001906125679190613448565b6040516125759291906133fe565b9081526020016040518091039020600b01600101819055504260018380602001906125a09190613448565b6040516125ae9291906133fe565b9081526020016040518091039020600b01600201819055507f5fccafd09eeeb6a3dc1c80357ee982c00d7fb00a991274a9b96fe4fd7cb605528280602001906125f79190613448565b60405161260592919061447d565b60405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061265a575080546001600160401b03808416911610155b156126785760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126a283612af5565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b81818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516001925061273a915083906133e2565b908152604051908190036020019020600c015460000361276f578060405163186a887560e11b815260040161023091906133b4565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506127b6915083906133e2565b908152604051908190036020019020600e015460ff16156127ec5780604051630341716360e51b815260040161023091906133b4565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060405160019250612833915083906133e2565b908152604051908190036020019020600b0154336001600160a01b039091161461286857336001826040516121fc91906133e2565b600180868660405161287b9291906133fe565b908152604051908190036020018120600e01805492151560ff19909316929092179091557f4360f12f602ccecefb32480e5314d0d3f57d38db8f52c76d8fdf4c39596c1c28906128ce908790879061447d565b60405180910390a15050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061296457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166129586000805160206144b3833981519152546001600160a01b031690565b6001600160a01b031614155b156129825760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156129cf57600080fd5b505afa1580156129e3573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612a44575060408051601f3d908101601f19168201909252612a4191810190614499565b60015b612a6c57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610230565b6000805160206144b38339815191528114612a9d57604051632a87526960e21b815260048101829052602401610230565b612aa78383612b1f565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146129825760405163703e46dd60e11b815260040160405180910390fd5b612afd612b75565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b612b2882612bbe565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612b6d57612aa78282612c23565b612045612c99565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661298257604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003612bf457604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610230565b6000805160206144b383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612c4091906133e2565b600060405180830381855af49150503d8060008114612c7b576040519150601f19603f3d011682016040523d82523d6000602084013e612c80565b606091505b5091509150612c90858383612cb8565b95945050505050565b34156129825760405163b398979f60e01b815260040160405180910390fd5b606082612ccd57612cc882612d17565b612d10565b8151158015612ce457506001600160a01b0384163b155b15612d0d57604051639996b31560e01b81526001600160a01b0385166004820152602401610230565b50805b9392505050565b805115612d275780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b6040518060400160405280612dab60405180610160016040528060608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b60008060208385031215612de857600080fd5b82356001600160401b0380821115612dff57600080fd5b818501915085601f830112612e1357600080fd5b813581811115612e2257600080fd5b866020828501011115612e3457600080fd5b60209290920196919550909350505050565b60005b83811015612e61578181015183820152602001612e49565b50506000910152565b60008151808452612e82816020860160208601612e46565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952612ecf838351612e6a565b98840198925090830190600101612eb3565b5090979650505050505050565b6000815160a08452612f0360a0850182612e6a565b905060208301518482036020860152612f1c8282612e6a565b91505060408301518482036040860152612f368282612e6a565b91505060608301518482036060860152612f508282612e6a565b91505060808301518482036080860152612c908282612e6a565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952612fa3838351612eee565b98840198925090830190600101612f87565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952815160408151818652612ff882870182612e6a565b915050858201519150848103868601526130128183612eee565b9a86019a9450505090830190600101612fd2565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952815160a0815181865261306982870182612e6a565b91505085820151858203878701526130818282612e6a565b9150506040808301518683038288015261309b8382612e6a565b92505050606080830151868303828801526130b68382612e96565b92505050608080830151925085820381870152506130d48183612e96565b9a86019a9450505090830190600101613043565b602081526000825160a0602084015280516101608060c0860152613110610220860183612e96565b9150602083015160bf19808785030160e088015261312e8483612e6a565b93506040850151915061010081888603018189015261314d8584612e96565b9450606086015192506101208289870301818a015261316c8685612f6a565b955060808701519350610140838a880301818b015261318b8786612fb5565b965060a08801519450838a880301868b01526131a78786612fb5565b965060c08801519550838a8803016101808b01526131c58787612fb5565b965060e08801519550838a8803016101a08b01526131e38787612fb5565b9650828801519550838a8803016101c08b01526132008787612fb5565b9650818801519550838a8803016101e08b015261321d8787613026565b965080880151975050505080878503016102008801525050506132408183612e96565b915050602084015161327e604085018280516001600160a01b0316825260208082015190830152604080820151908301526060908101511515910152565b509392505050565b80356001600160a01b038116811461329d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156132cb57600080fd5b6132d483613286565b915060208301356001600160401b03808211156132f057600080fd5b818501915085601f83011261330457600080fd5b813581811115613316576133166132a2565b604051601f8201601f19908116603f0116810190838211818310171561333e5761333e6132a2565b8160405282815288602084870101111561335757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561338b57600080fd5b81356001600160401b038111156133a157600080fd5b82016101608185031215612d1057600080fd5b602081526000612d106020830184612e6a565b6000602082840312156133d957600080fd5b612d1082613286565b600082516133f4818460208701612e46565b9190910192915050565b8183823760009101908152919050565b600181811c9082168061342257607f821691505b60208210810361344257634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e1984360301811261345f57600080fd5b8301803591506001600160401b0382111561347957600080fd5b60200191503681900382131561348e57600080fd5b9250929050565b6000808335601e198436030181126134ac57600080fd5b83016020810192503590506001600160401b038111156134cb57600080fd5b8060051b360382131561348e57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e1984360301811261351d57600080fd5b83016020810192503590506001600160401b0381111561353c57600080fd5b80360382131561348e57600080fd5b818352600060208085019450848460051b86018460005b87811015612ee15783830389526135798288613506565b6135848582846134dd565b9a87019a9450505090840190600101613562565b60006135a48283613506565b60a085526135b660a0860182846134dd565b9150506135c66020840184613506565b85830360208701526135d98382846134dd565b925050506135ea6040840184613506565b85830360408701526135fd8382846134dd565b9250505061360e6060840184613506565b85830360608701526136218382846134dd565b925050506136326080840184613506565b85830360808701526136458382846134dd565b9695505050505050565b60008235609e1983360301811261366557600080fd5b90910192915050565b818352600060208085019450848460051b86018460005b87811015612ee15783830389526136a5836136a0848a61364f565b613598565b98850198925090840190600101613685565b818352600060208085019450848460051b8601846000805b88811015613744578484038a528235603e198936030181126136ef578283fd5b880160406136fd8280613506565b82885261370d83890182846134dd565b9250505061371d8883018361364f565b9150858103888701526137308183613598565b9b88019b95505050918501916001016136cf565b509198975050505050505050565b60008383855260208086019550808560051b8301018460005b87811015612ee157848303601f19018952613786828861364f565b60a06137928283613506565b8287526137a283880182846134dd565b925050506137b286830183613506565b868303888801526137c48382846134dd565b9250505060406137d681840184613506565b878403838901526137e88482846134dd565b935050505060606137fb81840184613495565b8784038389015261380d84828461354b565b9350505050608061382081840184613495565b93508683038288015261383483858361354b565b9c88019c9650505092850192505060010161376b565b60208152600061385a8384613495565b6101608060208601526138726101808601838561354b565b92506138816020870187613506565b9250601f198087860301604088015261389b8585846134dd565b94506138aa6040890189613495565b94509150808786030160608801526138c385858461354b565b94506138d26060890189613495565b94509150808786030160808801526138eb85858461366e565b94506138fa6080890189613495565b94509150808786030160a08801526139138585846136b7565b945061392260a0890189613495565b94509150808786030160c088015261393b8585846136b7565b945061394a60c0890189613495565b94509150808786030160e08801526139638585846136b7565b945061397260e0890189613495565b9450915061010081888703018189015261398d8686856136b7565b955061399b818a018a613495565b95509250506101208188870301818901526139b78686856136b7565b95506139c5818a018a613495565b95509250506101408188870301818901526139e1868685613752565b95506139ef818a018a613495565b955092505080878603018388015250613a0984848361354b565b979650505050505050565b6000808335601e19843603018112613a2b57600080fd5b8301803591506001600160401b03821115613a4557600080fd5b6020019150600581901b360382131561348e57600080fd5b6005808202908104821461329d57634e487b7160e01b600052601160045260246000fd5b6006808202908104821461329d57634e487b7160e01b600052601160045260246000fd5b5b818110156120455760008155600101613aa6565b600019600383901b1c191660019190911b1790565b613ad9815461340e565b801561204557601f811160018114613af357505060009055565b600083815260208120613b11601f850160051c820160018301613aa5565b508381526020812081855555505050565b8054600082558015612045578160005260206000208181015b80821015613b5757613b4c82613acf565b600182019150613b3b565b50505050565b600160401b821115613b7157613b716132a2565b805482825580831015612aa7576000828152602090208381019082015b808210156129e357613b9f82613acf565b600182019150613b8e565b601f821115612aa757806000526020600020601f840160051c81016020851015613bd15750805b6129e3601f850160051c830182613aa5565b6001600160401b03831115613bfa57613bfa6132a2565b613c0e83613c08835461340e565b83613baa565b6000601f841160018114613c3c5760008515613c2a5750838201355b613c348682613aba565b8455506129e3565b600083815260209020601f19861690835b82811015613c6d5786850135825560209485019460019092019101613c4d565b5086821015613c8a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b613ca68382613b5d565b8160008281526020808220825b87811015613d8857613cc58588613448565b6001600160401b03811115613cdc57613cdc6132a2565b613cf081613cea865461340e565b86613baa565b85601f821160018114613d1c57878315613d0a5750838201355b613d148482613aba565b875550613d74565b600086815260209020601f19841690895b82811015613d4c57868501358255938901936001909101908901613d2d565b5084821015613d695760001960f88660031b161c19848701351681555b5050600183811b0186555b505050948301945060019182019101613cb3565b5050505050505050565b60008235609e198336030181126133f457600080fd5b613db181613acf565b613dbd60018201613acf565b613dc960028201613acf565b613dd560038201613acf565b612d4060048201613acf565b613deb8283613448565b6001600160401b03811115613e0257613e026132a2565b613e1681613e10855461340e565b85613baa565b6000601f821160018114613e445760008315613e325750838201355b613e3c8482613aba565b865550613e9e565b600085815260209020601f19841690835b82811015613e755786850135825560209485019460019092019101613e55565b5084821015613e925760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050613eaf6020830183613448565b613ebd818360018601613be3565b5050613ecc6040830183613448565b613eda818360028601613be3565b5050613ee96060830183613448565b613ef7818360038601613be3565b5050613f066080830183613448565b613b57818360048601613be3565b600160401b831115613f2857613f286132a2565b805483825580841015613f7257613f3e81613a5d565b613f4785613a5d565b60008481526020902091820191015b81811015613f6f57613f6781613da8565b600501613f56565b50505b5060008181526020812083915b85811015613fb057613f9a613f948487613d92565b83613de1565b6020929092019160059190910190600101613f7f565b505050505050565b60008235603e198336030181126133f457600080fd5b613fd88283613448565b6001600160401b03811115613fef57613fef6132a2565b613ffd81613e10855461340e565b6000601f82116001811461402b57600083156140195750838201355b6140238482613aba565b865550614085565b600085815260209020601f19841690835b8281101561405c578685013582556020948501946001909201910161403c565b50848210156140795760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506120456140996020840184613d92565b60018301613de1565b600160401b8311156140b6576140b66132a2565b80548382558084101561410c576140cc81613a81565b6140d585613a81565b60008481526020902091820191015b81811015614109576140f581613acf565b61410160018201613da8565b6006016140e4565b50505b5060008181526020812083915b85811015613fb05761413461412e8487613fb8565b83613fce565b6020929092019160069190910190600101614119565b6141548283613448565b6001600160401b0381111561416b5761416b6132a2565b61417981613e10855461340e565b6000601f8211600181146141a757600083156141955750838201355b61419f8482613aba565b865550614201565b600085815260209020601f19841690835b828110156141d857868501358255602094850194600190920191016141b8565b50848210156141f55760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506142126020830183613448565b614220818360018601613be3565b505061422f6040830183613448565b61423d818360028601613be3565b505061424c6060830183613a14565b61425a818360038601613c9c565b50506142696080830183613a14565b613b57818360048601613c9c565b600160401b83111561428b5761428b6132a2565b805483825580841015614305576142a181613a5d565b6142aa85613a5d565b60008481526020902091820191015b81811015614302576142ca81613acf565b6142d660018201613acf565b6142e260028201613acf565b6142ee60038201613b22565b6142fa60048201613b22565b6005016142b9565b50505b5060008181526020812083915b85811015613fb05761432d6143278487613d92565b8361414a565b6020929092019160059190910190600101614312565b61434d8283613a14565b614358818385613c9c565b50506143676020830183613448565b614375818360018601613be3565b50506143846040830183613a14565b614392818360028601613c9c565b50506143a16060830183613a14565b6143af818360038601613f14565b50506143be6080830183613a14565b6143cc8183600486016140a2565b50506143db60a0830183613a14565b6143e98183600586016140a2565b50506143f860c0830183613a14565b6144068183600686016140a2565b505061441560e0830183613a14565b6144238183600786016140a2565b5050614433610100830183613a14565b6144418183600886016140a2565b5050614451610120830183613a14565b61445f818360098601614277565b505061446f610140830183613a14565b613b578183600a8601613c9c565b6020815260006144916020830184866134dd565b949350505050565b6000602082840312156144ab57600080fd5b505191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dd39ad191655a869e373cd042045365949d9feaa2a05af2292f589e8641c6be064736f6c63430008150033" + "code": "0x60806040526004361061007b5760003560e01c8063869957a51161004e578063869957a51461010e578063ad3cb1cc1461012e578063c4d66de81461016c578063f4653a1d1461018c57600080fd5b80633633852c146100805780634f1ef286146100b657806352d1902d146100cb57806356f7317d146100ee575b600080fd5b34801561008c57600080fd5b506100a061009b366004612dd5565b6101ac565b6040516100ad91906130e8565b60405180910390f35b6100c96100c43660046132b8565b61202a565b005b3480156100d757600080fd5b506100e0612049565b6040519081526020016100ad565b3480156100fa57600080fd5b506100c9610109366004613379565b612066565b34801561011a57600080fd5b506100c9610129366004613379565b612361565b34801561013a57600080fd5b5061015f604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ad91906133b4565b34801561017857600080fd5b506100c96101873660046133c7565b612611565b34801561019857600080fd5b506100c96101a7366004612dd5565b6126f3565b6101b4612d43565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506101fb915083906133e2565b908152604051908190036020019020600c0154600003610239578060405163186a887560e11b815260040161023091906133b4565b60405180910390fd5b6001848460405161024b9291906133fe565b90815260408051918290036020908101832080546101c09281028501830184526101a0850181815291938593908401928592849284919060009088015b828210156103345783829060005260206000200180546102a79061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d39061340e565b80156103205780601f106102f557610100808354040283529160200191610320565b820191906000526020600020905b81548152906001019060200180831161030357829003601f168201915b505050505081526020019060010190610288565b50505050815260200160018201805461034c9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546103789061340e565b80156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050815260200160028201805480602002602001604051908101604052809291908181526020016000905b8282101561049f5783829060005260206000200180546104129061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461043e9061340e565b801561048b5780601f106104605761010080835404028352916020019161048b565b820191906000526020600020905b81548152906001019060200180831161046e57829003601f168201915b5050505050815260200190600101906103f3565b50505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b828210156107d857838290600052602060002090600502016040518060a00160405290816000820180546104ff9061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461052b9061340e565b80156105785780601f1061054d57610100808354040283529160200191610578565b820191906000526020600020905b81548152906001019060200180831161055b57829003601f168201915b505050505081526020016001820180546105919061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546105bd9061340e565b801561060a5780601f106105df5761010080835404028352916020019161060a565b820191906000526020600020905b8154815290600101906020018083116105ed57829003601f168201915b505050505081526020016002820180546106239061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461064f9061340e565b801561069c5780601f106106715761010080835404028352916020019161069c565b820191906000526020600020905b81548152906001019060200180831161067f57829003601f168201915b505050505081526020016003820180546106b59061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546106e19061340e565b801561072e5780601f106107035761010080835404028352916020019161072e565b820191906000526020600020905b81548152906001019060200180831161071157829003601f168201915b505050505081526020016004820180546107479061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546107739061340e565b80156107c05780601f10610795576101008083540402835291602001916107c0565b820191906000526020600020905b8154815290600101906020018083116107a357829003601f168201915b505050505081525050815260200190600101906104cc565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610bb757838290600052602060002090600602016040518060400160405290816000820180546108389061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546108649061340e565b80156108b15780601f10610886576101008083540402835291602001916108b1565b820191906000526020600020905b81548152906001019060200180831161089457829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546108da9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546109069061340e565b80156109535780601f1061092857610100808354040283529160200191610953565b820191906000526020600020905b81548152906001019060200180831161093657829003601f168201915b5050505050815260200160018201805461096c9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546109989061340e565b80156109e55780601f106109ba576101008083540402835291602001916109e5565b820191906000526020600020905b8154815290600101906020018083116109c857829003601f168201915b505050505081526020016002820180546109fe9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2a9061340e565b8015610a775780601f10610a4c57610100808354040283529160200191610a77565b820191906000526020600020905b815481529060010190602001808311610a5a57829003601f168201915b50505050508152602001600382018054610a909061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc9061340e565b8015610b095780601f10610ade57610100808354040283529160200191610b09565b820191906000526020600020905b815481529060010190602001808311610aec57829003601f168201915b50505050508152602001600482018054610b229061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4e9061340e565b8015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b5050505050815250508152505081526020019060010190610805565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610f965783829060005260206000209060060201604051806040016040529081600082018054610c179061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c439061340e565b8015610c905780601f10610c6557610100808354040283529160200191610c90565b820191906000526020600020905b815481529060010190602001808311610c7357829003601f168201915b50505050508152602001600182016040518060a0016040529081600082018054610cb99061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce59061340e565b8015610d325780601f10610d0757610100808354040283529160200191610d32565b820191906000526020600020905b815481529060010190602001808311610d1557829003601f168201915b50505050508152602001600182018054610d4b9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d779061340e565b8015610dc45780601f10610d9957610100808354040283529160200191610dc4565b820191906000526020600020905b815481529060010190602001808311610da757829003601f168201915b50505050508152602001600282018054610ddd9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e099061340e565b8015610e565780601f10610e2b57610100808354040283529160200191610e56565b820191906000526020600020905b815481529060010190602001808311610e3957829003601f168201915b50505050508152602001600382018054610e6f9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9b9061340e565b8015610ee85780601f10610ebd57610100808354040283529160200191610ee8565b820191906000526020600020905b815481529060010190602001808311610ecb57829003601f168201915b50505050508152602001600482018054610f019061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2d9061340e565b8015610f7a5780601f10610f4f57610100808354040283529160200191610f7a565b820191906000526020600020905b815481529060010190602001808311610f5d57829003601f168201915b5050505050815250508152505081526020019060010190610be4565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156113755783829060005260206000209060060201604051806040016040529081600082018054610ff69061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546110229061340e565b801561106f5780601f106110445761010080835404028352916020019161106f565b820191906000526020600020905b81548152906001019060200180831161105257829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546110989061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546110c49061340e565b80156111115780601f106110e657610100808354040283529160200191611111565b820191906000526020600020905b8154815290600101906020018083116110f457829003601f168201915b5050505050815260200160018201805461112a9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546111569061340e565b80156111a35780601f10611178576101008083540402835291602001916111a3565b820191906000526020600020905b81548152906001019060200180831161118657829003601f168201915b505050505081526020016002820180546111bc9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546111e89061340e565b80156112355780601f1061120a57610100808354040283529160200191611235565b820191906000526020600020905b81548152906001019060200180831161121857829003601f168201915b5050505050815260200160038201805461124e9061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461127a9061340e565b80156112c75780601f1061129c576101008083540402835291602001916112c7565b820191906000526020600020905b8154815290600101906020018083116112aa57829003601f168201915b505050505081526020016004820180546112e09061340e565b80601f016020809104026020016040519081016040528092919081815260200182805461130c9061340e565b80156113595780601f1061132e57610100808354040283529160200191611359565b820191906000526020600020905b81548152906001019060200180831161133c57829003601f168201915b5050505050815250508152505081526020019060010190610fc3565b50505050815260200160078201805480602002602001604051908101604052809291908181526020016000905b8282101561175457838290600052602060002090600602016040518060400160405290816000820180546113d59061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546114019061340e565b801561144e5780601f106114235761010080835404028352916020019161144e565b820191906000526020600020905b81548152906001019060200180831161143157829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546114779061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546114a39061340e565b80156114f05780601f106114c5576101008083540402835291602001916114f0565b820191906000526020600020905b8154815290600101906020018083116114d357829003601f168201915b505050505081526020016001820180546115099061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546115359061340e565b80156115825780601f1061155757610100808354040283529160200191611582565b820191906000526020600020905b81548152906001019060200180831161156557829003601f168201915b5050505050815260200160028201805461159b9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546115c79061340e565b80156116145780601f106115e957610100808354040283529160200191611614565b820191906000526020600020905b8154815290600101906020018083116115f757829003601f168201915b5050505050815260200160038201805461162d9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546116599061340e565b80156116a65780601f1061167b576101008083540402835291602001916116a6565b820191906000526020600020905b81548152906001019060200180831161168957829003601f168201915b505050505081526020016004820180546116bf9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546116eb9061340e565b80156117385780601f1061170d57610100808354040283529160200191611738565b820191906000526020600020905b81548152906001019060200180831161171b57829003601f168201915b50505050508152505081525050815260200190600101906113a2565b50505050815260200160088201805480602002602001604051908101604052809291908181526020016000905b82821015611b3357838290600052602060002090600602016040518060400160405290816000820180546117b49061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546117e09061340e565b801561182d5780601f106118025761010080835404028352916020019161182d565b820191906000526020600020905b81548152906001019060200180831161181057829003601f168201915b50505050508152602001600182016040518060a00160405290816000820180546118569061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546118829061340e565b80156118cf5780601f106118a4576101008083540402835291602001916118cf565b820191906000526020600020905b8154815290600101906020018083116118b257829003601f168201915b505050505081526020016001820180546118e89061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546119149061340e565b80156119615780601f1061193657610100808354040283529160200191611961565b820191906000526020600020905b81548152906001019060200180831161194457829003601f168201915b5050505050815260200160028201805461197a9061340e565b80601f01602080910402602001604051908101604052809291908181526020018280546119a69061340e565b80156119f35780601f106119c8576101008083540402835291602001916119f3565b820191906000526020600020905b8154815290600101906020018083116119d657829003601f168201915b50505050508152602001600382018054611a0c9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611a389061340e565b8015611a855780601f10611a5a57610100808354040283529160200191611a85565b820191906000526020600020905b815481529060010190602001808311611a6857829003601f168201915b50505050508152602001600482018054611a9e9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611aca9061340e565b8015611b175780601f10611aec57610100808354040283529160200191611b17565b820191906000526020600020905b815481529060010190602001808311611afa57829003601f168201915b5050505050815250508152505081526020019060010190611781565b50505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015611efa57838290600052602060002090600502016040518060a0016040529081600082018054611b939061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbf9061340e565b8015611c0c5780601f10611be157610100808354040283529160200191611c0c565b820191906000526020600020905b815481529060010190602001808311611bef57829003601f168201915b50505050508152602001600182018054611c259061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c519061340e565b8015611c9e5780601f10611c7357610100808354040283529160200191611c9e565b820191906000526020600020905b815481529060010190602001808311611c8157829003601f168201915b50505050508152602001600282018054611cb79061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611ce39061340e565b8015611d305780601f10611d0557610100808354040283529160200191611d30565b820191906000526020600020905b815481529060010190602001808311611d1357829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b82821015611e0a578382906000526020600020018054611d7d9061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611da99061340e565b8015611df65780601f10611dcb57610100808354040283529160200191611df6565b820191906000526020600020905b815481529060010190602001808311611dd957829003601f168201915b505050505081526020019060010190611d5e565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611ee3578382906000526020600020018054611e569061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611e829061340e565b8015611ecf5780601f10611ea457610100808354040283529160200191611ecf565b820191906000526020600020905b815481529060010190602001808311611eb257829003601f168201915b505050505081526020019060010190611e37565b505050508152505081526020019060010190611b60565b505050508152602001600a8201805480602002602001604051908101604052809291908181526020016000905b82821015611fd3578382906000526020600020018054611f469061340e565b80601f0160208091040260200160405190810160405280929190818152602001828054611f729061340e565b8015611fbf5780601f10611f9457610100808354040283529160200191611fbf565b820191906000526020600020905b815481529060010190602001808311611fa257829003601f168201915b505050505081526020019060010190611f27565b50505091525050815260408051608081018252600b8401546001600160a01b03168152600c840154602080830191909152600d85015492820192909252600e9093015460ff16151560608401520152949350505050565b6120326128dd565b61203b82612984565b61204582826129ea565b5050565b6000612053612aac565b506000805160206144b383398151915290565b6120736020820182613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506120b8915083906133e2565b908152604051908190036020019020600c01546000036120ed578060405163186a887560e11b815260040161023091906133b4565b6120fa6020830183613448565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516001925061213f915083906133e2565b908152604051908190036020019020600e015460ff16156121755780604051630341716360e51b815260040161023091906133b4565b6121826020840184613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506121c7915083906133e2565b908152604051908190036020019020600b0154336001600160a01b039091161461223a57336001826040516121fc91906133e2565b908152604051908190036020018120600b015463a964fc1960e01b82526001600160a01b039283166004830152919091166024820152604401610230565b60405163d84a06e160e01b81527300000000000000000000000000000000000022229063d84a06e19061227190879060040161384a565b60006040518083038186803b15801561228957600080fd5b505af415801561229d573d6000803e3d6000fd5b505050508360018580602001906122b49190613448565b6040516122c29291906133fe565b9081526040519081900360200190206122db8282614343565b5042905060016122ee6020870187613448565b6040516122fc9291906133fe565b9081526020016040518091039020600b01600201819055507f7e7500a71b0209575a3b4858a2a662e94b0cad314ecb249f3526e9b2f86a01468480602001906123459190613448565b60405161235392919061447d565b60405180910390a150505050565b61236e6020820182613448565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506123b3915083906133e2565b908152604051908190036020019020600c0154156123e65780604051630eb7cd9560e01b815260040161023091906133b4565b730000000000000000000000000000000000002222635fbac08e61240d6020850185613448565b6040518363ffffffff1660e01b815260040161242a92919061447d565b60006040518083038186803b15801561244257600080fd5b505af4158015612456573d6000803e3d6000fd5b505060405163d84a06e160e01b8152730000000000000000000000000000000000002222925063d84a06e1915061249190859060040161384a565b60006040518083038186803b1580156124a957600080fd5b505af41580156124bd573d6000803e3d6000fd5b505050508160018380602001906124d49190613448565b6040516124e29291906133fe565b9081526040519081900360200190206124fb8282614343565b50339050600161250e6020850185613448565b60405161251c9291906133fe565b9081526020016040518091039020600b0160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055504260018380602001906125679190613448565b6040516125759291906133fe565b9081526020016040518091039020600b01600101819055504260018380602001906125a09190613448565b6040516125ae9291906133fe565b9081526020016040518091039020600b01600201819055507f5fccafd09eeeb6a3dc1c80357ee982c00d7fb00a991274a9b96fe4fd7cb605528280602001906125f79190613448565b60405161260592919061447d565b60405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061265a575080546001600160401b03808416911610155b156126785760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126a283612af5565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b81818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516001925061273a915083906133e2565b908152604051908190036020019020600c015460000361276f578060405163186a887560e11b815260040161023091906133b4565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600192506127b6915083906133e2565b908152604051908190036020019020600e015460ff16156127ec5780604051630341716360e51b815260040161023091906133b4565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060405160019250612833915083906133e2565b908152604051908190036020019020600b0154336001600160a01b039091161461286857336001826040516121fc91906133e2565b600180868660405161287b9291906133fe565b908152604051908190036020018120600e01805492151560ff19909316929092179091557f4360f12f602ccecefb32480e5314d0d3f57d38db8f52c76d8fdf4c39596c1c28906128ce908790879061447d565b60405180910390a15050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061296457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166129586000805160206144b3833981519152546001600160a01b031690565b6001600160a01b031614155b156129825760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156129cf57600080fd5b505afa1580156129e3573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612a44575060408051601f3d908101601f19168201909252612a4191810190614499565b60015b612a6c57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610230565b6000805160206144b38339815191528114612a9d57604051632a87526960e21b815260048101829052602401610230565b612aa78383612b1f565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146129825760405163703e46dd60e11b815260040160405180910390fd5b612afd612b75565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b612b2882612bbe565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612b6d57612aa78282612c23565b612045612c99565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661298257604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003612bf457604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610230565b6000805160206144b383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612c4091906133e2565b600060405180830381855af49150503d8060008114612c7b576040519150601f19603f3d011682016040523d82523d6000602084013e612c80565b606091505b5091509150612c90858383612cb8565b95945050505050565b34156129825760405163b398979f60e01b815260040160405180910390fd5b606082612ccd57612cc882612d17565b612d10565b8151158015612ce457506001600160a01b0384163b155b15612d0d57604051639996b31560e01b81526001600160a01b0385166004820152602401610230565b50805b9392505050565b805115612d275780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b6040518060400160405280612dab60405180610160016040528060608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b60008060208385031215612de857600080fd5b82356001600160401b0380821115612dff57600080fd5b818501915085601f830112612e1357600080fd5b813581811115612e2257600080fd5b866020828501011115612e3457600080fd5b60209290920196919550909350505050565b60005b83811015612e61578181015183820152602001612e49565b50506000910152565b60008151808452612e82816020860160208601612e46565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952612ecf838351612e6a565b98840198925090830190600101612eb3565b5090979650505050505050565b6000815160a08452612f0360a0850182612e6a565b905060208301518482036020860152612f1c8282612e6a565b91505060408301518482036040860152612f368282612e6a565b91505060608301518482036060860152612f508282612e6a565b91505060808301518482036080860152612c908282612e6a565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952612fa3838351612eee565b98840198925090830190600101612f87565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952815160408151818652612ff882870182612e6a565b915050858201519150848103868601526130128183612eee565b9a86019a9450505090830190600101612fd2565b600082825180855260208086019550808260051b84010181860160005b84811015612ee157601f19868403018952815160a0815181865261306982870182612e6a565b91505085820151858203878701526130818282612e6a565b9150506040808301518683038288015261309b8382612e6a565b92505050606080830151868303828801526130b68382612e96565b92505050608080830151925085820381870152506130d48183612e96565b9a86019a9450505090830190600101613043565b602081526000825160a0602084015280516101608060c0860152613110610220860183612e96565b9150602083015160bf19808785030160e088015261312e8483612e6a565b93506040850151915061010081888603018189015261314d8584612e96565b9450606086015192506101208289870301818a015261316c8685612f6a565b955060808701519350610140838a880301818b015261318b8786612fb5565b965060a08801519450838a880301868b01526131a78786612fb5565b965060c08801519550838a8803016101808b01526131c58787612fb5565b965060e08801519550838a8803016101a08b01526131e38787612fb5565b9650828801519550838a8803016101c08b01526132008787612fb5565b9650818801519550838a8803016101e08b015261321d8787613026565b965080880151975050505080878503016102008801525050506132408183612e96565b915050602084015161327e604085018280516001600160a01b0316825260208082015190830152604080820151908301526060908101511515910152565b509392505050565b80356001600160a01b038116811461329d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156132cb57600080fd5b6132d483613286565b915060208301356001600160401b03808211156132f057600080fd5b818501915085601f83011261330457600080fd5b813581811115613316576133166132a2565b604051601f8201601f19908116603f0116810190838211818310171561333e5761333e6132a2565b8160405282815288602084870101111561335757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561338b57600080fd5b81356001600160401b038111156133a157600080fd5b82016101608185031215612d1057600080fd5b602081526000612d106020830184612e6a565b6000602082840312156133d957600080fd5b612d1082613286565b600082516133f4818460208701612e46565b9190910192915050565b8183823760009101908152919050565b600181811c9082168061342257607f821691505b60208210810361344257634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e1984360301811261345f57600080fd5b8301803591506001600160401b0382111561347957600080fd5b60200191503681900382131561348e57600080fd5b9250929050565b6000808335601e198436030181126134ac57600080fd5b83016020810192503590506001600160401b038111156134cb57600080fd5b8060051b360382131561348e57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e1984360301811261351d57600080fd5b83016020810192503590506001600160401b0381111561353c57600080fd5b80360382131561348e57600080fd5b818352600060208085019450848460051b86018460005b87811015612ee15783830389526135798288613506565b6135848582846134dd565b9a87019a9450505090840190600101613562565b60006135a48283613506565b60a085526135b660a0860182846134dd565b9150506135c66020840184613506565b85830360208701526135d98382846134dd565b925050506135ea6040840184613506565b85830360408701526135fd8382846134dd565b9250505061360e6060840184613506565b85830360608701526136218382846134dd565b925050506136326080840184613506565b85830360808701526136458382846134dd565b9695505050505050565b60008235609e1983360301811261366557600080fd5b90910192915050565b818352600060208085019450848460051b86018460005b87811015612ee15783830389526136a5836136a0848a61364f565b613598565b98850198925090840190600101613685565b818352600060208085019450848460051b8601846000805b88811015613744578484038a528235603e198936030181126136ef578283fd5b880160406136fd8280613506565b82885261370d83890182846134dd565b9250505061371d8883018361364f565b9150858103888701526137308183613598565b9b88019b95505050918501916001016136cf565b509198975050505050505050565b60008383855260208086019550808560051b8301018460005b87811015612ee157848303601f19018952613786828861364f565b60a06137928283613506565b8287526137a283880182846134dd565b925050506137b286830183613506565b868303888801526137c48382846134dd565b9250505060406137d681840184613506565b878403838901526137e88482846134dd565b935050505060606137fb81840184613495565b8784038389015261380d84828461354b565b9350505050608061382081840184613495565b93508683038288015261383483858361354b565b9c88019c9650505092850192505060010161376b565b60208152600061385a8384613495565b6101608060208601526138726101808601838561354b565b92506138816020870187613506565b9250601f198087860301604088015261389b8585846134dd565b94506138aa6040890189613495565b94509150808786030160608801526138c385858461354b565b94506138d26060890189613495565b94509150808786030160808801526138eb85858461366e565b94506138fa6080890189613495565b94509150808786030160a08801526139138585846136b7565b945061392260a0890189613495565b94509150808786030160c088015261393b8585846136b7565b945061394a60c0890189613495565b94509150808786030160e08801526139638585846136b7565b945061397260e0890189613495565b9450915061010081888703018189015261398d8686856136b7565b955061399b818a018a613495565b95509250506101208188870301818901526139b78686856136b7565b95506139c5818a018a613495565b95509250506101408188870301818901526139e1868685613752565b95506139ef818a018a613495565b955092505080878603018388015250613a0984848361354b565b979650505050505050565b6000808335601e19843603018112613a2b57600080fd5b8301803591506001600160401b03821115613a4557600080fd5b6020019150600581901b360382131561348e57600080fd5b6005808202908104821461329d57634e487b7160e01b600052601160045260246000fd5b6006808202908104821461329d57634e487b7160e01b600052601160045260246000fd5b5b818110156120455760008155600101613aa6565b600019600383901b1c191660019190911b1790565b613ad9815461340e565b801561204557601f811160018114613af357505060009055565b600083815260208120613b11601f850160051c820160018301613aa5565b508381526020812081855555505050565b8054600082558015612045578160005260206000208181015b80821015613b5757613b4c82613acf565b600182019150613b3b565b50505050565b600160401b821115613b7157613b716132a2565b805482825580831015612aa7576000828152602090208381019082015b808210156129e357613b9f82613acf565b600182019150613b8e565b601f821115612aa757806000526020600020601f840160051c81016020851015613bd15750805b6129e3601f850160051c830182613aa5565b6001600160401b03831115613bfa57613bfa6132a2565b613c0e83613c08835461340e565b83613baa565b6000601f841160018114613c3c5760008515613c2a5750838201355b613c348682613aba565b8455506129e3565b600083815260209020601f19861690835b82811015613c6d5786850135825560209485019460019092019101613c4d565b5086821015613c8a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b613ca68382613b5d565b8160008281526020808220825b87811015613d8857613cc58588613448565b6001600160401b03811115613cdc57613cdc6132a2565b613cf081613cea865461340e565b86613baa565b85601f821160018114613d1c57878315613d0a5750838201355b613d148482613aba565b875550613d74565b600086815260209020601f19841690895b82811015613d4c57868501358255938901936001909101908901613d2d565b5084821015613d695760001960f88660031b161c19848701351681555b5050600183811b0186555b505050948301945060019182019101613cb3565b5050505050505050565b60008235609e198336030181126133f457600080fd5b613db181613acf565b613dbd60018201613acf565b613dc960028201613acf565b613dd560038201613acf565b612d4060048201613acf565b613deb8283613448565b6001600160401b03811115613e0257613e026132a2565b613e1681613e10855461340e565b85613baa565b6000601f821160018114613e445760008315613e325750838201355b613e3c8482613aba565b865550613e9e565b600085815260209020601f19841690835b82811015613e755786850135825560209485019460019092019101613e55565b5084821015613e925760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050613eaf6020830183613448565b613ebd818360018601613be3565b5050613ecc6040830183613448565b613eda818360028601613be3565b5050613ee96060830183613448565b613ef7818360038601613be3565b5050613f066080830183613448565b613b57818360048601613be3565b600160401b831115613f2857613f286132a2565b805483825580841015613f7257613f3e81613a5d565b613f4785613a5d565b60008481526020902091820191015b81811015613f6f57613f6781613da8565b600501613f56565b50505b5060008181526020812083915b85811015613fb057613f9a613f948487613d92565b83613de1565b6020929092019160059190910190600101613f7f565b505050505050565b60008235603e198336030181126133f457600080fd5b613fd88283613448565b6001600160401b03811115613fef57613fef6132a2565b613ffd81613e10855461340e565b6000601f82116001811461402b57600083156140195750838201355b6140238482613aba565b865550614085565b600085815260209020601f19841690835b8281101561405c578685013582556020948501946001909201910161403c565b50848210156140795760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506120456140996020840184613d92565b60018301613de1565b600160401b8311156140b6576140b66132a2565b80548382558084101561410c576140cc81613a81565b6140d585613a81565b60008481526020902091820191015b81811015614109576140f581613acf565b61410160018201613da8565b6006016140e4565b50505b5060008181526020812083915b85811015613fb05761413461412e8487613fb8565b83613fce565b6020929092019160069190910190600101614119565b6141548283613448565b6001600160401b0381111561416b5761416b6132a2565b61417981613e10855461340e565b6000601f8211600181146141a757600083156141955750838201355b61419f8482613aba565b865550614201565b600085815260209020601f19841690835b828110156141d857868501358255602094850194600190920191016141b8565b50848210156141f55760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506142126020830183613448565b614220818360018601613be3565b505061422f6040830183613448565b61423d818360028601613be3565b505061424c6060830183613a14565b61425a818360038601613c9c565b50506142696080830183613a14565b613b57818360048601613c9c565b600160401b83111561428b5761428b6132a2565b805483825580841015614305576142a181613a5d565b6142aa85613a5d565b60008481526020902091820191015b81811015614302576142ca81613acf565b6142d660018201613acf565b6142e260028201613acf565b6142ee60038201613b22565b6142fa60048201613b22565b6005016142b9565b50505b5060008181526020812083915b85811015613fb05761432d6143278487613d92565b8361414a565b6020929092019160059190910190600101614312565b61434d8283613a14565b614358818385613c9c565b50506143676020830183613448565b614375818360018601613be3565b50506143846040830183613a14565b614392818360028601613c9c565b50506143a16060830183613a14565b6143af818360038601613f14565b50506143be6080830183613a14565b6143cc8183600486016140a2565b50506143db60a0830183613a14565b6143e98183600586016140a2565b50506143f860c0830183613a14565b6144068183600686016140a2565b505061441560e0830183613a14565b6144238183600786016140a2565b5050614433610100830183613a14565b6144418183600886016140a2565b5050614451610120830183613a14565b61445f818360098601614277565b505061446f610140830183613a14565b613b578183600a8601613c9c565b6020815260006144916020830184866134dd565b949350505050565b6000602082840312156144ab57600080fd5b505191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c1b06d5346201d5e08ca371e1239c31bfdd421aa74f323e7334acb8e9d3b7fe964736f6c63430008140033" + }, + "0x0000000000000000000000000000000000018888": { + "comment": "Proxy: Ethereum registry for ERC-1056 ethr did methods", + "balance": "0", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", + "storage": { + "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003208a66afef77854a62da174944247049778d9b6" + } + }, + "0x3208a66afef77854a62da174944247049778d9b6": { + "comment": "Implementation: Ethereum registry for ERC-1056 ethr did methods", + "balance": "0", + "code": "0x60806040526004361061011e5760003560e01c806380b29f7c116100a0578063ad3cb1cc11610064578063ad3cb1cc14610369578063c4d66de8146103a7578063e476af5c146103c7578063f00d4b5d146103e7578063f96d0f9f1461040757600080fd5b806380b29f7c146102c95780638733d4e8146102e957806393072684146103095780639c2c1b2b14610329578063a7068d661461034957600080fd5b80634f1ef286116100e75780634f1ef2861461022457806352d1902d14610237578063622b2a3c1461024c57806370ae92d21461027c5780637ad4b0a4146102a957600080fd5b8062c023da14610123578063022914a7146101455780630d44625b14610198578063123b5e98146101e4578063240cf1fa14610204575b600080fd5b34801561012f57600080fd5b5061014361013e3660046113d9565b610434565b005b34801561015157600080fd5b5061017b610160366004611430565b6000602081905290815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101a457600080fd5b506101d66101b336600461144b565b600160209081526000938452604080852082529284528284209052825290205481565b60405190815260200161018f565b3480156101f057600080fd5b506101436101ff366004611498565b610445565b34801561021057600080fd5b5061014361021f36600461151d565b6104d1565b610143610232366004611574565b61059c565b34801561024357600080fd5b506101d66105bb565b34801561025857600080fd5b5061026c61026736600461144b565b6105d8565b604051901515815260200161018f565b34801561028857600080fd5b506101d6610297366004611430565b60036020526000908152604090205481565b3480156102b557600080fd5b506101436102c43660046115c2565b61062b565b3480156102d557600080fd5b506101436102e436600461144b565b61063e565b3480156102f557600080fd5b5061017b610304366004611430565b61064a565b34801561031557600080fd5b50610143610324366004611621565b61067a565b34801561033557600080fd5b50610143610344366004611680565b610751565b34801561035557600080fd5b506101436103643660046116ea565b610828565b34801561037557600080fd5b5061039a604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161018f919061177e565b3480156103b357600080fd5b506101436103c2366004611430565b610835565b3480156103d357600080fd5b506101436103e2366004611791565b61091a565b3480156103f357600080fd5b5061014361040236600461180b565b610999565b34801561041357600080fd5b506101d6610422366004611430565b60026020526000908152604090205481565b610440833384846109a4565b505050565b6000601960f81b813060038261045a8d61064a565b6001600160a01b03166001600160a01b03168152602001908152602001600020548b88888860405160200161049698979695949392919061183e565b6040516020818303038152906040528051906020012090506104c7886104bf8a8a8a8a87610a60565b868686610b4f565b5050505050505050565b6000601960f81b81306003826104e68b61064a565b6001600160a01b0316815260208082019290925260409081016000205481516001600160f81b0319968716818501529490951660218501526001600160601b0319606093841b8116602286015260368501959095528a831b851660568501526a31b430b733b2a7bbb732b960a91b606a8501529186901b90931660758301528051606981840301815260899092019052805191012090506105948661058e8188888887610a60565b84610c17565b505050505050565b6105a4610cdf565b6105ad82610d86565b6105b78282610ded565b5050565b60006105c5610eaa565b50600080516020611a0d83398151915290565b6001600160a01b03838116600090815260016020908152604080832081518084018890528251808203850181529083018352805190840120845282528083209385168352929052205442105b9392505050565b6106388433858585610b4f565b50505050565b61044083338484610ef3565b6001600160a01b0380821660009081526020819052604081205490911680156106735792915050565b5090919050565b6000601960f81b813060038261068f8c61064a565b6001600160a01b0316815260208082019290925260409081016000205481516001600160f81b0319968716818501529490951660218501526001600160601b0319606093841b8116602286015260368501959095528b831b851660568501526d7265766f6b6544656c656761746560901b606a850152607884018890529186901b90931660988301528051608c81840301815260ac909201905280519101209050610748876107418189898987610a60565b8585610ef3565b50505050505050565b6000601960f81b81306003826107668d61064a565b6001600160a01b0316815260208082019290925260409081016000205490516001600160f81b031995861692810192909252929093166021840152606090811b6001600160601b0319908116602285015260368401929092528a811b821660568401526a61646444656c656761746560a81b606a8401526075830187905285901b16609582015260a9810183905260c9016040516020818303038152906040528051906020012090506104c7886108208a8a8a8a87610a60565b868686610fd1565b6106388433858585610fd1565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061087f5750805467ffffffffffffffff808416911610155b1561089d5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556108c8836110d0565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000601960f81b813060038261092f8c61064a565b6001600160a01b03166001600160a01b03168152602001908152602001600020548a878760405160200161096997969594939291906118c4565b604051602081830303815290604052805190602001209050610748876109928989898987610a60565b85856109a4565b6105b7823383610c17565b83836109af8261064a565b6001600160a01b0316816001600160a01b0316146109e85760405162461bcd60e51b81526004016109df90611946565b60405180910390fd5b6001600160a01b0386166000818152600260205260408082205490517f18ab6b2ae3d64306c00ce663125f2bd680e441a098de1635bd7ad8b0d44965e492610a3592899289929190611969565b60405180910390a25050506001600160a01b0390921660009081526002602052604090204390555050565b6040805160008082526020820180845284905260ff8716928201929092526060810185905260808101849052819060019060a0016020604051602081039080840390855afa158015610ab6573d6000803e3d6000fd5b505050602060405103519050610acb8761064a565b6001600160a01b0316816001600160a01b031614610b1b5760405162461bcd60e51b815260206004820152600d60248201526c6261645f7369676e617475726560981b60448201526064016109df565b6001600160a01b0381166000908152600360205260408120805491610b3f836119ab565b9091555090979650505050505050565b8484610b5a8261064a565b6001600160a01b0316816001600160a01b031614610b8a5760405162461bcd60e51b81526004016109df90611946565b6001600160a01b0387167f18ab6b2ae3d64306c00ce663125f2bd680e441a098de1635bd7ad8b0d44965e48686610bc187426119c4565b6001600160a01b038c1660009081526002602052604090819020549051610beb9493929190611969565b60405180910390a25050506001600160a01b039093166000908152600260205260409020439055505050565b8282610c228261064a565b6001600160a01b0316816001600160a01b031614610c525760405162461bcd60e51b81526004016109df90611946565b6001600160a01b0385811660008181526020818152604080832080546001600160a01b031916958916958617905560028252918290205482519485529084015290917f38a5a6e68f30ed1ab45860a4afb34bcb2fc00f22ca462d249b8a8d40cda6f7a3910160405180910390a2505050506001600160a01b03166000908152600260205260409020439055565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610d6657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610d5a600080516020611a0d833981519152546001600160a01b031690565b6001600160a01b031614155b15610d845760405163703e46dd60e11b815260040160405180910390fd5b565b6004805460405163574a81d760e01b815230928101929092526001600160a01b038381166024840152169063574a81d79060440160006040518083038186803b158015610dd257600080fd5b505afa158015610de6573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610e47575060408051601f3d908101601f19168201909252610e44918101906119d7565b60015b610e6f57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016109df565b600080516020611a0d8339815191528114610ea057604051632a87526960e21b8152600481018290526024016109df565b61044083836110fa565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d845760405163703e46dd60e11b815260040160405180910390fd5b8383610efe8261064a565b6001600160a01b0316816001600160a01b031614610f2e5760405162461bcd60e51b81526004016109df90611946565b6001600160a01b03868116600081815260016020908152604080832081518084018b90528251808203850181528184018085528151918601919091208652918452828520968a16808652968452828520429081905586865260029094529190932054928990526060810194909452608084015260a0830152907f5a5084339536bcab65f20799fcc58724588145ca054bd2be626174b27ba156f79060c001610a35565b8484610fdc8261064a565b6001600160a01b0316816001600160a01b03161461100c5760405162461bcd60e51b81526004016109df90611946565b61101683426119c4565b6001600160a01b03888116600081815260016020908152604080832081518084018d9052825180820385018152908301835280519084012084528252808320948a16835293905291909120919091557f5a5084339536bcab65f20799fcc58724588145ca054bd2be626174b27ba156f7868661109287426119c4565b6001600160a01b038c811660009081526002602090815260409182902054825196875294909216918501919091528301526060820152608001610beb565b6110d8611150565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b61110382611199565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156111485761044082826111fe565b6105b7611276565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610d8457604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b6000036111cf57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016109df565b600080516020611a0d83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161121b91906119f0565b600060405180830381855af49150503d8060008114611256576040519150601f19603f3d011682016040523d82523d6000602084013e61125b565b606091505b509150915061126b858383611295565b925050505b92915050565b3415610d845760405163b398979f60e01b815260040160405180910390fd5b6060826112aa576112a5826112f1565b610624565b81511580156112c157506001600160a01b0384163b155b156112ea57604051639996b31560e01b81526001600160a01b03851660048201526024016109df565b5080610624565b8051156113015780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461133157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261135d57600080fd5b813567ffffffffffffffff8082111561137857611378611336565b604051601f8301601f19908116603f011681019082821181831017156113a0576113a0611336565b816040528381528660208588010111156113b957600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156113ee57600080fd5b6113f78461131a565b925060208401359150604084013567ffffffffffffffff81111561141a57600080fd5b6114268682870161134c565b9150509250925092565b60006020828403121561144257600080fd5b6106248261131a565b60008060006060848603121561146057600080fd5b6114698461131a565b92506020840135915061147e6040850161131a565b90509250925092565b803560ff8116811461133157600080fd5b600080600080600080600060e0888a0312156114b357600080fd5b6114bc8861131a565b96506114ca60208901611487565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114fb57600080fd5b6115078a828b0161134c565b92505060c0880135905092959891949750929550565b600080600080600060a0868803121561153557600080fd5b61153e8661131a565b945061154c60208701611487565b935060408601359250606086013591506115686080870161131a565b90509295509295909350565b6000806040838503121561158757600080fd5b6115908361131a565b9150602083013567ffffffffffffffff8111156115ac57600080fd5b6115b88582860161134c565b9150509250929050565b600080600080608085870312156115d857600080fd5b6115e18561131a565b935060208501359250604085013567ffffffffffffffff81111561160457600080fd5b6116108782880161134c565b949793965093946060013593505050565b60008060008060008060c0878903121561163a57600080fd5b6116438761131a565b955061165160208801611487565b945060408701359350606087013592506080870135915061167460a0880161131a565b90509295509295509295565b600080600080600080600060e0888a03121561169b57600080fd5b6116a48861131a565b96506116b260208901611487565b95506040880135945060608801359350608088013592506116d560a0890161131a565b915060c0880135905092959891949750929550565b6000806000806080858703121561170057600080fd5b6117098561131a565b93506020850135925061171e6040860161131a565b9396929550929360600135925050565b60005b83811015611749578181015183820152602001611731565b50506000910152565b6000815180845261176a81602086016020860161172e565b601f01601f19169290920160200192915050565b6020815260006106246020830184611752565b60008060008060008060c087890312156117aa57600080fd5b6117b38761131a565b95506117c160208801611487565b945060408701359350606087013592506080870135915060a087013567ffffffffffffffff8111156117f257600080fd5b6117fe89828a0161134c565b9150509295509295509295565b6000806040838503121561181e57600080fd5b6118278361131a565b91506118356020840161131a565b90509250929050565b6001600160f81b03198981168252881660018201526001600160601b0319606088811b821660028401526016830188905286901b1660368201526b73657441747472696275746560a01b604a8201526056810184905282516000906118aa81607685016020880161172e565b607692019182019290925260960198975050505050505050565b6001600160f81b03198881168252871660018201526001600160601b0319606087811b821660028401526016830187905285901b1660368201526e7265766f6b6541747472696275746560881b604a82015260598101839052815160009061193381607985016020870161172e565b9190910160790198975050505050505050565b6020808252600990820152683130b22fb0b1ba37b960b91b604082015260600190565b8481526080602082015260006119826080830186611752565b6040830194909452506060015292915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016119bd576119bd611995565b5060010190565b8082018082111561127057611270611995565b6000602082840312156119e957600080fd5b5051919050565b60008251611a0281846020870161172e565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ffa12875c711fb33e400958d1dd5243fa89e46fc939667c280c2bda0a202d63264736f6c63430008140033" + }, + "0x000000000000000000000000000000000019999": { + "comment": "Proxy: Smart contract to resolve DIDs from various DID registries", + "balance": "0", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", + "storage": { + "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", + "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000003333", + "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000018888", + "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003522f71f8c3cd8a3f7e66ce2806594b0914247da" + } + }, + "0x3522f71f8c3cd8a3f7e66ce2806594b0914247da": { + "comment": "Implementation: Smart contract to resolve DIDs from various DID registries", + "balance": "0", + "code": "0x6080604052600436106100555760003560e01c806329181c6c1461005a5780634f1ef2861461009057806352d1902d146100a557806366874f25146100c8578063ad3cb1cc14610126578063c0c53b8b14610164575b600080fd5b34801561006657600080fd5b5061007a61007536600461196e565b610184565b6040516100879190611c85565b60405180910390f35b6100a361009e366004611ebb565b610301565b005b3480156100b157600080fd5b506100ba610320565b604051908152602001610087565b3480156100d457600080fd5b506100e86100e336600461196e565b61033d565b604051610087919081516001600160a01b03168152602080830151908201526040808301519082015260609182015115159181019190915260800190565b34801561013257600080fd5b50610157604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100879190611f4d565b34801561017057600080fd5b506100a361017f366004611f60565b610563565b6101e160405180610160016040528060608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b600061022284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067792505050565b905061023181600001516107c2565b156102b757600154604051630d8ce14b60e21b81526001600160a01b0390911690633633852c906102689087908790600401611fab565b600060405180830381865afa158015610285573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102ad91908101906124dc565b5191506102fb9050565b80516040516102c991906020016126f7565b60408051601f198184030181529082905263fdc1b5c360e01b82526102f091600401612747565b60405180910390fd5b505b92915050565b610309610862565b61031282610909565b61031c828261096f565b5050565b600061032a610a31565b5060008051602061297083398151915290565b60408051608081018252600080825260208201819052918101829052606081019190915260006103a284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067792505050565b90506103b18160000151610a7a565b156104975760006103c58260200151610ab3565b90506001600160a01b0381166103f2578484604051631859e3bb60e11b81526004016102f0929190611fab565b6002546040516310e67a9d60e31b81526001600160a01b0383811660048301526000921690638733d4e890602401602060405180830381865afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610461919061279b565b604080516080810182526001600160a01b039092168252600060208301819052908201819052606082015293506102fb92505050565b80516104a2906107c2565b1561052a57600154604051630d8ce14b60e21b81526001600160a01b0390911690633633852c906104d99087908790600401611fab565b600060405180830381865afa1580156104f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261051e91908101906124dc565b602001519150506102fb565b805160405161053c91906020016126f7565b60408051601f198184030181529082905263fdc1b5c360e01b82526102f0916004016127b8565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105ac575080546001600160401b03808416911610155b156105ca5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556105f485610aec565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6040805180820190915260608082526020820152600061069683610b16565b905060006106bc604051806040016040528060018152602001601d60f91b815250610b16565b90506000806106cb8484610b21565b955092509050801580610709575061070761070060405180604001604052806003815260200162191a5960ea1b815250610b16565b8390610b6f565b155b156107295785604051631859e3bb60e11b81526004016102f09190611f4d565b6107338484610b21565b955092509050806107595785604051631859e3bb60e11b81526004016102f09190611f4d565b604080518082019091526060808252602082015261077683610b7b565b81526040805180820190915260018152601d60f91b60208201526107a49061079d90610b16565b8690610b86565b94506107b39150849050610b7b565b60208201529695505050505050565b6000806107ce83610b16565b90506107ff6107f860405180604001604052806004815260200163696e647960e01b815250610b16565b8290610b6f565b8061082e575061082e6107f86040518060400160405280600581526020016434b7323c9960d91b815250610b16565b8061085b575061085b6107f86040518060400160405280600381526020016239b7bb60e91b815250610b16565b9392505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806108e957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108dd600080516020612970833981519152546001600160a01b031690565b6001600160a01b031614155b156109075760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561095457600080fd5b505afa158015610968573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156109c9575060408051601f3d908101601f191682019092526109c69181019061280c565b60015b6109f157604051634c9c8ce360e01b81526001600160a01b03831660048201526024016102f0565b6000805160206129708339815191528114610a2257604051632a87526960e21b8152600481018290526024016102f0565b610a2c8383610bb0565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109075760405163703e46dd60e11b815260040160405180910390fd5b60006102fb610aa46040518060400160405280600481526020016332ba343960e11b815250610b16565b610aad84610b16565b90610b6f565b60006016610abf835190565b03610acc57506000919050565b6000610ad783610c06565b9050610ae281612825565b60601c9392505050565b610af4610dff565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006102fb82610e48565b6000808080610b308686610e5c565b90506000198103610b4c57600086600093509350935050610b68565b610b6086826001600160801b038816610f67565b935093509350505b9250925092565b600061085b8383610fd4565b60606102fb8261101e565b6000808080610b958686611095565b90506000198103610b4c576000808793509350935050610b68565b610bb982611187565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610bfe57610a2c82826111ec565b61031c611262565b60606000610c1383610b16565b90506000610c3a60405180604001604052806002815260200161060f60f31b815250610b16565b9050610c69610c6260405180604001604052806002815260200161060f60f31b815250610b16565b8390611281565b610c8457505060408051602081019091526000815292915050565b610c96610c91838361128d565b610b7b565b93506000849050600060028251610cad9190612877565b6001600160401b03811115610cc457610cc4611de1565b6040519080825280601f01601f191660200182016040528015610cee576020820181803683370190505b50905060005b8151811015610df557600080610d3385610d0f856002612899565b81518110610d1f57610d1f6128b0565b01602001516001600160f81b031916611299565b9150915080610d58575050604080516020810190915260008152979650505050505050565b600080610d7587610d6a876002612899565b610d0f9060016128c6565b9150915080610d9c5750506040805160208101909152600081529998505050505050505050565b81610da88560106128d9565b610db291906128f5565b60f81b868681518110610dc757610dc76128b0565b60200101906001600160f81b031916908160001a905350505050508080610ded9061290e565b915050610cf4565b5095945050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661090757604051631afcd79f60e31b815260040160405180910390fd5b60008060208301905061085b81845161137f565b60006001600160801b03838116908316808303610e7e576000925050506102fb565b811580610e8a57508181115b15610e9b57600019925050506102fb565b6000610ea78660801c90565b90506000610eb58660801c90565b90506000610ec4825160001a90565b90505b6000610ed484878461138b565b90506000198103610eef5760001996505050505050506102fb565b94859003949283019285851115610f105760001996505050505050506102fb565b84832085852003610f3c57610f258960801c90565b610f2f9085612927565b96505050505050506102fb565b85600103610f545760001996505050505050506102fb565b6000199095019460019093019250610ec7565b600080600080610f778760801c90565b90506001600160801b03871685870181811115610fa7576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b038381169083168114610ff45760009150506102fb565b6110166110018560801c90565b61100b8560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b0381111561104157611041611de1565b6040519080825280601f01601f19166020018201604052801561106b576020820181803683370190505b5090506020810161108f816110808560801c90565b6001600160801b038616611453565b50919050565b60006001600160801b038381169083168083036110b7576000925050506102fb565b8115806110c357508181115b156110d457600019925050506102fb565b60006110e08660801c90565b905060006110ee8660801c90565b905060006110fb87611461565b905060001984015b60006111108588856114a6565b9050600019810361112c576000199750505050505050506102fb565b80821115611145576000199750505050505050506102fb565b8584208282038681018890209091036111675797506102fb9650505050505050565b811561117557509550611103565b600019985050505050505050506102fb565b806001600160a01b03163b6000036111bd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016102f0565b60008051602061297083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051611209919061293a565b600060405180830381855af49150503d8060008114611244576040519150601f19603f3d011682016040523d82523d6000602084013e611249565b606091505b509150915061125985838361155a565b95945050505050565b34156109075760405163b398979f60e01b815260040160405180910390fd5b600061085b83836115b6565b600061085b8383611603565b600080600360fc1b6001600160f81b03198416108015906112c85750603960f81b6001600160f81b0319841611155b156112e6576112dc603060f885901c612956565b9360019350915050565b604160f81b6001600160f81b03198416108015906113125750602360f91b6001600160f81b0319841611155b1561133257604161132860f885901c600a6128f5565b6112dc9190612956565b606160f81b6001600160f81b031984161080159061135e5750603360f91b6001600160f81b0319841611155b1561137457606161132860f885901c600a6128f5565b506000928392509050565b600061085b838361165d565b6000602083116113a7576113a0848484611669565b905061085b565b83601f8416808503820160ff8516600080516020612990833981519152025b8188101561140857875181186113db8161177a565b156113fc578489036113ef8a60208a611669565b019550505050505061085b565b602089019850506113c6565b8260000361141e5760001994505050505061085b565b611429828488611669565b945060001985036114425760001994505050505061085b565b509190910391909101949350505050565b8083828460045afa50505050565b60006001600160801b03821680820361148d576040516365f4e9df60e01b815260040160405180910390fd5b61085b6001820361149e8560801c90565b015160001a90565b6000602083116114bb576113a08484846117c5565b601f831684840181156114f35781900360006114d88284876117c5565b905060001981146114f1579086900301915061085b9050565b505b60ff8416600080516020612990833981519152025b8682111561154c57601f19909101805190919081186115268161177a565b156115465787830361153a846020896117c5565b0194505050505061085b565b50611508565b506000199695505050505050565b60608261156f5761156a8261180e565b61085b565b815115801561158657506001600160a01b0384163b155b156115af57604051639996b31560e01b81526001600160a01b03851660048201526024016102f0565b508061085b565b60006001600160801b03838116908316808210156115d9576000925050506102fb565b84818311156115ef576115ec868361183a565b90505b6115f98186610fd4565b9695505050505050565b60006001600160801b03838116908316818111156116255784925050506102fb565b6000806116328784611885565b90925090506116418287610fd4565b156116515793506102fb92505050565b869450505050506102fb565b600061085b8383611908565b825160009081602085111561167d57602094505b601285106117075760ff84166000805160206129908339815191520282186116ad6001600160801b03821761177a565b6000036116e35760109150601a86106116de576116d26001600160401b03821761177a565b6000036116de57601891505b611701565b6116f56001600160c01b03821761177a565b60000361170157600891505b50611745565b600a85106117455760ff84166000805160206129908339815191520282186117376001600160c01b03821761177a565b60000361174357600891505b505b8481101561176d5781811a60ff851681036117645750915061085b9050565b50600101611745565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b600060208311156117d557602092505b83515b8315611802576000199093019280841a60ff841681036117fc57849250505061085b565b506117d8565b50600019949350505050565b80511561181e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006001600160801b03831680831115611867576040516365f4e9df60e01b815260040160405180910390fd5b6110166118748560801c90565b60801b6001600160801b0385161790565b60008060006118948560801c90565b90506001600160801b038516808511156118c1576040516365f4e9df60e01b815260040160405180910390fd5b608082901b6001600160801b038616176118fb6118de87856128c6565b6118e88885612927565b6001600160801b031660809190911b1790565b9350935050509250929050565b60006001600160801b038311156119325760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b0382111561195a57604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b6000806020838503121561198157600080fd5b82356001600160401b038082111561199857600080fd5b818501915085601f8301126119ac57600080fd5b8135818111156119bb57600080fd5b8660208285010111156119cd57600080fd5b60209290920196919550909350505050565b60005b838110156119fa5781810151838201526020016119e2565b50506000910152565b60008151808452611a1b8160208601602086016119df565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015611a7a57601f19868403018952611a68838351611a03565b98840198925090830190600101611a4c565b5090979650505050505050565b6000815160a08452611a9c60a0850182611a03565b905060208301518482036020860152611ab58282611a03565b91505060408301518482036040860152611acf8282611a03565b91505060608301518482036060860152611ae98282611a03565b915050608083015184820360808601526112598282611a03565b600082825180855260208086019550808260051b84010181860160005b84811015611a7a57601f19868403018952611b3c838351611a87565b98840198925090830190600101611b20565b6000815180845260208085019450848260051b860182860160005b85811015611a7a578383038952815160408151818652611b8b82870182611a03565b91505086820151915084810387860152611ba58183611a87565b9a87019a9450505090840190600101611b69565b600081518084526020808501808196508360051b8101915082860160005b85811015611c78578284038952815160a08151818752611bf982880182611a03565b9150508682015186820388880152611c118282611a03565b91505060408083015187830382890152611c2b8382611a03565b9250505060608083015187830382890152611c468382611a2f565b9250505060808083015192508682038188015250611c648183611a2f565b9a87019a9550505090840190600101611bd7565b5091979650505050505050565b6020815260008251610160806020850152611ca4610180850183611a2f565b91506020850151601f1980868503016040870152611cc28483611a03565b93506040870151915080868503016060870152611cdf8483611a2f565b93506060870151915080868503016080870152611cfc8483611b03565b935060808701519150808685030160a0870152611d198483611b4e565b935060a08701519150808685030160c0870152611d368483611b4e565b935060c08701519150808685030160e0870152611d538483611b4e565b935060e08701519150610100818786030181880152611d728584611b4e565b945080880151925050610120818786030181880152611d918584611b4e565b945080880151925050610140818786030181880152611db08584611bb9565b9088015187820390920184880152935090506115f98382611a2f565b6001600160a01b038116811461183757600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715611e1957611e19611de1565b60405290565b604080519081016001600160401b0381118282101715611e1957611e19611de1565b60405161016081016001600160401b0381118282101715611e1957611e19611de1565b604051601f8201601f191681016001600160401b0381118282101715611e8c57611e8c611de1565b604052919050565b60006001600160401b03821115611ead57611ead611de1565b50601f01601f191660200190565b60008060408385031215611ece57600080fd5b8235611ed981611dcc565b915060208301356001600160401b03811115611ef457600080fd5b8301601f81018513611f0557600080fd5b8035611f18611f1382611e94565b611e64565b818152866020838501011115611f2d57600080fd5b816020840160208301376000602083830101528093505050509250929050565b60208152600061085b6020830184611a03565b600080600060608486031215611f7557600080fd5b8335611f8081611dcc565b92506020840135611f9081611dcc565b91506040840135611fa081611dcc565b809150509250925092565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006001600160401b03821115611ff357611ff3611de1565b5060051b60200190565b600082601f83011261200e57600080fd5b815161201c611f1382611e94565b81815284602083860101111561203157600080fd5b6110168260208301602087016119df565b600082601f83011261205357600080fd5b81516020612063611f1383611fda565b82815260059290921b8401810191818101908684111561208257600080fd5b8286015b848110156120c15780516001600160401b038111156120a55760008081fd5b6120b38986838b0101611ffd565b845250918301918301612086565b509695505050505050565b600060a082840312156120de57600080fd5b6120e6611df7565b905081516001600160401b03808211156120ff57600080fd5b61210b85838601611ffd565b8352602084015191508082111561212157600080fd5b61212d85838601611ffd565b6020840152604084015191508082111561214657600080fd5b61215285838601611ffd565b6040840152606084015191508082111561216b57600080fd5b61217785838601611ffd565b6060840152608084015191508082111561219057600080fd5b5061219d84828501611ffd565b60808301525092915050565b600082601f8301126121ba57600080fd5b815160206121ca611f1383611fda565b82815260059290921b840181019181810190868411156121e957600080fd5b8286015b848110156120c15780516001600160401b0381111561220c5760008081fd5b61221a8986838b01016120cc565b8452509183019183016121ed565b600082601f83011261223957600080fd5b81516020612249611f1383611fda565b82815260059290921b8401810191818101908684111561226857600080fd5b8286015b848110156120c15780516001600160401b038082111561228c5760008081fd5b908801906040828b03601f19018113156122a65760008081fd5b6122ae611e1f565b87840151838111156122c05760008081fd5b6122ce8d8a83880101611ffd565b8252509083015190828211156122e45760008081fd5b6122f28c89848701016120cc565b81890152865250505091830191830161226c565b600082601f83011261231757600080fd5b81516020612327611f1383611fda565b82815260059290921b8401810191818101908684111561234657600080fd5b8286015b848110156120c15780516001600160401b038082111561236a5760008081fd5b9088019060a0828b03601f19018113156123845760008081fd5b61238c611df7565b878401518381111561239e5760008081fd5b6123ac8d8a83880101611ffd565b825250604080850151848111156123c35760008081fd5b6123d18e8b83890101611ffd565b8a84015250606080860151858111156123ea5760008081fd5b6123f88f8c838a0101611ffd565b83850152506080915081860151858111156124135760008081fd5b6124218f8c838a0101612042565b8285015250508285015192508383111561243b5760008081fd5b6124498d8a85880101612042565b90820152865250505091830191830161234a565b60006080828403121561246f57600080fd5b604051608081018181106001600160401b038211171561249157612491611de1565b806040525080915082516124a481611dcc565b808252506020830151602082015260408301516040820152606083015180151581146124cf57600080fd5b6060919091015292915050565b6000602082840312156124ee57600080fd5b81516001600160401b038082111561250557600080fd5b9083019060a0828603121561251957600080fd5b612521611e1f565b82518281111561253057600080fd5b8301610160818803121561254357600080fd5b61254b611e41565b81518481111561255a57600080fd5b61256689828501612042565b82525060208201518481111561257b57600080fd5b61258789828501611ffd565b60208301525060408201518481111561259f57600080fd5b6125ab89828501612042565b6040830152506060820151848111156125c357600080fd5b6125cf898285016121a9565b6060830152506080820151848111156125e757600080fd5b6125f389828501612228565b60808301525060a08201518481111561260b57600080fd5b61261789828501612228565b60a08301525060c08201518481111561262f57600080fd5b61263b89828501612228565b60c08301525060e08201518481111561265357600080fd5b61265f89828501612228565b60e083015250610100808301518581111561267957600080fd5b6126858a828601612228565b828401525050610120808301518581111561269f57600080fd5b6126ab8a828601612306565b82840152505061014080830151858111156126c557600080fd5b6126d18a828601612042565b82840152505080835250506126e9866020850161245d565b602082015295945050505050565b7f556e737570706f7274656420444944204d6574686f643a20270000000000000081526000825161272f8160198501602087016119df565b602760f81b6019939091019283015250601a01919050565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c7665446f63756060820152631b595b9d60e21b608082015260a06020820152600061085b60a0830184611a03565b6000602082840312156127ad57600080fd5b815161085b81611dcc565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c76654d6574616060820152636461746160e01b608082015260a06020820152600061085b60a0830184611a03565b60006020828403121561281e57600080fd5b5051919050565b805160208201516bffffffffffffffffffffffff1980821692919060148310156128595780818460140360031b1b83161693505b505050919050565b634e487b7160e01b600052601160045260246000fd5b60008261289457634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176102fb576102fb612861565b634e487b7160e01b600052603260045260246000fd5b808201808211156102fb576102fb612861565b60ff81811683821602908116908181146102f9576102f9612861565b60ff81811683821601908111156102fb576102fb612861565b60006001820161292057612920612861565b5060010190565b818103818111156102fb576102fb612861565b6000825161294c8184602087016119df565b9190910192915050565b60ff82811682821603908111156102fb576102fb61286156fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0101010101010101010101010101010101010101010101010101010101010101a26469706673582212201a204121cf223f80ea20333b9cb6eceaa9aa649c2b56829395cf2181e03abc0764736f6c63430008140033" }, "0x0000000000000000000000000000000000005555": { "comment": "Proxy: Smart contract to manage schemas", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", - "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000003333", + "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000007c490e67bfa61b5b51968dcf0bab2bb6bb762d7c" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000006073e9c8702975dcbe1736e0921ce748f99bd20e" } }, - "0x7c490e67bfa61b5b51968dcf0bab2bb6bb762d7c": { + "0x6073e9c8702975dcbe1736e0921ce748f99bd20e": { "comment": "Implementation: Smart contract to manage schemas", "balance": "0", - "code": "0x6080604052600436106100555760003560e01c8063485cc9551461005a5780634f1ef2861461007c57806352d1902d1461008f5780636c5c446c146100b7578063ad3cb1cc146100d7578063bd7fc5eb14610115575b600080fd5b34801561006657600080fd5b5061007a610075366004611113565b610142565b005b61007a61008a366004611264565b610242565b34801561009b57600080fd5b506100a4610261565b6040519081526020015b60405180910390f35b3480156100c357600080fd5b5061007a6100d23660046112c7565b61027e565b3480156100e357600080fd5b50610108604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ae9190611351565b34801561012157600080fd5b50610135610130366004611364565b61058f565b6040516100ae91906113d5565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061018b575080546001600160401b03808416911610155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600180546001600160a01b0386166001600160a01b03199091161790556101f083610985565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61024a6109af565b61025382610a56565b61025d8282610abc565b5050565b600061026b610b79565b5060008051602061225683398151915290565b61028881806114c7565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600292506102cd91508390611514565b9081526040519081900360200190206005015415610309578060405163012f5f2760e11b81526004016103009190611351565b60405180910390fd5b61031660208301836114c7565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600154604051630d8ce14b60e21b81526001600160a01b039091169250633633852c915061037a908490600401611351565b6000604051808303816000875af19250505080156103ba57506040513d6000823e601f3d908101601f191682016040526103b79190810190611a32565b60015b61042e573d8080156103e8576040519150601f19603f3d011682016040523d82523d6000602084013e6103ed565b606091505b506103ff8163186a887560e11b610bc2565b1561041f5781604051634c92543b60e01b81526004016103009190611351565b61042881610bf2565b50505050565b6020810151516001600160a01b031633146104745760208101515160405163e69c46a360e01b81523360048201526001600160a01b039091166024820152604401610300565b8060200151606001511561049d57816040516350943b5760e11b81526004016103009190611351565b6104ae6104a985611cec565b610bfe565b6104bf6104ba85611cec565b610cac565b6104d06104cb85611cec565b610d03565b6104e16104dc85611cec565b610d4b565b8360026104ee82806114c7565b6040516104fc929190611dbb565b908152604051908190036020019020610515828261203f565b50429050600261052586806114c7565b604051610533929190611dbb565b90815260405190819003602001902060050155337f095272b2e2f5b1254b8cfabe2eac56bd6965cf00c76a1dec8f308a940629cfda61057286806114c7565b604051610580929190612178565b60405180910390a2505b505050565b6105976110a1565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600292506105de91508390611514565b90815260405190819003602001902060050154600003610613578060405163272a91e160e21b81526004016103009190611351565b60028484604051610625929190611dbb565b9081526040805191829003602001822060e0830182528054909183919082019083908290829061065490611dcb565b80601f016020809104026020016040519081016040528092919081815260200182805461068090611dcb565b80156106cd5780601f106106a2576101008083540402835291602001916106cd565b820191906000526020600020905b8154815290600101906020018083116106b057829003601f168201915b505050505081526020016001820180546106e690611dcb565b80601f016020809104026020016040519081016040528092919081815260200182805461071290611dcb565b801561075f5780601f106107345761010080835404028352916020019161075f565b820191906000526020600020905b81548152906001019060200180831161074257829003601f168201915b5050505050815260200160028201805461077890611dcb565b80601f01602080910402602001604051908101604052809291908181526020018280546107a490611dcb565b80156107f15780601f106107c6576101008083540402835291602001916107f1565b820191906000526020600020905b8154815290600101906020018083116107d457829003601f168201915b5050505050815260200160038201805461080a90611dcb565b80601f016020809104026020016040519081016040528092919081815260200182805461083690611dcb565b80156108835780601f1061085857610100808354040283529160200191610883565b820191906000526020600020905b81548152906001019060200180831161086657829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561095d5783829060005260206000200180546108d090611dcb565b80601f01602080910402602001604051908101604052809291908181526020018280546108fc90611dcb565b80156109495780601f1061091e57610100808354040283529160200191610949565b820191906000526020600020905b81548152906001019060200180831161092c57829003601f168201915b5050505050815260200190600101906108b1565b5050509152505081526040805160208082019092526005939093015483520152949350505050565b61098d610d8e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610a3657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a2a600080516020612256833981519152546001600160a01b031690565b6001600160a01b031614155b15610a545760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610aa157600080fd5b505afa158015610ab5573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610b16575060408051601f3d908101601f19168201909252610b13918101906121a7565b60015b610b3e57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610300565b6000805160206122568339815191528114610b6f57604051632a87526960e21b815260048101829052602401610300565b61058a8383610dd7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a545760405163703e46dd60e11b815260040160405180910390fd5b60008083806020019051810190610bd991906121c0565b6001600160e01b03198481169116149150505b92915050565b60208101815182018082fd5b60208082015160408051808201825260158152742f616e6f6e63726564732f76302f534348454d412f60581b81850152818501518251808401845260018152602f60f81b8187015260608701519351600096610c5c969591016121ea565b6040516020818303038152906040529050610c8c610c7d8360000151610e2d565b610c8683610e2d565b90610e38565b61025d57815160405163ba33fe2160e01b81526103009190600401611351565b610cc9610cbc8260400151610e2d565b6001600160801b03161590565b15610d0057604051634efdf97760e01b8152600401610300906020808252600490820152636e616d6560e01b604082015260600190565b50565b610d13610cbc8260600151610e2d565b15610d0057604051634efdf97760e01b81526020600482015260076024820152663b32b939b4b7b760c91b6044820152606401610300565b806080015151600003610d0057604051634efdf97760e01b815260206004820152600a6024820152696174747269627574657360b01b6044820152606401610300565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610a5457604051631afcd79f60e31b815260040160405180910390fd5b610de082610e4b565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e255761058a8282610eb0565b61025d610f26565b6000610bec82610f45565b6000610e448383610f59565b9392505050565b806001600160a01b03163b600003610e8157604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610300565b60008051602061225683398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610ecd9190611514565b600060405180830381855af49150503d8060008114610f08576040519150601f19603f3d011682016040523d82523d6000602084013e610f0d565b606091505b5091509150610f1d858383610fa3565b95945050505050565b3415610a545760405163b398979f60e01b815260040160405180910390fd5b600080602083019050610e44818451610fff565b60006001600160801b038381169083168114610f79576000915050610bec565b610f9b610f868560801c90565b610f908560801c90565b839081902091201490565b949350505050565b606082610fb857610fb38261100b565b610e44565b8151158015610fcf57506001600160a01b0384163b155b15610ff857604051639996b31560e01b81526001600160a01b0385166004820152602401610300565b5092915050565b6000610e448383611034565b80511561101b5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610e44838360006001600160801b038311156110655760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b0382111561108d57604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b60405180604001604052806110de6040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b81526020016110f96040518060200160405280600081525090565b905290565b6001600160a01b0381168114610d0057600080fd5b6000806040838503121561112657600080fd5b8235611131816110fe565b91506020830135611141816110fe565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156111845761118461114c565b60405290565b604080519081016001600160401b03811182821017156111845761118461114c565b60405161016081016001600160401b03811182821017156111845761118461114c565b604051601f8201601f191681016001600160401b03811182821017156111f7576111f761114c565b604052919050565b60006001600160401b038211156112185761121861114c565b50601f01601f191660200190565b6000611239611234846111ff565b6111cf565b905082815283838301111561124d57600080fd5b828260208301376000602084830101529392505050565b6000806040838503121561127757600080fd5b8235611282816110fe565b915060208301356001600160401b0381111561129d57600080fd5b8301601f810185136112ae57600080fd5b6112bd85823560208401611226565b9150509250929050565b6000602082840312156112d957600080fd5b81356001600160401b038111156112ef57600080fd5b820160a08185031215610e4457600080fd5b60005b8381101561131c578181015183820152602001611304565b50506000910152565b6000815180845261133d816020860160208601611301565b601f01601f19169290920160200192915050565b602081526000610e446020830184611325565b6000806020838503121561137757600080fd5b82356001600160401b038082111561138e57600080fd5b818501915085601f8301126113a257600080fd5b8135818111156113b157600080fd5b8660208285010111156113c357600080fd5b60209290920196919550909350505050565b600060208083528351604082850152805160a060608601526113fb610100860182611325565b905082820151605f19808784030160808801526114188383611325565b925060408401519150808784030160a08801526114358383611325565b925060608401519150808784030160c08801526114528383611325565b6080949094015187850390910160e088015280518085529085019392508483019150600581901b8301850160005b828110156114ae57601f1985830301845261149c828751611325565b95870195938701939150600101611480565b5094880151805160408901529498975050505050505050565b6000808335601e198436030181126114de57600080fd5b8301803591506001600160401b038211156114f857600080fd5b60200191503681900382131561150d57600080fd5b9250929050565b60008251611526818460208701611301565b9190910192915050565b60006001600160401b038211156115495761154961114c565b5060051b60200190565b600082601f83011261156457600080fd5b8151611572611234826111ff565b81815284602083860101111561158757600080fd5b610f9b826020830160208701611301565b600082601f8301126115a957600080fd5b815160206115b961123483611530565b82815260059290921b840181019181810190868411156115d857600080fd5b8286015b848110156116175780516001600160401b038111156115fb5760008081fd5b6116098986838b0101611553565b8452509183019183016115dc565b509695505050505050565b600060a0828403121561163457600080fd5b61163c611162565b905081516001600160401b038082111561165557600080fd5b61166185838601611553565b8352602084015191508082111561167757600080fd5b61168385838601611553565b6020840152604084015191508082111561169c57600080fd5b6116a885838601611553565b604084015260608401519150808211156116c157600080fd5b6116cd85838601611553565b606084015260808401519150808211156116e657600080fd5b506116f384828501611553565b60808301525092915050565b600082601f83011261171057600080fd5b8151602061172061123483611530565b82815260059290921b8401810191818101908684111561173f57600080fd5b8286015b848110156116175780516001600160401b038111156117625760008081fd5b6117708986838b0101611622565b845250918301918301611743565b600082601f83011261178f57600080fd5b8151602061179f61123483611530565b82815260059290921b840181019181810190868411156117be57600080fd5b8286015b848110156116175780516001600160401b03808211156117e25760008081fd5b908801906040828b03601f19018113156117fc5760008081fd5b61180461118a565b87840151838111156118165760008081fd5b6118248d8a83880101611553565b82525090830151908282111561183a5760008081fd5b6118488c8984870101611622565b8189015286525050509183019183016117c2565b600082601f83011261186d57600080fd5b8151602061187d61123483611530565b82815260059290921b8401810191818101908684111561189c57600080fd5b8286015b848110156116175780516001600160401b03808211156118c05760008081fd5b9088019060a0828b03601f19018113156118da5760008081fd5b6118e2611162565b87840151838111156118f45760008081fd5b6119028d8a83880101611553565b825250604080850151848111156119195760008081fd5b6119278e8b83890101611553565b8a84015250606080860151858111156119405760008081fd5b61194e8f8c838a0101611553565b83850152506080915081860151858111156119695760008081fd5b6119778f8c838a0101611598565b828501525050828501519250838311156119915760008081fd5b61199f8d8a85880101611598565b9082015286525050509183019183016118a0565b6000608082840312156119c557600080fd5b604051608081018181106001600160401b03821117156119e7576119e761114c565b806040525080915082516119fa816110fe565b80825250602083015160208201526040830151604082015260608301518015158114611a2557600080fd5b6060919091015292915050565b600060208284031215611a4457600080fd5b81516001600160401b0380821115611a5b57600080fd5b9083019060a08286031215611a6f57600080fd5b611a7761118a565b825182811115611a8657600080fd5b83016101608188031215611a9957600080fd5b611aa16111ac565b815184811115611ab057600080fd5b611abc89828501611598565b825250602082015184811115611ad157600080fd5b611add89828501611553565b602083015250604082015184811115611af557600080fd5b611b0189828501611598565b604083015250606082015184811115611b1957600080fd5b611b25898285016116ff565b606083015250608082015184811115611b3d57600080fd5b611b498982850161177e565b60808301525060a082015184811115611b6157600080fd5b611b6d8982850161177e565b60a08301525060c082015184811115611b8557600080fd5b611b918982850161177e565b60c08301525060e082015184811115611ba957600080fd5b611bb58982850161177e565b60e0830152506101008083015185811115611bcf57600080fd5b611bdb8a82860161177e565b8284015250506101208083015185811115611bf557600080fd5b611c018a82860161185c565b8284015250506101408083015185811115611c1b57600080fd5b611c278a828601611598565b8284015250508083525050611c3f86602085016119b3565b602082015295945050505050565b600082601f830112611c5e57600080fd5b610e4483833560208501611226565b600082601f830112611c7e57600080fd5b81356020611c8e61123483611530565b82815260059290921b84018101918181019086841115611cad57600080fd5b8286015b848110156116175780356001600160401b03811115611cd05760008081fd5b611cde8986838b0101611c4d565b845250918301918301611cb1565b600060a08236031215611cfe57600080fd5b611d06611162565b82356001600160401b0380821115611d1d57600080fd5b611d2936838701611c4d565b83526020850135915080821115611d3f57600080fd5b611d4b36838701611c4d565b60208401526040850135915080821115611d6457600080fd5b611d7036838701611c4d565b60408401526060850135915080821115611d8957600080fd5b611d9536838701611c4d565b60608401526080850135915080821115611dae57600080fd5b506116f336828601611c6d565b8183823760009101908152919050565b600181811c90821680611ddf57607f821691505b602082108103611dff57634e487b7160e01b600052602260045260246000fd5b50919050565b5b8181101561025d5760008155600101611e06565b601f82111561058a57806000526020600020601f840160051c81016020851015611e415750805b610ab5601f850160051c830182611e05565b6001600160401b03831115611e6a57611e6a61114c565b611e7e83611e788354611dcb565b83611e1a565b6000601f841160018114611eb25760008515611e9a5750838201355b600019600387901b1c1916600186901b178355610ab5565b600083815260209020601f19861690835b82811015611ee35786850135825560209485019460019092019101611ec3565b5086821015611f005760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e19843603018112611f2957600080fd5b8301803591506001600160401b03821115611f4357600080fd5b6020019150600581901b360382131561150d57600080fd5b600160401b831115611f6f57611f6f61114c565b805483825580841015611ff8576000828152602081208581019083015b80821015611ff457611f9e8254611dcb565b8015611fe857601f80821160018114611fb957858555611fe5565b600085815260209020611fd683850160051c820160018301611e05565b50600085815260208120818755555b50505b50600182019150611f8c565b5050505b5060008181526020812083915b858110156120375761201783866114c7565b612022818386611e53565b50506020929092019160019182019101612005565b505050505050565b61204982836114c7565b6001600160401b038111156120605761206061114c565b6120748161206e8554611dcb565b85611e1a565b6000601f8211600181146120a857600083156120905750838201355b600019600385901b1c1916600184901b178555612102565b600085815260209020601f19841690835b828110156120d957868501358255602094850194600190920191016120b9565b50848210156120f65760001960f88660031b161c19848701351681555b505060018360011b0185555b5050505061211360208301836114c7565b612121818360018601611e53565b505061213060408301836114c7565b61213e818360028601611e53565b505061214d60608301836114c7565b61215b818360038601611e53565b505061216a6080830183611f12565b610428818360048601611f5b565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000602082840312156121b957600080fd5b5051919050565b6000602082840312156121d257600080fd5b81516001600160e01b031981168114610e4457600080fd5b600086516121fc818460208b01611301565b865190830190612210818360208b01611301565b8651910190612223818360208a01611301565b8551910190612236818360208901611301565b8451910190612249818360208801611301565b0197965050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204cdf93e122883f39939010b3dabd6094502f061f87d3cbba4b53321adc394de064736f6c63430008150033" + "code": "0x6080604052600436106100555760003560e01c8063485cc9551461005a5780634f1ef2861461007c57806352d1902d1461008f5780636c5c446c146100b7578063ad3cb1cc146100d7578063bd7fc5eb14610115575b600080fd5b34801561006657600080fd5b5061007a61007536600461113a565b610142565b005b61007a61008a366004611238565b610240565b34801561009b57600080fd5b506100a461025f565b6040519081526020015b60405180910390f35b3480156100c357600080fd5b5061007a6100d236600461129b565b61027c565b3480156100e357600080fd5b50610108604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ae9190611325565b34801561012157600080fd5b50610135610130366004611338565b6105ab565b6040516100ae91906113a9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061018b575080546001600160401b03808416911610155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556101d3846109a1565b600180546001600160a01b0319166001600160a01b038516179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6102486109cb565b61025182610a72565b61025b8282610ad8565b5050565b6000610269610b9a565b50600080516020611bac83398151915290565b610286818061149c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600292506102cb915083906114e9565b9081526040519081900360200190206005015415610307578060405163012f5f2760e11b81526004016102fe9190611325565b60405180910390fd5b610314602083018361149c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001546040516366874f2560e01b81526001600160a01b0390911692506366874f259150610378908490600401611325565b608060405180830381865afa9250505080156103b1575060408051601f3d908101601f191682019092526103ae91810190611505565b60015b610456573d8080156103df576040519150601f19603f3d011682016040523d82523d6000602084013e6103e4565b606091505b506103f68163186a887560e11b610be3565b156104165781604051634c92543b60e01b81526004016102fe9190611325565b61042781631859e3bb60e11b610be3565b15610447578160405163046cb69560e21b81526004016102fe9190611325565b61045081610c13565b506104bb565b80516001600160a01b0316331461049457805160405163e69c46a360e01b81523360048201526001600160a01b0390911660248201526044016102fe565b8060600151156104b957816040516350943b5760e11b81526004016102fe9190611325565b505b6104cc6104c784611630565b610c1f565b6104dd6104d884611630565b610cbd565b6104ee6104e984611630565b610d04565b6104ff6104fa84611630565b610d49565b82600261050c828061149c565b60405161051a92919061170b565b908152604051908190036020019020610533828261198f565b504290506002610543858061149c565b60405161055192919061170b565b90815260405190819003602001902060050155337f095272b2e2f5b1254b8cfabe2eac56bd6965cf00c76a1dec8f308a940629cfda610590858061149c565b60405161059e929190611ace565b60405180910390a2505050565b6105b36110c8565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600292506105fa915083906114e9565b9081526040519081900360200190206005015460000361062f578060405163272a91e160e21b81526004016102fe9190611325565b6002848460405161064192919061170b565b9081526040805191829003602001822060e083018252805490918391908201908390829082906106709061171b565b80601f016020809104026020016040519081016040528092919081815260200182805461069c9061171b565b80156106e95780601f106106be576101008083540402835291602001916106e9565b820191906000526020600020905b8154815290600101906020018083116106cc57829003601f168201915b505050505081526020016001820180546107029061171b565b80601f016020809104026020016040519081016040528092919081815260200182805461072e9061171b565b801561077b5780601f106107505761010080835404028352916020019161077b565b820191906000526020600020905b81548152906001019060200180831161075e57829003601f168201915b505050505081526020016002820180546107949061171b565b80601f01602080910402602001604051908101604052809291908181526020018280546107c09061171b565b801561080d5780601f106107e25761010080835404028352916020019161080d565b820191906000526020600020905b8154815290600101906020018083116107f057829003601f168201915b505050505081526020016003820180546108269061171b565b80601f01602080910402602001604051908101604052809291908181526020018280546108529061171b565b801561089f5780601f106108745761010080835404028352916020019161089f565b820191906000526020600020905b81548152906001019060200180831161088257829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156109795783829060005260206000200180546108ec9061171b565b80601f01602080910402602001604051908101604052809291908181526020018280546109189061171b565b80156109655780601f1061093a57610100808354040283529160200191610965565b820191906000526020600020905b81548152906001019060200180831161094857829003601f168201915b5050505050815260200190600101906108cd565b5050509152505081526040805160208082019092526005939093015483520152949350505050565b6109a9610d8c565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610a5257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a46600080516020611bac833981519152546001600160a01b031690565b6001600160a01b031614155b15610a705760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610abd57600080fd5b505afa158015610ad1573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610b32575060408051601f3d908101601f19168201909252610b2f91810190611afd565b60015b610b5a57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016102fe565b600080516020611bac8339815191528114610b8b57604051632a87526960e21b8152600481018290526024016102fe565b610b958383610dd5565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a705760405163703e46dd60e11b815260040160405180910390fd5b60008083806020019051810190610bfa9190611b16565b6001600160e01b03198481169116149150505b92915050565b60208101815182018082fd5b60208082015160408051808201825260158152742f616e6f6e63726564732f76302f534348454d412f60581b81850152818501518251808401845260018152602f60f81b8187015260608701519351600096610c7d96959101611b40565b60408051601f198184030181529190528251909150610c9d908290610e2b565b61025b57815160405163ba33fe2160e01b81526102fe9190600401611325565b610cca8160400151610e4f565b15610d0157604051634efdf97760e01b81526004016102fe906020808252600490820152636e616d6560e01b604082015260600190565b50565b610d118160600151610e4f565b15610d0157604051634efdf97760e01b81526020600482015260076024820152663b32b939b4b7b760c91b60448201526064016102fe565b806080015151600003610d0157604051634efdf97760e01b815260206004820152600a6024820152696174747269627574657360b01b60448201526064016102fe565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610a7057604051631afcd79f60e31b815260040160405180910390fd5b610dde82610e60565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e2357610b958282610ec5565b61025b610f3b565b6000610e48610e3983610f5a565b610e4285610f5a565b90610f65565b9392505050565b6000610e59825190565b1592915050565b806001600160a01b03163b600003610e9657604051634c9c8ce360e01b81526001600160a01b03821660048201526024016102fe565b600080516020611bac83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610ee291906114e9565b600060405180830381855af49150503d8060008114610f1d576040519150601f19603f3d011682016040523d82523d6000602084013e610f22565b606091505b5091509150610f32858383610f71565b95945050505050565b3415610a705760405163b398979f60e01b815260040160405180910390fd5b6000610c0d82610fcd565b6000610e488383610fe1565b606082610f8657610f818261102b565b610e48565b8151158015610f9d57506001600160a01b0384163b155b15610fc657604051639996b31560e01b81526001600160a01b03851660048201526024016102fe565b5092915050565b600080602083019050610e48818451611054565b60006001600160801b038381169083168114611001576000915050610c0d565b61102361100e8560801c90565b6110188560801c90565b839081902091201490565b949350505050565b80511561103b5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610e4883836000610e48838360006001600160801b0383111561108c5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b038211156110b457604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b60405180604001604052806111056040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b81526020016111206040518060200160405280600081525090565b905290565b6001600160a01b0381168114610d0157600080fd5b6000806040838503121561114d57600080fd5b823561115881611125565b9150602083013561116881611125565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156111ab576111ab611173565b60405290565b604051601f8201601f191681016001600160401b03811182821017156111d9576111d9611173565b604052919050565b60006001600160401b038311156111fa576111fa611173565b61120d601f8401601f19166020016111b1565b905082815283838301111561122157600080fd5b828260208301376000602084830101529392505050565b6000806040838503121561124b57600080fd5b823561125681611125565b915060208301356001600160401b0381111561127157600080fd5b8301601f8101851361128257600080fd5b611291858235602084016111e1565b9150509250929050565b6000602082840312156112ad57600080fd5b81356001600160401b038111156112c357600080fd5b820160a08185031215610e4857600080fd5b60005b838110156112f05781810151838201526020016112d8565b50506000910152565b600081518084526113118160208601602086016112d5565b601f01601f19169290920160200192915050565b602081526000610e4860208301846112f9565b6000806020838503121561134b57600080fd5b82356001600160401b038082111561136257600080fd5b818501915085601f83011261137657600080fd5b81358181111561138557600080fd5b86602082850101111561139757600080fd5b60209290920196919550909350505050565b600060208083528351604082850152805160a060608601526113cf6101008601826112f9565b905082820151605f19808784030160808801526113ec83836112f9565b925060408401519150808784030160a088015261140983836112f9565b925060608401519150808784030160c088015261142683836112f9565b6080949094015187850390910160e088015280518085529085019392508483019150600581901b8301850160005b8281101561148257601f198583030184526114708287516112f9565b95870195938701939150600101611454565b509488015180516040890152945b98975050505050505050565b6000808335601e198436030181126114b357600080fd5b8301803591506001600160401b038211156114cd57600080fd5b6020019150368190038213156114e257600080fd5b9250929050565b600082516114fb8184602087016112d5565b9190910192915050565b60006080828403121561151757600080fd5b604051608081018181106001600160401b038211171561153957611539611173565b604052825161154781611125565b8082525060208301516020820152604083015160408201526060830151801515811461157257600080fd5b60608201529392505050565b600082601f83011261158f57600080fd5b610e48838335602085016111e1565b600082601f8301126115af57600080fd5b813560206001600160401b03808311156115cb576115cb611173565b8260051b6115da8382016111b1565b93845285810183019383810190888611156115f457600080fd5b84880192505b85831015611490578235848111156116125760008081fd5b6116208a87838c010161157e565b83525091840191908401906115fa565b600060a0823603121561164257600080fd5b61164a611189565b82356001600160401b038082111561166157600080fd5b61166d3683870161157e565b8352602085013591508082111561168357600080fd5b61168f3683870161157e565b602084015260408501359150808211156116a857600080fd5b6116b43683870161157e565b604084015260608501359150808211156116cd57600080fd5b6116d93683870161157e565b606084015260808501359150808211156116f257600080fd5b506116ff3682860161159e565b60808301525092915050565b8183823760009101908152919050565b600181811c9082168061172f57607f821691505b60208210810361174f57634e487b7160e01b600052602260045260246000fd5b50919050565b5b8181101561025b5760008155600101611756565b601f821115610b9557806000526020600020601f840160051c810160208510156117915750805b610ad1601f850160051c830182611755565b6001600160401b038311156117ba576117ba611173565b6117ce836117c8835461171b565b8361176a565b6000601f84116001811461180257600085156117ea5750838201355b600019600387901b1c1916600186901b178355610ad1565b600083815260209020601f19861690835b828110156118335786850135825560209485019460019092019101611813565b50868210156118505760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e1984360301811261187957600080fd5b8301803591506001600160401b0382111561189357600080fd5b6020019150600581901b36038213156114e257600080fd5b600160401b8311156118bf576118bf611173565b805483825580841015611948576000828152602081208581019083015b80821015611944576118ee825461171b565b801561193857601f8082116001811461190957858555611935565b60008581526020902061192683850160051c820160018301611755565b50600085815260208120818755555b50505b506001820191506118dc565b5050505b5060008181526020812083915b8581101561198757611967838661149c565b6119728183866117a3565b50506020929092019160019182019101611955565b505050505050565b611999828361149c565b6001600160401b038111156119b0576119b0611173565b6119c4816119be855461171b565b8561176a565b6000601f8211600181146119f857600083156119e05750838201355b600019600385901b1c1916600184901b178555611a52565b600085815260209020601f19841690835b82811015611a295786850135825560209485019460019092019101611a09565b5084821015611a465760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050611a63602083018361149c565b611a718183600186016117a3565b5050611a80604083018361149c565b611a8e8183600286016117a3565b5050611a9d606083018361149c565b611aab8183600386016117a3565b5050611aba6080830183611862565b611ac88183600486016118ab565b50505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060208284031215611b0f57600080fd5b5051919050565b600060208284031215611b2857600080fd5b81516001600160e01b031981168114610e4857600080fd5b60008651611b52818460208b016112d5565b865190830190611b66818360208b016112d5565b8651910190611b79818360208a016112d5565b8551910190611b8c8183602089016112d5565b8451910190611b9f8183602088016112d5565b0197965050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220aa760663a3308dc2d5422b414119e3a91eb41aa2852f431be23ac91671322a0664736f6c63430008140033" }, "0x0000000000000000000000000000000000004444": { "comment": "Proxy: Smart contract to manage credential definitions", "balance": "0", - "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea264697066735822122021a4e888b9c1db781305504c1fe4d900ea72bacfd972be843c095665e340c1f864736f6c63430008150033", + "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea2646970667358221220b318f7afb60b67fd3dc094cf8eb9b397007adb9376e4f3638cab05cadefc21ab64736f6c63430008140033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", - "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000003333", + "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000005555", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000c76d7e87c6ebe19e4788e55e4b5fa23e2d1e570d" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000ab1d436a6f97f7a0b08ceb700dae0903ee6f314b" } }, - "0xc76d7e87c6ebe19e4788e55e4b5fa23e2d1e570d": { + "0xab1d436a6f97f7a0b08ceb700dae0903ee6f314b": { "comment": "Implementation: Smart contract to manage credential definitions", "balance": "0", - "code": "0x6080604052600436106100555760003560e01c80634f1ef2861461005a57806352d1902d1461006f5780636170c48a146100975780639c35941a146100c4578063ad3cb1cc146100e4578063c0c53b8b14610122575b600080fd5b61006d6100683660046112ca565b610142565b005b34801561007b57600080fd5b50610084610161565b6040519081526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b236600461132d565b61017e565b60405161008e91906113ee565b3480156100d057600080fd5b5061006d6100df3660046114c6565b6105cb565b3480156100f057600080fd5b50610115604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008e9190611500565b34801561012e57600080fd5b5061006d61013d366004611513565b61097c565b61014a610a90565b61015382610b37565b61015d8282610b9d565b5050565b600061016b610c5f565b5060008051602061229183398151915290565b610186611117565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600392506101cd9150839061155e565b9081526040519081900360200190206006015460000361020b57806040516305c96b5360e01b81526004016102029190611500565b60405180910390fd5b6003848460405161021d92919061157a565b90815260408051918290036020018220610100830182528054909183919082019083908290829061024d9061158a565b80601f01602080910402602001604051908101604052809291908181526020018280546102799061158a565b80156102c65780601f1061029b576101008083540402835291602001916102c6565b820191906000526020600020905b8154815290600101906020018083116102a957829003601f168201915b505050505081526020016001820180546102df9061158a565b80601f016020809104026020016040519081016040528092919081815260200182805461030b9061158a565b80156103585780601f1061032d57610100808354040283529160200191610358565b820191906000526020600020905b81548152906001019060200180831161033b57829003601f168201915b505050505081526020016002820180546103719061158a565b80601f016020809104026020016040519081016040528092919081815260200182805461039d9061158a565b80156103ea5780601f106103bf576101008083540402835291602001916103ea565b820191906000526020600020905b8154815290600101906020018083116103cd57829003601f168201915b505050505081526020016003820180546104039061158a565b80601f016020809104026020016040519081016040528092919081815260200182805461042f9061158a565b801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b505050505081526020016004820180546104959061158a565b80601f01602080910402602001604051908101604052809291908181526020018280546104c19061158a565b801561050e5780601f106104e35761010080835404028352916020019161050e565b820191906000526020600020905b8154815290600101906020018083116104f157829003601f168201915b505050505081526020016005820180546105279061158a565b80601f01602080910402602001604051908101604052809291908181526020018280546105539061158a565b80156105a05780601f10610575576101008083540402835291602001916105a0565b820191906000526020600020905b81548152906001019060200180831161058357829003601f168201915b5050509190925250505081526040805160208082019092526006939093015483520152949350505050565b6105d581806115c4565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516003925061061a9150839061155e565b908152604051908190036020019020600601541561064d57806040516341d617b960e01b81526004016102029190611500565b61065a60408301836115c4565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060025460405163bd7fc5eb60e01b81526001600160a01b03909116925063bd7fc5eb91506106be908490600401611500565b6000604051808303816000875af11580156106dd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107059190810190611744565b5061071360208401846115c4565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600154604051630d8ce14b60e21b81526001600160a01b039091169250633633852c9150610777908490600401611500565b6000604051808303816000875af19250505080156107b757506040513d6000823e601f3d908101601f191682016040526107b49190810190611c8e565b60015b61082b573d8080156107e5576040519150601f19603f3d011682016040523d82523d6000602084013e6107ea565b606091505b506107fc8163186a887560e11b610ca8565b1561081c5781604051634c92543b60e01b81526004016102029190611500565b61082581610cd8565b50610976565b6020810151516001600160a01b031633146108715760208101515160405163e69c46a360e01b81523360048201526001600160a01b039091166024820152604401610202565b8060200151606001511561089a57816040516350943b5760e11b81526004016102029190611500565b6108ab6108a686611ebb565b610ce4565b6108bc6108b786611ebb565b610d43565b6108cd6108c886611ebb565b610d94565b8460036108da82806115c4565b6040516108e892919061157a565b90815260405190819003602001902061090182826120c8565b50429050600361091187806115c4565b60405161091f92919061157a565b90815260405190819003602001902060060155337f67a8d5704b8f46127dbda538dafb9c9529e5b4b7a7e92f22c08b212eb703512961095e87806115c4565b60405161096c92919061221e565b60405180910390a2505b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806109c5575080546001600160401b03808416911610155b156109e35760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600180546001600160a01b038088166001600160a01b0319928316179092556002805492871692909116919091179055610a3d83610dda565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610b1757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b0b600080516020612291833981519152546001600160a01b031690565b6001600160a01b031614155b15610b355760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610b8257600080fd5b505afa158015610b96573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610bf7575060408051601f3d908101601f19168201909252610bf49181019061224d565b60015b610c1f57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610202565b6000805160206122918339815191528114610c5057604051632a87526960e21b815260048101829052602401610202565b610c5a8383610e04565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b355760405163703e46dd60e11b815260040160405180910390fd5b60008083806020019051810190610cbf9190612266565b6001600160e01b03198481169116149150505b92915050565b60208101815182018082fd5b610d1d610d0a6040518060400160405280600281526020016110d360f21b815250610e5a565b610d178360600151610e5a565b90610e65565b610d40578060600151604051634e047ab160e11b81526004016102029190611500565b50565b610d60610d538260800151610e5a565b6001600160801b03161590565b15610d4057604051634efdf97760e01b815260206004820152600360248201526274616760e81b6044820152606401610202565b610da4610d538260a00151610e5a565b15610d4057604051634efdf97760e01b815260206004820152600560248201526476616c756560d81b6044820152606401610202565b610de2610e78565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610e0d82610ec1565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e5257610c5a8282610f26565b61015d610f9c565b6000610cd282610fbb565b6000610e718383610fcf565b9392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b3557604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610ef757604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610202565b60008051602061229183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f43919061155e565b600060405180830381855af49150503d8060008114610f7e576040519150601f19603f3d011682016040523d82523d6000602084013e610f83565b606091505b5091509150610f93858383611019565b95945050505050565b3415610b355760405163b398979f60e01b815260040160405180910390fd5b600080602083019050610e71818451611075565b60006001600160801b038381169083168114610fef576000915050610cd2565b611011610ffc8560801c90565b6110068560801c90565b839081902091201490565b949350505050565b60608261102e5761102982611081565b610e71565b815115801561104557506001600160a01b0384163b155b1561106e57604051639996b31560e01b81526001600160a01b0385166004820152602401610202565b5092915050565b6000610e7183836110aa565b8051156110915780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610e71838360006001600160801b038311156110db5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b0382111561110357604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b604051806040016040528061115b6040518060c001604052806060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020016111766040518060200160405280600081525090565b905290565b6001600160a01b0381168114610d4057600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156111c8576111c8611190565b60405290565b60405160a081016001600160401b03811182821017156111c8576111c8611190565b60405161016081016001600160401b03811182821017156111c8576111c8611190565b60405160c081016001600160401b03811182821017156111c8576111c8611190565b604051601f8201601f191681016001600160401b038111828210171561125d5761125d611190565b604052919050565b60006001600160401b0382111561127e5761127e611190565b50601f01601f191660200190565b600061129f61129a84611265565b611235565b90508281528383830111156112b357600080fd5b828260208301376000602084830101529392505050565b600080604083850312156112dd57600080fd5b82356112e88161117b565b915060208301356001600160401b0381111561130357600080fd5b8301601f8101851361131457600080fd5b6113238582356020840161128c565b9150509250929050565b6000806020838503121561134057600080fd5b82356001600160401b038082111561135757600080fd5b818501915085601f83011261136b57600080fd5b81358181111561137a57600080fd5b86602082850101111561138c57600080fd5b60209290920196919550909350505050565b60005b838110156113b95781810151838201526020016113a1565b50506000910152565b600081518084526113da81602086016020860161139e565b601f01601f19169290920160200192915050565b602081526000825160406020840152805160c060608501526114146101208501826113c2565b90506020820151605f198086840301608087015261143283836113c2565b925060408401519150808684030160a087015261144f83836113c2565b925060608401519150808684030160c087015261146c83836113c2565b925060808401519150808684030160e087015261148983836113c2565b925060a08401519350808684030161010087015250506114a981836113c2565b91505060208401516114be6040850182519052565b509392505050565b6000602082840312156114d857600080fd5b81356001600160401b038111156114ee57600080fd5b820160c08185031215610e7157600080fd5b602081526000610e7160208301846113c2565b60008060006060848603121561152857600080fd5b83356115338161117b565b925060208401356115438161117b565b915060408401356115538161117b565b809150509250925092565b6000825161157081846020870161139e565b9190910192915050565b8183823760009101908152919050565b600181811c9082168061159e57607f821691505b6020821081036115be57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e198436030181126115db57600080fd5b8301803591506001600160401b038211156115f557600080fd5b60200191503681900382131561160a57600080fd5b9250929050565b600082601f83011261162257600080fd5b815161163061129a82611265565b81815284602083860101111561164557600080fd5b61101182602083016020870161139e565b60006001600160401b0382111561166f5761166f611190565b5060051b60200190565b600082601f83011261168a57600080fd5b8151602061169a61129a83611656565b82815260059290921b840181019181810190868411156116b957600080fd5b8286015b848110156116f85780516001600160401b038111156116dc5760008081fd5b6116ea8986838b0101611611565b8452509183019183016116bd565b509695505050505050565b60006020828403121561171557600080fd5b604051602081018181106001600160401b038211171561173757611737611190565b6040529151825250919050565b60006020828403121561175657600080fd5b81516001600160401b038082111561176d57600080fd5b908301906040828603121561178157600080fd5b6117896111a6565b82518281111561179857600080fd5b830160a081880312156117aa57600080fd5b6117b26111ce565b8151848111156117c157600080fd5b6117cd89828501611611565b8252506020820151848111156117e257600080fd5b6117ee89828501611611565b60208301525060408201518481111561180657600080fd5b61181289828501611611565b60408301525060608201518481111561182a57600080fd5b61183689828501611611565b60608301525060808201518481111561184e57600080fd5b61185a89828501611679565b6080830152508252506118708660208501611703565b602082015295945050505050565b600060a0828403121561189057600080fd5b6118986111ce565b905081516001600160401b03808211156118b157600080fd5b6118bd85838601611611565b835260208401519150808211156118d357600080fd5b6118df85838601611611565b602084015260408401519150808211156118f857600080fd5b61190485838601611611565b6040840152606084015191508082111561191d57600080fd5b61192985838601611611565b6060840152608084015191508082111561194257600080fd5b5061194f84828501611611565b60808301525092915050565b600082601f83011261196c57600080fd5b8151602061197c61129a83611656565b82815260059290921b8401810191818101908684111561199b57600080fd5b8286015b848110156116f85780516001600160401b038111156119be5760008081fd5b6119cc8986838b010161187e565b84525091830191830161199f565b600082601f8301126119eb57600080fd5b815160206119fb61129a83611656565b82815260059290921b84018101918181019086841115611a1a57600080fd5b8286015b848110156116f85780516001600160401b0380821115611a3e5760008081fd5b908801906040828b03601f1901811315611a585760008081fd5b611a606111a6565b8784015183811115611a725760008081fd5b611a808d8a83880101611611565b825250908301519082821115611a965760008081fd5b611aa48c898487010161187e565b818901528652505050918301918301611a1e565b600082601f830112611ac957600080fd5b81516020611ad961129a83611656565b82815260059290921b84018101918181019086841115611af857600080fd5b8286015b848110156116f85780516001600160401b0380821115611b1c5760008081fd5b9088019060a0828b03601f1901811315611b365760008081fd5b611b3e6111ce565b8784015183811115611b505760008081fd5b611b5e8d8a83880101611611565b82525060408085015184811115611b755760008081fd5b611b838e8b83890101611611565b8a8401525060608086015185811115611b9c5760008081fd5b611baa8f8c838a0101611611565b8385015250608091508186015185811115611bc55760008081fd5b611bd38f8c838a0101611679565b82850152505082850151925083831115611bed5760008081fd5b611bfb8d8a85880101611679565b908201528652505050918301918301611afc565b600060808284031215611c2157600080fd5b604051608081018181106001600160401b0382111715611c4357611c43611190565b80604052508091508251611c568161117b565b80825250602083015160208201526040830151604082015260608301518015158114611c8157600080fd5b6060919091015292915050565b600060208284031215611ca057600080fd5b81516001600160401b0380821115611cb757600080fd5b9083019060a08286031215611ccb57600080fd5b611cd36111a6565b825182811115611ce257600080fd5b83016101608188031215611cf557600080fd5b611cfd6111f0565b815184811115611d0c57600080fd5b611d1889828501611679565b825250602082015184811115611d2d57600080fd5b611d3989828501611611565b602083015250604082015184811115611d5157600080fd5b611d5d89828501611679565b604083015250606082015184811115611d7557600080fd5b611d818982850161195b565b606083015250608082015184811115611d9957600080fd5b611da5898285016119da565b60808301525060a082015184811115611dbd57600080fd5b611dc9898285016119da565b60a08301525060c082015184811115611de157600080fd5b611ded898285016119da565b60c08301525060e082015184811115611e0557600080fd5b611e11898285016119da565b60e0830152506101008083015185811115611e2b57600080fd5b611e378a8286016119da565b8284015250506101208083015185811115611e5157600080fd5b611e5d8a828601611ab8565b8284015250506101408083015185811115611e7757600080fd5b611e838a828601611679565b82840152505080835250506118708660208501611c0f565b600082601f830112611eac57600080fd5b610e718383356020850161128c565b600060c08236031215611ecd57600080fd5b611ed5611213565b82356001600160401b0380821115611eec57600080fd5b611ef836838701611e9b565b83526020850135915080821115611f0e57600080fd5b611f1a36838701611e9b565b60208401526040850135915080821115611f3357600080fd5b611f3f36838701611e9b565b60408401526060850135915080821115611f5857600080fd5b611f6436838701611e9b565b60608401526080850135915080821115611f7d57600080fd5b611f8936838701611e9b565b608084015260a0850135915080821115611fa257600080fd5b50611faf36828601611e9b565b60a08301525092915050565b601f821115610c5a57600081815260208120601f850160051c81016020861015611fe25750805b601f850160051c820191505b8181101561200157828155600101611fee565b505050505050565b6001600160401b0383111561202057612020611190565b6120348361202e835461158a565b83611fbb565b6000601f84116001811461206857600085156120505750838201355b600019600387901b1c1916600186901b178355610b96565b600083815260209020601f19861690835b828110156120995786850135825560209485019460019092019101612079565b50868210156120b65760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6120d282836115c4565b6001600160401b038111156120e9576120e9611190565b6120fd816120f7855461158a565b85611fbb565b6000601f82116001811461213157600083156121195750838201355b600019600385901b1c1916600184901b17855561218b565b600085815260209020601f19841690835b828110156121625786850135825560209485019460019092019101612142565b508482101561217f5760001960f88660031b161c19848701351681555b505060018360011b0185555b5050505061219c60208301836115c4565b6121aa818360018601612009565b50506121b960408301836115c4565b6121c7818360028601612009565b50506121d660608301836115c4565b6121e4818360038601612009565b50506121f360808301836115c4565b612201818360048601612009565b505061221060a08301836115c4565b610976818360058601612009565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006020828403121561225f57600080fd5b5051919050565b60006020828403121561227857600080fd5b81516001600160e01b031981168114610e7157600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c52467272a7eb27b5d6cff71c72a0ce6279547ae4733101cfa2d77f1f2e3b1d064736f6c63430008150033" + "code": "0x6080604052600436106100555760003560e01c80634f1ef2861461005a57806352d1902d1461006f5780636170c48a146100975780639c35941a146100c4578063ad3cb1cc146100e4578063c0c53b8b14610122575b600080fd5b61006d6100683660046112c9565b610142565b005b34801561007b57600080fd5b50610084610161565b6040519081526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b236600461132c565b61017e565b60405161008e91906113ed565b3480156100d057600080fd5b5061006d6100df3660046114c5565b6105cb565b3480156100f057600080fd5b50610115604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008e91906114ff565b34801561012e57600080fd5b5061006d61013d366004611512565b61099a565b61014a610aae565b61015382610b55565b61015d8282610bbb565b5050565b600061016b610c7d565b50600080516020611ce383398151915290565b610186611139565b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051600392506101cd9150839061155d565b9081526040519081900360200190206006015460000361020b57806040516305c96b5360e01b815260040161020291906114ff565b60405180910390fd5b6003848460405161021d929190611579565b90815260408051918290036020018220610100830182528054909183919082019083908290829061024d90611589565b80601f016020809104026020016040519081016040528092919081815260200182805461027990611589565b80156102c65780601f1061029b576101008083540402835291602001916102c6565b820191906000526020600020905b8154815290600101906020018083116102a957829003601f168201915b505050505081526020016001820180546102df90611589565b80601f016020809104026020016040519081016040528092919081815260200182805461030b90611589565b80156103585780601f1061032d57610100808354040283529160200191610358565b820191906000526020600020905b81548152906001019060200180831161033b57829003601f168201915b5050505050815260200160028201805461037190611589565b80601f016020809104026020016040519081016040528092919081815260200182805461039d90611589565b80156103ea5780601f106103bf576101008083540402835291602001916103ea565b820191906000526020600020905b8154815290600101906020018083116103cd57829003601f168201915b5050505050815260200160038201805461040390611589565b80601f016020809104026020016040519081016040528092919081815260200182805461042f90611589565b801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b5050505050815260200160048201805461049590611589565b80601f01602080910402602001604051908101604052809291908181526020018280546104c190611589565b801561050e5780601f106104e35761010080835404028352916020019161050e565b820191906000526020600020905b8154815290600101906020018083116104f157829003601f168201915b5050505050815260200160058201805461052790611589565b80601f016020809104026020016040519081016040528092919081815260200182805461055390611589565b80156105a05780601f10610575576101008083540402835291602001916105a0565b820191906000526020600020905b81548152906001019060200180831161058357829003601f168201915b5050509190925250505081526040805160208082019092526006939093015483520152949350505050565b6105d581806115c3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516003925061061a9150839061155d565b908152604051908190036020019020600601541561064d57806040516341d617b960e01b815260040161020291906114ff565b61065a60408301836115c3565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060025460405163bd7fc5eb60e01b81526001600160a01b03909116925063bd7fc5eb91506106be9084906004016114ff565b6000604051808303816000875af11580156106dd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107059190810190611734565b5061071360208401846115c3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001546040516366874f2560e01b81526001600160a01b0390911692506366874f2591506107779084906004016114ff565b608060405180830381865afa9250505080156107b0575060408051601f3d908101601f191682019092526107ad9181019061186e565b60015b610855573d8080156107de576040519150601f19603f3d011682016040523d82523d6000602084013e6107e3565b606091505b506107f58163186a887560e11b610cc6565b156108155781604051634c92543b60e01b815260040161020291906114ff565b61082681631859e3bb60e11b610cc6565b15610846578160405163046cb69560e21b815260040161020291906114ff565b61084f81610cf6565b506108ba565b80516001600160a01b0316331461089357805160405163e69c46a360e01b81523360048201526001600160a01b039091166024820152604401610202565b8060600151156108b857816040516350943b5760e11b815260040161020291906114ff565b505b6108cb6108c685611907565b610d02565b6108dc6108d785611907565b610d4f565b6108ed6108e885611907565b610d90565b8360036108fa82806115c3565b604051610908929190611579565b9081526040519081900360200190206109218282611b14565b50429050600361093186806115c3565b60405161093f929190611579565b90815260405190819003602001902060060155337f67a8d5704b8f46127dbda538dafb9c9529e5b4b7a7e92f22c08b212eb703512961097e86806115c3565b60405161098c929190611c70565b60405180910390a250505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806109e3575080546001600160401b03808416911610155b15610a015760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610a2b85610dd3565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610b3557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b29600080516020611ce3833981519152546001600160a01b031690565b6001600160a01b031614155b15610b535760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610ba057600080fd5b505afa158015610bb4573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610c15575060408051601f3d908101601f19168201909252610c1291810190611c9f565b60015b610c3d57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610202565b600080516020611ce38339815191528114610c6e57604051632a87526960e21b815260048101829052602401610202565b610c788383610dfd565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b535760405163703e46dd60e11b815260040160405180910390fd5b60008083806020019051810190610cdd9190611cb8565b6001600160e01b03198481169116149150505b92915050565b60208101815182018082fd5b60408051808201909152600281526110d360f21b60208201526060820151610d2991610e53565b610d4c578060600151604051634e047ab160e11b815260040161020291906114ff565b50565b610d5c8160800151610e77565b15610d4c57604051634efdf97760e01b815260206004820152600360248201526274616760e81b6044820152606401610202565b610d9d8160a00151610e77565b15610d4c57604051634efdf97760e01b815260206004820152600560248201526476616c756560d81b6044820152606401610202565b610ddb610e88565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610e0682610ed1565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e4b57610c788282610f36565b61015d610fac565b6000610e70610e6183610fcb565b610e6a85610fcb565b90610fd6565b9392505050565b6000610e81825190565b1592915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b5357604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610f0757604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610202565b600080516020611ce383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f53919061155d565b600060405180830381855af49150503d8060008114610f8e576040519150601f19603f3d011682016040523d82523d6000602084013e610f93565b606091505b5091509150610fa3858383610fe2565b95945050505050565b3415610b535760405163b398979f60e01b815260040160405180910390fd5b6000610cf08261103e565b6000610e708383611052565b606082610ff757610ff28261109c565b610e70565b815115801561100e57506001600160a01b0384163b155b1561103757604051639996b31560e01b81526001600160a01b0385166004820152602401610202565b5092915050565b600080602083019050610e708184516110c5565b60006001600160801b038381169083168114611072576000915050610cf0565b61109461107f8560801c90565b6110898560801c90565b839081902091201490565b949350505050565b8051156110ac5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610e7083836000610e70838360006001600160801b038311156110fd5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b0382111561112557604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b604051806040016040528061117d6040518060c001604052806060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020016111986040518060200160405280600081525090565b905290565b6001600160a01b0381168114610d4c57600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156111ea576111ea6111b2565b60405290565b60405160a081016001600160401b03811182821017156111ea576111ea6111b2565b60405160c081016001600160401b03811182821017156111ea576111ea6111b2565b604051601f8201601f191681016001600160401b038111828210171561125c5761125c6111b2565b604052919050565b60006001600160401b0382111561127d5761127d6111b2565b50601f01601f191660200190565b600061129e61129984611264565b611234565b90508281528383830111156112b257600080fd5b828260208301376000602084830101529392505050565b600080604083850312156112dc57600080fd5b82356112e78161119d565b915060208301356001600160401b0381111561130257600080fd5b8301601f8101851361131357600080fd5b6113228582356020840161128b565b9150509250929050565b6000806020838503121561133f57600080fd5b82356001600160401b038082111561135657600080fd5b818501915085601f83011261136a57600080fd5b81358181111561137957600080fd5b86602082850101111561138b57600080fd5b60209290920196919550909350505050565b60005b838110156113b85781810151838201526020016113a0565b50506000910152565b600081518084526113d981602086016020860161139d565b601f01601f19169290920160200192915050565b602081526000825160406020840152805160c060608501526114136101208501826113c1565b90506020820151605f198086840301608087015261143183836113c1565b925060408401519150808684030160a087015261144e83836113c1565b925060608401519150808684030160c087015261146b83836113c1565b925060808401519150808684030160e087015261148883836113c1565b925060a08401519350808684030161010087015250506114a881836113c1565b91505060208401516114bd6040850182519052565b509392505050565b6000602082840312156114d757600080fd5b81356001600160401b038111156114ed57600080fd5b820160c08185031215610e7057600080fd5b602081526000610e7060208301846113c1565b60008060006060848603121561152757600080fd5b83356115328161119d565b925060208401356115428161119d565b915060408401356115528161119d565b809150509250925092565b6000825161156f81846020870161139d565b9190910192915050565b8183823760009101908152919050565b600181811c9082168061159d57607f821691505b6020821081036115bd57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e198436030181126115da57600080fd5b8301803591506001600160401b038211156115f457600080fd5b60200191503681900382131561160957600080fd5b9250929050565b600082601f83011261162157600080fd5b815161162f61129982611264565b81815284602083860101111561164457600080fd5b61109482602083016020870161139d565b600082601f83011261166657600080fd5b815160206001600160401b0380831115611682576116826111b2565b8260051b611691838201611234565b93845285810183019383810190888611156116ab57600080fd5b84880192505b858310156116e7578251848111156116c95760008081fd5b6116d78a87838c0101611610565b83525091840191908401906116b1565b98975050505050505050565b60006020828403121561170557600080fd5b604051602081018181106001600160401b0382111715611727576117276111b2565b6040529151825250919050565b60006020828403121561174657600080fd5b81516001600160401b038082111561175d57600080fd5b908301906040828603121561177157600080fd5b6117796111c8565b82518281111561178857600080fd5b830160a0818803121561179a57600080fd5b6117a26111f0565b8151848111156117b157600080fd5b6117bd89828501611610565b8252506020820151848111156117d257600080fd5b6117de89828501611610565b6020830152506040820151848111156117f657600080fd5b61180289828501611610565b60408301525060608201518481111561181a57600080fd5b61182689828501611610565b60608301525060808201518481111561183e57600080fd5b61184a89828501611655565b60808301525082525061186086602085016116f3565b602082015295945050505050565b60006080828403121561188057600080fd5b604051608081018181106001600160401b03821117156118a2576118a26111b2565b60405282516118b08161119d565b808252506020830151602082015260408301516040820152606083015180151581146118db57600080fd5b60608201529392505050565b600082601f8301126118f857600080fd5b610e708383356020850161128b565b600060c0823603121561191957600080fd5b611921611212565b82356001600160401b038082111561193857600080fd5b611944368387016118e7565b8352602085013591508082111561195a57600080fd5b611966368387016118e7565b6020840152604085013591508082111561197f57600080fd5b61198b368387016118e7565b604084015260608501359150808211156119a457600080fd5b6119b0368387016118e7565b606084015260808501359150808211156119c957600080fd5b6119d5368387016118e7565b608084015260a08501359150808211156119ee57600080fd5b506119fb368286016118e7565b60a08301525092915050565b601f821115610c7857600081815260208120601f850160051c81016020861015611a2e5750805b601f850160051c820191505b81811015611a4d57828155600101611a3a565b505050505050565b6001600160401b03831115611a6c57611a6c6111b2565b611a8083611a7a8354611589565b83611a07565b6000601f841160018114611ab45760008515611a9c5750838201355b600019600387901b1c1916600186901b178355610bb4565b600083815260209020601f19861690835b82811015611ae55786850135825560209485019460019092019101611ac5565b5086821015611b025760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b611b1e82836115c3565b6001600160401b03811115611b3557611b356111b2565b611b4981611b438554611589565b85611a07565b6000601f821160018114611b7d5760008315611b655750838201355b600019600385901b1c1916600184901b178555611bd7565b600085815260209020601f19841690835b82811015611bae5786850135825560209485019460019092019101611b8e565b5084821015611bcb5760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050611be860208301836115c3565b611bf6818360018601611a55565b5050611c0560408301836115c3565b611c13818360028601611a55565b5050611c2260608301836115c3565b611c30818360038601611a55565b5050611c3f60808301836115c3565b611c4d818360048601611a55565b5050611c5c60a08301836115c3565b611c6a818360058601611a55565b50505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060208284031215611cb157600080fd5b5051919050565b600060208284031215611cca57600080fd5b81516001600160e01b031981168114610e7057600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f28d0351a4158dfc541e6eacc07b157555521bc25787027125f2fae703bd7c7964736f6c63430008140033" } } } diff --git a/indy-besu/smart_contracts/contracts-ts/CredentialDefinitionRegistry.ts b/indy-besu/smart_contracts/contracts-ts/CredentialDefinitionRegistry.ts index 5a848bb08..100bb3456 100644 --- a/indy-besu/smart_contracts/contracts-ts/CredentialDefinitionRegistry.ts +++ b/indy-besu/smart_contracts/contracts-ts/CredentialDefinitionRegistry.ts @@ -1,11 +1,5 @@ -import { - CredentialDefinitionStruct, - CredentialDefinitionWithMetadataStruct, -} from '../typechain-types/contracts/cl/CredentialDefinitionRegistryInterface' import { Contract } from '../utils/contract' - -export type CredentialDefinition = CredentialDefinitionStruct -export type CredentialDefinitionWithMetadata = CredentialDefinitionWithMetadataStruct +import { CredentialDefinition, CredentialDefinitionWithMetadata, mapCredentialDefinitionWithMetadata } from './types' export class CredentialDefinitionRegistry extends Contract { public static readonly defaultAddress = '0x0000000000000000000000000000000000004444' @@ -21,18 +15,6 @@ export class CredentialDefinitionRegistry extends Contract { public async resolveCredentialDefinition(id: string): Promise { const result = await this.instance.resolveCredentialDefinition(id) - return { - credDef: { - id: result.credDef.id, - issuerId: result.credDef.issuerId, - schemaId: result.credDef.schemaId, - credDefType: result.credDef.credDefType, - tag: result.credDef.tag, - value: result.credDef.value, - }, - metadata: { - created: result.metadata.created, - }, - } + return mapCredentialDefinitionWithMetadata(result) } } diff --git a/indy-besu/smart_contracts/contracts-ts/DidRegistry.ts b/indy-besu/smart_contracts/contracts-ts/DidRegistry.ts deleted file mode 100644 index aef3a4528..000000000 --- a/indy-besu/smart_contracts/contracts-ts/DidRegistry.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { - DidDocumentStorageStruct, - DidDocumentStruct, - ServiceStruct, - VerificationMethodStruct, - VerificationRelationshipStruct, -} from '../typechain-types/contracts/did/DidRegistry' -import { Contract } from '../utils/contract' - -export type DidDocumentStorage = DidDocumentStorageStruct -export type DidDocument = DidDocumentStruct -export type VerificationMethod = VerificationMethodStruct -export type VerificationRelationship = VerificationRelationshipStruct -export type Service = ServiceStruct - -export class DidRegistry extends Contract { - public static readonly defaultAddress = '0x0000000000000000000000000000000000003333' - - constructor(sender?: any) { - super(DidRegistry.name, sender) - } - - public async createDid(didDocument: DidDocument) { - const tx = await this.instance.createDid(didDocument) - return tx.wait() - } - - public async updateDid(didDocument: DidDocument) { - const tx = await this.instance.updateDid(didDocument) - return tx.wait() - } - - public async deactivateDid(id: string) { - const tx = await this.instance.deactivateDid(id) - return tx.wait() - } - - public async resolveDid(id: string): Promise { - const didDocumentStorage = await this.instance.resolveDid(id) - return { - document: { - context: didDocumentStorage.document.context.map((context: string) => context), - id: didDocumentStorage.document.id, - controller: didDocumentStorage.document.controller, - verificationMethod: didDocumentStorage.document.verificationMethod.map( - (verificationMethod: VerificationMethod) => DidRegistry.mapVerificationMethod(verificationMethod), - ), - authentication: didDocumentStorage.document.authentication.map((relationship: VerificationRelationship) => - DidRegistry.mapVerificationRelationship(relationship), - ), - assertionMethod: didDocumentStorage.document.assertionMethod.map((relationship: VerificationRelationship) => - DidRegistry.mapVerificationRelationship(relationship), - ), - capabilityInvocation: didDocumentStorage.document.capabilityInvocation.map( - (relationship: VerificationRelationship) => DidRegistry.mapVerificationRelationship(relationship), - ), - capabilityDelegation: didDocumentStorage.document.capabilityDelegation.map( - (relationship: VerificationRelationship) => DidRegistry.mapVerificationRelationship(relationship), - ), - keyAgreement: didDocumentStorage.document.keyAgreement.map((relationship: VerificationRelationship) => - DidRegistry.mapVerificationRelationship(relationship), - ), - service: didDocumentStorage.document.service.map((relationship: Service) => - DidRegistry.mapService(relationship), - ), - alsoKnownAs: didDocumentStorage.document.alsoKnownAs.map((alsoKnownAs: string) => alsoKnownAs), - }, - metadata: { - creator: didDocumentStorage.metadata.creator, - created: didDocumentStorage.metadata.created, - updated: didDocumentStorage.metadata.updated, - deactivated: didDocumentStorage.metadata.deactivated, - }, - } as DidDocumentStorage - } - - private static mapVerificationMethod(verificationMethod: VerificationMethod): VerificationMethod { - return { - id: verificationMethod.id, - verificationMethodType: verificationMethod.verificationMethodType, - controller: verificationMethod.controller, - publicKeyJwk: verificationMethod.publicKeyJwk, - publicKeyMultibase: verificationMethod.publicKeyMultibase, - } - } - - private static mapVerificationRelationship(relationship: VerificationRelationship): VerificationRelationship { - return { - id: relationship.id, - verificationMethod: DidRegistry.mapVerificationMethod(relationship.verificationMethod), - } - } - - private static mapService(service: Service): Service { - return { - id: service.id, - serviceType: service.serviceType, - serviceEndpoint: service.serviceEndpoint, - accept: service.accept.map((accept: string) => accept), - routingKeys: service.routingKeys.map((routingKey: string) => routingKey), - } - } -} diff --git a/indy-besu/smart_contracts/contracts-ts/EthereumDIDRegistry.ts b/indy-besu/smart_contracts/contracts-ts/EthereumDIDRegistry.ts new file mode 100644 index 000000000..ea36fe43e --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/EthereumDIDRegistry.ts @@ -0,0 +1,98 @@ +import { Contract } from '../utils/contract' + +export class EthereumDIDRegistry extends Contract { + public static readonly defaultAddress = '0x0000000000000000000000000000000000018888' + + constructor(sender?: any) { + super(EthereumDIDRegistry.name, sender) + } + + public async identityOwner(identity: string): Promise { + return await this.instance.identityOwner(identity) + } + + public async changeOwner(identity: string, newOwner: string) { + const tx = await this.instance.changeOwner(identity, newOwner) + return tx.wait() + } + + public async validDelegate(identity: string, delegateType: string, delegate: string): Promise { + return await this.instance.validDelegate(identity, delegateType, delegate) + } + + public async addDelegate(identity: string, delegateType: string, delegate: string, validity: number) { + const tx = await this.instance.addDelegate(identity, delegateType, delegate, validity) + return tx.wait() + } + + public async revokeDelegate(identity: string, delegateType: string, delegate: string) { + const tx = await this.instance.revokeDelegate(identity, delegateType, delegate) + return tx.wait() + } + + public async setAttribute(identity: string, name: string, value: Uint8Array, validity: number) { + const tx = await this.instance.setAttribute(identity, name, value, validity) + return tx.wait() + } + + public async revokeAttribute(identity: string, name: string, value: Uint8Array) { + const tx = await this.instance.revokeAttribute(identity, name, value) + return tx.wait() + } + + // Methods that require signatures + public async changeOwnerSigned(identity: string, sigV: number, sigR: string, sigS: string, newOwner: string) { + const tx = await this.instance.changeOwnerSigned(identity, sigV, sigR, sigS, newOwner) + return tx.wait() + } + + public async addDelegateSigned( + identity: string, + sigV: number, + sigR: string, + sigS: string, + delegateType: string, + delegate: string, + validity: number, + ) { + const tx = await this.instance.addDelegateSigned(identity, sigV, sigR, sigS, delegateType, delegate, validity) + return tx.wait() + } + + public async revokeDelegateSigned( + identity: string, + sigV: number, + sigR: string, + sigS: string, + delegateType: string, + delegate: string, + ) { + const tx = await this.instance.revokeDelegateSigned(identity, sigV, sigR, sigS, delegateType, delegate) + return tx.wait() + } + + public async setAttributeSigned( + identity: string, + sigV: number, + sigR: string, + sigS: string, + name: string, + value: Uint8Array, + validity: number, + ) { + const tx = await this.instance.setAttributeSigned(identity, sigV, sigR, sigS, name, value, validity) + return tx.wait() + } + + public async revokeAttributeSigned( + identity: string, + sigV: number, + sigR: string, + sigS: string, + name: string, + value: Uint8Array, + ) { + const tx = await this.instance.revokeAttributeSigned(identity, sigV, sigR, sigS, name, value) + return tx.wait() + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/IndyDidRegistry.ts b/indy-besu/smart_contracts/contracts-ts/IndyDidRegistry.ts new file mode 100644 index 000000000..9c98e1d81 --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/IndyDidRegistry.ts @@ -0,0 +1,33 @@ +import { Contract } from '../utils/contract' +import { DidDocument, DidDocumentStorage, mapDidDocument, mapDidMetadata } from './types' + +export class IndyDidRegistry extends Contract { + public static readonly defaultAddress = '0x0000000000000000000000000000000000003333' + + constructor(sender?: any) { + super(IndyDidRegistry.name, sender) + } + + public async createDid(didDocument: DidDocument) { + const tx = await this.instance.createDid(didDocument) + return tx.wait() + } + + public async updateDid(didDocument: DidDocument) { + const tx = await this.instance.updateDid(didDocument) + return tx.wait() + } + + public async deactivateDid(id: string) { + const tx = await this.instance.deactivateDid(id) + return tx.wait() + } + + public async resolveDid(id: string): Promise { + const didDocumentStorage = await this.instance.resolveDid(id) + return { + document: mapDidDocument(didDocumentStorage.document), + metadata: mapDidMetadata(didDocumentStorage.metadata), + } + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/SchemaRegistry.ts b/indy-besu/smart_contracts/contracts-ts/SchemaRegistry.ts index 5efd31122..cd513e52f 100644 --- a/indy-besu/smart_contracts/contracts-ts/SchemaRegistry.ts +++ b/indy-besu/smart_contracts/contracts-ts/SchemaRegistry.ts @@ -1,8 +1,5 @@ -import { SchemaStruct, SchemaWithMetadataStruct } from '../typechain-types/contracts/cl/SchemaRegistryInterface' import { Contract } from '../utils/contract' - -export type Schema = SchemaStruct -export type SchemaWithMetadata = SchemaWithMetadataStruct +import { mapSchemaWithMetadata, Schema, SchemaWithMetadata } from './types' export class SchemaRegistry extends Contract { public static readonly defaultAddress = '0x0000000000000000000000000000000000005555' @@ -16,19 +13,8 @@ export class SchemaRegistry extends Contract { return tx.wait() } - public async resolveSchema(id: string): Promise { + public async resolveSchema(id: string): Promise { const result = await this.instance.resolveSchema(id) - return { - schema: { - id: result.schema.id, - issuerId: result.schema.issuerId, - name: result.schema.name, - version: result.schema.version, - attrNames: result.schema.attrNames, - }, - metadata: { - created: result.metadata.created, - }, - } + return mapSchemaWithMetadata(result) } } diff --git a/indy-besu/smart_contracts/contracts-ts/UniversalDidReolver.ts b/indy-besu/smart_contracts/contracts-ts/UniversalDidReolver.ts new file mode 100644 index 000000000..9025b0d44 --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/UniversalDidReolver.ts @@ -0,0 +1,20 @@ +import { Contract } from '../utils' +import { DidDocument, DidMetadata, mapDidDocument, mapDidMetadata } from './types' + +export class UniversalDidResolver extends Contract { + public static readonly defaultAddress = '0x000000000000000000000000000000000019999' + + constructor(sender?: any) { + super(UniversalDidResolver.name, sender) + } + + public async resolveDocument(id: string): Promise { + const document = await this.instance.resolveDocument(id) + return mapDidDocument(document) + } + + public async resolveMetadata(id: string): Promise { + const metadata = await this.instance.resolveMetadata(id) + return mapDidMetadata(metadata) + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/index.ts b/indy-besu/smart_contracts/contracts-ts/index.ts index a9bb27884..e322b9bfb 100644 --- a/indy-besu/smart_contracts/contracts-ts/index.ts +++ b/indy-besu/smart_contracts/contracts-ts/index.ts @@ -1,7 +1,10 @@ export * from './AccountControl' export * from './CredentialDefinitionRegistry' -export * from './DidRegistry' +export * from './IndyDidRegistry' +export * from './EthereumDIDRegistry' export * from './RoleControl' export * from './SchemaRegistry' +export * from './UniversalDidReolver' export * from './UpgradeControl' export * from './ValidatorControl' +export * from './types' diff --git a/indy-besu/smart_contracts/contracts-ts/types/CredentialDefinition.ts b/indy-besu/smart_contracts/contracts-ts/types/CredentialDefinition.ts new file mode 100644 index 000000000..834407605 --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/types/CredentialDefinition.ts @@ -0,0 +1,23 @@ +import { + CredentialDefinitionStruct, + CredentialDefinitionWithMetadataStruct, +} from '../../typechain-types/contracts/cl/CredentialDefinitionRegistryInterface' + +export type CredentialDefinition = CredentialDefinitionStruct +export type CredentialDefinitionWithMetadata = CredentialDefinitionWithMetadataStruct + +export function mapCredentialDefinitionWithMetadata(data: CredentialDefinitionWithMetadata) { + return { + credDef: { + id: data.credDef.id, + issuerId: data.credDef.issuerId, + schemaId: data.credDef.schemaId, + credDefType: data.credDef.credDefType, + tag: data.credDef.tag, + value: data.credDef.value, + }, + metadata: { + created: data.metadata.created, + }, + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/types/Did.ts b/indy-besu/smart_contracts/contracts-ts/types/Did.ts new file mode 100644 index 000000000..4b60b40e8 --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/types/Did.ts @@ -0,0 +1,79 @@ +import { + DidDocumentStorageStruct, + DidDocumentStruct, + DidMetadataStruct, + ServiceStruct, + VerificationMethodStruct, + VerificationRelationshipStruct, +} from '../../typechain-types/contracts/did/DidRegistry' + +export type DidDocumentStorage = DidDocumentStorageStruct +export type DidMetadata = DidMetadataStruct +export type DidDocument = DidDocumentStruct +export type VerificationMethod = VerificationMethodStruct +export type VerificationRelationship = VerificationRelationshipStruct +export type Service = ServiceStruct + +export function mapDidDocument(document: DidDocument) { + return { + context: document.context.map((context: string) => context), + id: document.id, + controller: document.controller, + verificationMethod: document.verificationMethod.map((verificationMethod: VerificationMethod) => + mapVerificationMethod(verificationMethod), + ), + authentication: document.authentication.map((relationship: VerificationRelationship) => + mapVerificationRelationship(relationship), + ), + assertionMethod: document.assertionMethod.map((relationship: VerificationRelationship) => + mapVerificationRelationship(relationship), + ), + capabilityInvocation: document.capabilityInvocation.map((relationship: VerificationRelationship) => + mapVerificationRelationship(relationship), + ), + capabilityDelegation: document.capabilityDelegation.map((relationship: VerificationRelationship) => + mapVerificationRelationship(relationship), + ), + keyAgreement: document.keyAgreement.map((relationship: VerificationRelationship) => + mapVerificationRelationship(relationship), + ), + service: document.service.map((relationship: Service) => mapService(relationship)), + alsoKnownAs: document.alsoKnownAs.map((alsoKnownAs: string) => alsoKnownAs), + } +} + +export function mapDidMetadata(metadata: DidMetadata) { + return { + creator: metadata.creator, + created: metadata.created, + updated: metadata.updated, + deactivated: metadata.deactivated, + } +} + +export function mapVerificationMethod(verificationMethod: VerificationMethod): VerificationMethod { + return { + id: verificationMethod.id, + verificationMethodType: verificationMethod.verificationMethodType, + controller: verificationMethod.controller, + publicKeyJwk: verificationMethod.publicKeyJwk, + publicKeyMultibase: verificationMethod.publicKeyMultibase, + } +} + +export function mapVerificationRelationship(relationship: VerificationRelationship): VerificationRelationship { + return { + id: relationship.id, + verificationMethod: mapVerificationMethod(relationship.verificationMethod), + } +} + +export function mapService(service: Service): Service { + return { + id: service.id, + serviceType: service.serviceType, + serviceEndpoint: service.serviceEndpoint, + accept: service.accept.map((accept: string) => accept), + routingKeys: service.routingKeys.map((routingKey: string) => routingKey), + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/types/Schema.ts b/indy-besu/smart_contracts/contracts-ts/types/Schema.ts new file mode 100644 index 000000000..4f4603072 --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/types/Schema.ts @@ -0,0 +1,19 @@ +import { SchemaStruct, SchemaWithMetadataStruct } from '../../typechain-types/contracts/cl/SchemaRegistryInterface' + +export type Schema = SchemaStruct +export type SchemaWithMetadata = SchemaWithMetadataStruct + +export function mapSchemaWithMetadata(data: SchemaWithMetadata) { + return { + schema: { + id: data.schema.id, + issuerId: data.schema.issuerId, + name: data.schema.name, + version: data.schema.version, + attrNames: data.schema.attrNames, + }, + metadata: { + created: data.metadata.created, + }, + } +} diff --git a/indy-besu/smart_contracts/contracts-ts/types/index.ts b/indy-besu/smart_contracts/contracts-ts/types/index.ts new file mode 100644 index 000000000..c44ef121e --- /dev/null +++ b/indy-besu/smart_contracts/contracts-ts/types/index.ts @@ -0,0 +1,3 @@ +export * from './Did' +export * from './CredentialDefinition' +export * from './Schema' diff --git a/indy-besu/smart_contracts/contracts/cl/CLRegistry.sol b/indy-besu/smart_contracts/contracts/cl/CLRegistry.sol index e15b14a2a..747c606bc 100644 --- a/indy-besu/smart_contracts/contracts/cl/CLRegistry.sol +++ b/indy-besu/smart_contracts/contracts/cl/CLRegistry.sol @@ -1,50 +1,34 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { DidNotFound } from "../did/DidErrors.sol"; -import { DidRegistryInterface } from "../did/DidRegistry.sol"; -import { DidDocumentStorage } from "../did/DidTypes.sol"; -import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; +import { DidNotFound, IncorrectDid } from "../did/DidErrors.sol"; +import { DidMetadata } from "../did/DidTypes.sol"; +import { UniversalDidResolverInterface } from "../did/UniversalDidResolverInterface.sol"; import { Errors } from "../utils/Errors.sol"; - -import { IssuerHasBeenDeactivated, IssuerNotFound, SchemaAlreadyExist, SchemaNotFound, SenderIsNotIssuerDidOwner } from "./ClErrors.sol"; -import { CLRegistry } from "./CLRegistry.sol"; -import { SchemaRegistryInterface } from "./SchemaRegistryInterface.sol"; -import { Schema, SchemaWithMetadata } from "./SchemaTypes.sol"; -import { SchemaValidator } from "./SchemaValidator.sol"; -import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; - -using SchemaValidator for Schema; -using { toSlice } for string; - -// TODO: Think of adding `DidUniversalResolver` contract so that adding a support for new DID method (like `did:ethr`) -// will require updating version of only `DIDUniversalResolver` contract only. -// CLRegistry registry use `DIDUniversalResolver` to get DID Record and validate as needed -//interface DIDUniversalRegistryResolver { -// function resolveDid() -//} +import { InvalidIssuerId, IssuerHasBeenDeactivated, IssuerNotFound, SenderIsNotIssuerDidOwner } from "./ClErrors.sol"; contract CLRegistry { /** - * @dev Reference to the contract that manages DIDs + * @dev Reference to the contract that resolves DIDs */ - DidRegistryInterface internal _didRegistry; // did:indy2 + UniversalDidResolverInterface internal _didResolver; /** - * Checks that the Issuer DID exist, controlled by sender, and active + * @dev Check that the Issuer DID exist, controlled by sender, and active. + * @param id The Issuer's DID. */ modifier _validIssuer(string memory id) { - try _didRegistry.resolveDid(id) returns (DidDocumentStorage memory didDocumentStorage) { - if (msg.sender != didDocumentStorage.metadata.creator) - revert SenderIsNotIssuerDidOwner(msg.sender, didDocumentStorage.metadata.creator); - if (didDocumentStorage.metadata.deactivated) revert IssuerHasBeenDeactivated(id); - _; - } catch (bytes memory reason) { - if (Errors.equals(reason, DidNotFound.selector)) { - revert IssuerNotFound(id); + try _didResolver.resolveMetadata(id) returns (DidMetadata memory metadata) { + if (msg.sender != metadata.creator) { + revert SenderIsNotIssuerDidOwner(msg.sender, metadata.creator); } + if (metadata.deactivated) revert IssuerHasBeenDeactivated(id); + } catch (bytes memory reason) { + if (Errors.equals(reason, DidNotFound.selector)) revert IssuerNotFound(id); + if (Errors.equals(reason, IncorrectDid.selector)) revert InvalidIssuerId(id); Errors.rethrow(reason); } + _; } } diff --git a/indy-besu/smart_contracts/contracts/cl/ClErrors.sol b/indy-besu/smart_contracts/contracts/cl/ClErrors.sol index 6b13c0945..0940a541c 100644 --- a/indy-besu/smart_contracts/contracts/cl/ClErrors.sol +++ b/indy-besu/smart_contracts/contracts/cl/ClErrors.sol @@ -13,6 +13,12 @@ error FieldRequired(string name); */ error IssuerNotFound(string id); +/** + * @notice Error that occurs when the provided issuer ID is invalid. + * @param id Issuer ID. + */ +error InvalidIssuerId(string id); + /** * @notice Error that occurs when attempting to perform an operation on a deactivated issuer. * @param id Issuer ID. diff --git a/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol b/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol index a13b6cf65..ee2b17137 100644 --- a/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol +++ b/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol @@ -1,22 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { DidNotFound } from "../did/DidErrors.sol"; -import { DidRegistryInterface } from "../did/DidRegistry.sol"; -import { DidDocumentStorage } from "../did/DidTypes.sol"; +import { UniversalDidResolverInterface } from "../did/UniversalDidResolverInterface.sol"; import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; -import { Errors } from "../utils/Errors.sol"; import { CredentialDefinition, CredentialDefinitionWithMetadata } from "./CredentialDefinitionTypes.sol"; import { CredentialDefinitionRegistryInterface } from "./CredentialDefinitionRegistryInterface.sol"; import { CredentialDefinitionValidator } from "./CredentialDefinitionValidator.sol"; -import { CredentialDefinitionAlreadyExist, CredentialDefinitionNotFound, IssuerHasBeenDeactivated, IssuerNotFound, SenderIsNotIssuerDidOwner } from "./ClErrors.sol"; +import { CredentialDefinitionAlreadyExist, CredentialDefinitionNotFound } from "./ClErrors.sol"; import { CLRegistry } from "./CLRegistry.sol"; import { SchemaRegistryInterface } from "./SchemaRegistryInterface.sol"; -import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; using CredentialDefinitionValidator for CredentialDefinition; -using { toSlice } for string; contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface, ControlledUpgradeable, CLRegistry { /** @@ -54,13 +49,13 @@ contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface, } function initialize( - address didRegistryAddress, - address schemaRegistryAddress, - address upgradeControlAddress + address upgradeControlAddress, + address didResolverAddress, + address schemaRegistryAddress ) public reinitializer(1) { - _didRegistry = DidRegistryInterface(didRegistryAddress); - _schemaRegistry = SchemaRegistryInterface(schemaRegistryAddress); _initializeUpgradeControl(upgradeControlAddress); + _didResolver = UniversalDidResolverInterface(didResolverAddress); + _schemaRegistry = SchemaRegistryInterface(schemaRegistryAddress); } /// @inheritdoc CredentialDefinitionRegistryInterface diff --git a/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionValidator.sol b/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionValidator.sol index 28a36711e..38c46897c 100644 --- a/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionValidator.sol +++ b/indy-besu/smart_contracts/contracts/cl/CredentialDefinitionValidator.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; +import { StringUtils } from "../utils/StringUtils.sol"; import { FieldRequired, InvalidCredentialDefinitionId, UnsupportedCredentialDefinitionType } from "./ClErrors.sol"; import { CredentialDefinition } from "./CredentialDefinitionTypes.sol"; -using { toSlice } for string; +using StringUtils for string; library CredentialDefinitionValidator { string private constant _DELIMITER = "/"; @@ -24,14 +24,14 @@ library CredentialDefinitionValidator { self.tag ); - if (!credDefId.toSlice().eq(self.id.toSlice())) revert InvalidCredentialDefinitionId(self.id); + if (!credDefId.equals(self.id)) revert InvalidCredentialDefinitionId(self.id); } /** * @dev Validates the Credential Definition type */ function requireValidType(CredentialDefinition memory self) internal pure { - if (!self.credDefType.toSlice().eq(_ANONCREDS_TYPE.toSlice())) { + if (!self.credDefType.equals(_ANONCREDS_TYPE)) { revert UnsupportedCredentialDefinitionType(self.credDefType); } } @@ -40,13 +40,13 @@ library CredentialDefinitionValidator { * @dev Validates that the Credential Definition tag is provided */ function requireTag(CredentialDefinition memory self) internal pure { - if (self.tag.toSlice().isEmpty()) revert FieldRequired("tag"); + if (self.tag.isEmpty()) revert FieldRequired("tag"); } /** * @dev Validates that the Credential Definition value is provided */ function requireValue(CredentialDefinition memory self) internal pure { - if (self.value.toSlice().isEmpty()) revert FieldRequired("value"); + if (self.value.isEmpty()) revert FieldRequired("value"); } } diff --git a/indy-besu/smart_contracts/contracts/cl/SchemaRegistry.sol b/indy-besu/smart_contracts/contracts/cl/SchemaRegistry.sol index 9e3f3b201..d73c1f642 100644 --- a/indy-besu/smart_contracts/contracts/cl/SchemaRegistry.sol +++ b/indy-besu/smart_contracts/contracts/cl/SchemaRegistry.sol @@ -1,21 +1,16 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { DidNotFound } from "../did/DidErrors.sol"; -import { DidRegistryInterface } from "../did/DidRegistry.sol"; -import { DidDocumentStorage } from "../did/DidTypes.sol"; +import { UniversalDidResolverInterface } from "../did/UniversalDidResolverInterface.sol"; import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; -import { Errors } from "../utils/Errors.sol"; -import { IssuerHasBeenDeactivated, IssuerNotFound, SchemaAlreadyExist, SchemaNotFound, SenderIsNotIssuerDidOwner } from "./ClErrors.sol"; +import { SchemaAlreadyExist, SchemaNotFound } from "./ClErrors.sol"; import { SchemaRegistryInterface } from "./SchemaRegistryInterface.sol"; import { Schema, SchemaWithMetadata } from "./SchemaTypes.sol"; import { SchemaValidator } from "./SchemaValidator.sol"; import { CLRegistry } from "./CLRegistry.sol"; -import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; using SchemaValidator for Schema; -using { toSlice } for string; contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable, CLRegistry { /** @@ -39,9 +34,9 @@ contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable, CLReg _; } - function initialize(address didRegistryAddress, address upgradeControlAddress) public reinitializer(1) { - _didRegistry = DidRegistryInterface(didRegistryAddress); + function initialize(address upgradeControlAddress, address didResolverAddress) public reinitializer(1) { _initializeUpgradeControl(upgradeControlAddress); + _didResolver = UniversalDidResolverInterface(didResolverAddress); } /// @inheritdoc SchemaRegistryInterface diff --git a/indy-besu/smart_contracts/contracts/cl/SchemaValidator.sol b/indy-besu/smart_contracts/contracts/cl/SchemaValidator.sol index 30393525b..5348e97ed 100644 --- a/indy-besu/smart_contracts/contracts/cl/SchemaValidator.sol +++ b/indy-besu/smart_contracts/contracts/cl/SchemaValidator.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; +import { StringUtils } from "../utils/StringUtils.sol"; import { FieldRequired, InvalidSchemaId } from "./ClErrors.sol"; import { Schema } from "./SchemaTypes.sol"; -using { toSlice } for string; +using StringUtils for string; library SchemaValidator { string private constant _DELIMITER = "/"; @@ -23,21 +23,21 @@ library SchemaValidator { self.version ); - if (!schemaId.toSlice().eq(self.id.toSlice())) revert InvalidSchemaId(self.id); + if (!schemaId.equals(self.id)) revert InvalidSchemaId(self.id); } /** * @dev Validates that the Schema name is provided */ function requireName(Schema memory self) internal pure { - if (self.name.toSlice().isEmpty()) revert FieldRequired("name"); + if (self.name.isEmpty()) revert FieldRequired("name"); } /** * @dev Validates that the Schema version is provided */ function requireVersion(Schema memory self) internal pure { - if (self.version.toSlice().isEmpty()) revert FieldRequired("version"); + if (self.version.isEmpty()) revert FieldRequired("version"); } /** diff --git a/indy-besu/smart_contracts/contracts/did/DidRegex.sol b/indy-besu/smart_contracts/contracts/did/DidRegex.sol deleted file mode 100644 index 95020468e..000000000 --- a/indy-besu/smart_contracts/contracts/did/DidRegex.sol +++ /dev/null @@ -1,522 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.20; - -/** - * Generated using https://github.com/gnidan/solregex - */ -library DidRegex { - struct State { - bool accepts; - function (uint8) pure internal returns (State memory) func; - } - - string public constant regex = "did:(indy2|indy|sov):([a-zA-Z0-9]+:)+[1-9A-HJ-NP-Za-km-z]{21,22}"; - - function s0(uint8 c) pure internal returns (State memory) { - // silence unused var warning - c = c; - - return State(false, s0); - } - - function s1(uint8 c) pure internal returns (State memory) { - if (c == 100) { - return State(false, s2); - } - - return State(false, s0); - } - - function s2(uint8 c) pure internal returns (State memory) { - if (c == 105) { - return State(false, s3); - } - - return State(false, s0); - } - - function s3(uint8 c) pure internal returns (State memory) { - if (c == 100) { - return State(false, s4); - } - - return State(false, s0); - } - - function s4(uint8 c) pure internal returns (State memory) { - if (c == 58) { - return State(false, s5); - } - - return State(false, s0); - } - - function s5(uint8 c) pure internal returns (State memory) { - if (c == 105) { - return State(false, s6); - } - if (c == 115) { - return State(false, s7); - } - - return State(false, s0); - } - - function s6(uint8 c) pure internal returns (State memory) { - if (c == 110) { - return State(false, s8); - } - - return State(false, s0); - } - - function s7(uint8 c) pure internal returns (State memory) { - if (c == 111) { - return State(false, s9); - } - - return State(false, s0); - } - - function s8(uint8 c) pure internal returns (State memory) { - if (c == 100) { - return State(false, s10); - } - - return State(false, s0); - } - - function s9(uint8 c) pure internal returns (State memory) { - if (c == 118) { - return State(false, s11); - } - - return State(false, s0); - } - - function s10(uint8 c) pure internal returns (State memory) { - if (c == 121) { - return State(false, s12); - } - - return State(false, s0); - } - - function s11(uint8 c) pure internal returns (State memory) { - if (c == 58) { - return State(false, s13); - } - - return State(false, s0); - } - - function s12(uint8 c) pure internal returns (State memory) { - if (c == 50) { - return State(false, s14); - } - if (c == 58) { - return State(false, s13); - } - - return State(false, s0); - } - - function s13(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s15); - } - - return State(false, s0); - } - - function s14(uint8 c) pure internal returns (State memory) { - if (c == 58) { - return State(false, s13); - } - - return State(false, s0); - } - - function s15(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s16); - } - if (c == 58) { - return State(false, s17); - } - - return State(false, s0); - } - - function s16(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s16); - } - if (c == 58) { - return State(false, s17); - } - - return State(false, s0); - } - - function s17(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s18); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s19); - } - - return State(false, s0); - } - - function s18(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s20); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s19(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s22); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s20(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s20); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s21(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s18); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s19); - } - - return State(false, s0); - } - - function s22(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s23); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s23(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s24); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s24(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s25); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s25(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s26); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s26(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s27); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s27(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s28); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s28(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s29); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s29(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s30); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s30(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s31); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s31(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s32); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s32(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s33); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s33(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s34); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s34(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s35); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s35(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s36); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s36(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s37); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s37(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s38); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s38(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s39); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s39(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(false, s40); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s40(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(true, s41); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s41(uint8 c) pure internal returns (State memory) { - if (c == 48 || c == 73 || c == 79 || c == 108) { - return State(false, s20); - } - if (c >= 49 && c <= 57 || c >= 65 && c <= 72 || c >= 74 && c <= 78 || c >= 80 && c <= 90 || c >= 97 && c <= 107 || c >= 109 && c <= 122) { - return State(true, s42); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function s42(uint8 c) pure internal returns (State memory) { - if (c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { - return State(false, s20); - } - if (c == 58) { - return State(false, s21); - } - - return State(false, s0); - } - - function matches(string memory input) public pure returns (bool) { - State memory cur = State(false, s1); - - for (uint i = 0; i < bytes(input).length; i++) { - uint8 c = uint8(bytes(input)[i]); - - cur = cur.func(c); - } - - return cur.accepts; - } -} diff --git a/indy-besu/smart_contracts/contracts/did/EthereumExtDidRegistry.sol b/indy-besu/smart_contracts/contracts/did/EthereumExtDidRegistry.sol new file mode 100644 index 000000000..777d17330 --- /dev/null +++ b/indy-besu/smart_contracts/contracts/did/EthereumExtDidRegistry.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import { EthereumDIDRegistry as OriginEthereumDIDRegistry } from "ethr-did-registry/contracts/EthereumDIDRegistry.sol"; +import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; + +contract EthereumExtDidRegistry is OriginEthereumDIDRegistry, ControlledUpgradeable { + function initialize(address upgradeControlAddress) public reinitializer(1) { + _initializeUpgradeControl(upgradeControlAddress); + } +} diff --git a/indy-besu/smart_contracts/contracts/did/DidRegistry.sol b/indy-besu/smart_contracts/contracts/did/IndyDidRegistry.sol similarity index 81% rename from indy-besu/smart_contracts/contracts/did/DidRegistry.sol rename to indy-besu/smart_contracts/contracts/did/IndyDidRegistry.sol index 239000390..fc116f7f8 100644 --- a/indy-besu/smart_contracts/contracts/did/DidRegistry.sol +++ b/indy-besu/smart_contracts/contracts/did/IndyDidRegistry.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.20; import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; import { DidAlreadyExist, DidHasBeenDeactivated, DidNotFound, SenderIsNotCreator } from "./DidErrors.sol"; -import { DidRegistryInterface } from "./DidRegistryInterface.sol"; +import { IndyDidRegistryInterface } from "./IndyDidRegistryInterface.sol"; import { DidDocument, DidDocumentStorage } from "./DidTypes.sol"; -import { DidValidator } from "./DidValidator.sol"; +import { IndyDidValidator } from "./IndyDidValidator.sol"; -contract DidRegistry is DidRegistryInterface, ControlledUpgradeable { +contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { /** * @dev Mapping DID to its corresponding DID Document. */ @@ -51,10 +51,10 @@ contract DidRegistry is DidRegistryInterface, ControlledUpgradeable { _initializeUpgradeControl(upgradeControlAddress); } - /// @inheritdoc DidRegistryInterface + /// @inheritdoc IndyDidRegistryInterface function createDid(DidDocument calldata document) public _didNotExist(document.id) { - DidValidator.validateDid(document.id); - DidValidator.validateVerificationKey(document); + IndyDidValidator.validateDid(document.id); + IndyDidValidator.validateVerificationKey(document); _dids[document.id].document = document; _dids[document.id].metadata.creator = msg.sender; @@ -64,11 +64,11 @@ contract DidRegistry is DidRegistryInterface, ControlledUpgradeable { emit DIDCreated(document.id); } - /// @inheritdoc DidRegistryInterface + /// @inheritdoc IndyDidRegistryInterface function updateDid( DidDocument calldata document ) public _didExist(document.id) _didIsActive(document.id) _senderIsCreator(document.id) { - DidValidator.validateVerificationKey(document); + IndyDidValidator.validateVerificationKey(document); _dids[document.id].document = document; _dids[document.id].metadata.updated = block.timestamp; @@ -76,14 +76,14 @@ contract DidRegistry is DidRegistryInterface, ControlledUpgradeable { emit DIDUpdated(document.id); } - /// @inheritdoc DidRegistryInterface + /// @inheritdoc IndyDidRegistryInterface function deactivateDid(string calldata id) public _didExist(id) _didIsActive(id) _senderIsCreator(id) { _dids[id].metadata.deactivated = true; emit DIDDeactivated(id); } - /// @inheritdoc DidRegistryInterface + /// @inheritdoc IndyDidRegistryInterface function resolveDid( string calldata id ) public view virtual _didExist(id) returns (DidDocumentStorage memory didDocumentStorage) { diff --git a/indy-besu/smart_contracts/contracts/did/DidRegistryInterface.sol b/indy-besu/smart_contracts/contracts/did/IndyDidRegistryInterface.sol similarity index 93% rename from indy-besu/smart_contracts/contracts/did/DidRegistryInterface.sol rename to indy-besu/smart_contracts/contracts/did/IndyDidRegistryInterface.sol index a200e2e4d..d4dd01b01 100644 --- a/indy-besu/smart_contracts/contracts/did/DidRegistryInterface.sol +++ b/indy-besu/smart_contracts/contracts/did/IndyDidRegistryInterface.sol @@ -6,7 +6,7 @@ import { DidDocument, DidDocumentStorage } from "./DidTypes.sol"; /** * @dev The interface that defines functions for managing DID documents. */ -interface DidRegistryInterface { +interface IndyDidRegistryInterface { /** * @dev Event that is sent when a DID Document is created. * @param did Created DID. @@ -71,5 +71,5 @@ interface DidRegistryInterface { * @param id The DID to be resolved. * @return didDocumentStorage The resolved DID document associated with provided DID. */ - function resolveDid(string calldata id) external returns (DidDocumentStorage memory didDocumentStorage); + function resolveDid(string calldata id) external view returns (DidDocumentStorage memory didDocumentStorage); } diff --git a/indy-besu/smart_contracts/contracts/did/DidValidator.sol b/indy-besu/smart_contracts/contracts/did/IndyDidValidator.sol similarity index 66% rename from indy-besu/smart_contracts/contracts/did/DidValidator.sol rename to indy-besu/smart_contracts/contracts/did/IndyDidValidator.sol index 7f0ae4e86..91d44297a 100644 --- a/indy-besu/smart_contracts/contracts/did/DidValidator.sol +++ b/indy-besu/smart_contracts/contracts/did/IndyDidValidator.sol @@ -1,20 +1,25 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { StrSlice, toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; +import { StringUtils } from "../utils/StringUtils.sol"; +import { DidUtils, ParsedDid } from "../utils/DidUtils.sol"; import { AuthenticationKeyNotFound, AuthenticationKeyRequired, IncorrectDid } from "./DidErrors.sol"; import { IncorrectDid } from "./DidErrors.sol"; -import { DidRegex } from "./DidRegex.sol"; import { DidDocument, VerificationMethod } from "./DidTypes.sol"; -using { toSlice } for string; +using StringUtils for string; -library DidValidator { +library IndyDidValidator { /** * @dev Validates the DID syntax */ - function validateDid(string memory did) public pure { - if (!DidRegex.matches(did)) revert IncorrectDid(did); + function validateDid(string memory did) public view { + ParsedDid memory parsedDid = DidUtils.parseDid(did); + + if (!DidUtils.isIndyMethod(parsedDid.method)) revert IncorrectDid(did); + + uint256 identifierLength = parsedDid.identifier.length(); + if (identifierLength != 21 && identifierLength != 22) revert IncorrectDid(parsedDid.identifier); } /** @@ -24,7 +29,7 @@ library DidValidator { if (didDocument.authentication.length == 0) revert AuthenticationKeyRequired(didDocument.id); for (uint256 i = 0; i < didDocument.authentication.length; i++) { - if (!didDocument.authentication[i].verificationMethod.id.toSlice().isEmpty()) { + if (!didDocument.authentication[i].verificationMethod.id.isEmpty()) { continue; } @@ -35,10 +40,8 @@ library DidValidator { } function _contains(VerificationMethod[] memory methods, string memory methodId) private pure returns (bool) { - StrSlice methodIdSlice = methodId.toSlice(); - for (uint256 i; i < methods.length; i++) { - if (methods[i].id.toSlice().eq(methodIdSlice)) { + if (methods[i].id.equals(methodId)) { return true; } } diff --git a/indy-besu/smart_contracts/contracts/did/UniversalDidResolver.sol b/indy-besu/smart_contracts/contracts/did/UniversalDidResolver.sol new file mode 100644 index 000000000..e274f42d9 --- /dev/null +++ b/indy-besu/smart_contracts/contracts/did/UniversalDidResolver.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; +import { UnsupportedOperation } from "../utils/Errors.sol"; +import { DidUtils, ParsedDid } from "../utils/DidUtils.sol"; +import { IncorrectDid } from "./DidErrors.sol"; +import { IndyDidRegistryInterface } from "./IndyDidRegistryInterface.sol"; +import { EthereumExtDidRegistry } from "./EthereumExtDidRegistry.sol"; +import { DidDocument, DidMetadata } from "./DidTypes.sol"; +import { UniversalDidResolverInterface } from "./UniversalDidResolverInterface.sol"; + +contract UniversalDidResolver is UniversalDidResolverInterface, ControlledUpgradeable { + IndyDidRegistryInterface internal _indyDidRegistry; + EthereumExtDidRegistry internal _ethereumDIDRegistry; + + function initialize( + address upgradeControlAddress, + address didRegistryddress, + address ethereumDIDRegistryAddress + ) public reinitializer(1) { + _initializeUpgradeControl(upgradeControlAddress); + _indyDidRegistry = IndyDidRegistryInterface(didRegistryddress); + _ethereumDIDRegistry = EthereumExtDidRegistry(ethereumDIDRegistryAddress); + } + + /// @inheritdoc UniversalDidResolverInterface + function resolveDocument(string calldata id) public view override returns (DidDocument memory document) { + ParsedDid memory parsedDid = DidUtils.parseDid(id); + + if (DidUtils.isIndyMethod(parsedDid.method)) { + return _indyDidRegistry.resolveDid(id).document; + } else { + revert UnsupportedOperation( + "UniversalDidResolver.resolveDocument", + string.concat("Unsupported DID Method: '", parsedDid.method, "'") + ); + } + } + + /// @inheritdoc UniversalDidResolverInterface + function resolveMetadata(string calldata id) public view override returns (DidMetadata memory metadata) { + ParsedDid memory parsedDid = DidUtils.parseDid(id); + + if (DidUtils.isEthereumMethod(parsedDid.method)) { + address identity = DidUtils.convertEthereumIdentifierToAddress(parsedDid.identifier); + + if (identity == address(0)) revert IncorrectDid(id); + + address identityOwner = _ethereumDIDRegistry.identityOwner(identity); + return DidMetadata(identityOwner, 0, 0, false); + } else if (DidUtils.isIndyMethod(parsedDid.method)) { + return _indyDidRegistry.resolveDid(id).metadata; + } else { + revert UnsupportedOperation( + "UniversalDidResolver.resolveMetadata", + string.concat("Unsupported DID Method: '", parsedDid.method, "'") + ); + } + } +} diff --git a/indy-besu/smart_contracts/contracts/did/UniversalDidResolverInterface.sol b/indy-besu/smart_contracts/contracts/did/UniversalDidResolverInterface.sol new file mode 100644 index 000000000..bdc59d4c2 --- /dev/null +++ b/indy-besu/smart_contracts/contracts/did/UniversalDidResolverInterface.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import { DidDocument, DidMetadata } from "./DidTypes.sol"; + +/** + * @title The interface that defines functions to resolve DID from various DID registries + */ +interface UniversalDidResolverInterface { + /** + * @dev Function to resolve DID Document for the given DID. + * + * Restrictions: + * - DID must exist; otherwise, will revert with a `DidNotFound` error. + * + * @param id The DID to be resolved. + * @return document The resolved DID document associated with provided DID. + */ + function resolveDocument(string memory id) external view returns (DidDocument memory document); + + /** + * @dev Function to resolve DID Metadata for the given DID. + * + * Restrictions: + * - DID must exist; otherwise, will revert with a `DidNotFound` error. + * + * @param id The DID to be resolved. + * @return metadata The resolved DID metadata associated with provided DID. + */ + function resolveMetadata(string memory id) external view returns (DidMetadata memory metadata); +} diff --git a/indy-besu/smart_contracts/contracts/utils/DidUtils.sol b/indy-besu/smart_contracts/contracts/utils/DidUtils.sol new file mode 100644 index 000000000..88fc4b63a --- /dev/null +++ b/indy-besu/smart_contracts/contracts/utils/DidUtils.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import { StrSlice, toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; +import { IncorrectDid } from "../did/DidErrors.sol"; +import { StringUtils } from "./StringUtils.sol"; + +string constant DID_ETHR_METHOD = "ethr"; +string constant DID_INDY_METHOD = "indy"; +string constant DID_INDY_2_METHOD = "indy2"; +string constant DID_SOV_METHOD = "sov"; + +struct ParsedDid { + string method; + string identifier; +} + +using { toSlice } for string; + +library DidUtils { + string private constant _DID_PREFIX = "did"; + string private constant _DID_DELIMETER = ":"; + uint16 private constant _ADDRESS_HEX_STRING_LENGTH = 22; + + /** + * @dev Parses a DID string and returns its components. + * @param did The DID string to be parsed. + * @return ParsedDid A struct containing the method and identifier of the DID. + */ + function parseDid(string memory did) internal view returns (ParsedDid memory) { + StrSlice didSlice = did.toSlice(); + StrSlice delimeterSlice = _DID_DELIMETER.toSlice(); + StrSlice component; + bool found; + + // Extract and check 'did' prefix. + (found, component, didSlice) = didSlice.splitOnce(delimeterSlice); + if (!found || !component.eq(_DID_PREFIX.toSlice())) revert IncorrectDid(did); + + // Extract the DID method. + (found, component, didSlice) = didSlice.splitOnce(delimeterSlice); + if (!found) revert IncorrectDid(did); + + ParsedDid memory parsedDid; + parsedDid.method = component.toString(); + + // Extract the DID identifier. + (, , component) = didSlice.rsplitOnce(_DID_DELIMETER.toSlice()); + parsedDid.identifier = component.toString(); + + return parsedDid; + } + + /** + * @dev Converts a given Ethereum identifier to an Ethereum address. + * @param identifier The Ethereum identifier to be converted. + * @return The Ethereum address derived from the identifier, or the zero address if the identifier is incorrect. + */ + function convertEthereumIdentifierToAddress(string memory identifier) internal view returns (address) { + if (!(StringUtils.length(identifier) != _ADDRESS_HEX_STRING_LENGTH)) return address(0); + + bytes memory identifierBytes = StringUtils.hexToBytes(identifier); + + return address(uint160(bytes20(identifierBytes))); + } + + /** + * @dev Checks if a given method string corresponds to the Ethereum method identifier. + * @param method The method string to check. + * @return Returns `true` if the method string matches the Ethereum method identifier, `false` otherwise. + */ + function isEthereumMethod(string memory method) internal pure returns (bool) { + return method.toSlice().eq(DID_ETHR_METHOD.toSlice()); + } + + /** + * @dev Checks if a given method string corresponds to any of the Indy method identifiers. + * @param method The method string to check. + * @return Returns `true` if the method string matches any of the Indy method identifiers, `false` otherwise. + */ + function isIndyMethod(string memory method) internal pure returns (bool) { + StrSlice methodSlice = method.toSlice(); + return + methodSlice.eq(DID_INDY_METHOD.toSlice()) || + methodSlice.eq(DID_INDY_2_METHOD.toSlice()) || + methodSlice.eq(DID_SOV_METHOD.toSlice()); + } +} diff --git a/indy-besu/smart_contracts/contracts/utils/Errors.sol b/indy-besu/smart_contracts/contracts/utils/Errors.sol index 2fbb5bc7c..682ddc884 100644 --- a/indy-besu/smart_contracts/contracts/utils/Errors.sol +++ b/indy-besu/smart_contracts/contracts/utils/Errors.sol @@ -1,6 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; +/** + * @dev Error that occurs when the operation is not supported or cannot be performed. + */ +error UnsupportedOperation(string operation, string description); + /** * @title Errors * @dev A library that provides utility functions for error handling. diff --git a/indy-besu/smart_contracts/contracts/utils/StringUtils.sol b/indy-besu/smart_contracts/contracts/utils/StringUtils.sol new file mode 100644 index 000000000..befad2ffa --- /dev/null +++ b/indy-besu/smart_contracts/contracts/utils/StringUtils.sol @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import { StrSlice, toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; + +using { toSlice } for string; + +library StringUtils { + bytes1 private constant _ASCII_0 = 0x30; + bytes1 private constant _ASCII_9 = 0x39; + bytes1 private constant _ASCII_CAPITAL_A = 0x41; + bytes1 private constant _ASCII_CAPITAL_F = 0x46; + bytes1 private constant _ASCII_SMALL_A = 0x61; + bytes1 private constant _ASCII_SMALL_F = 0x66; + string private constant _HEX_PREFIX = "0x"; + bytes private constant _ZERO_BYTES = ""; + + /** + * @dev Checks if two strings are equal. + * @param str First string to compare. + * @param other Second string to compare. + * @return True if strings are equal, false otherwise. + */ + function equals(string memory str, string memory other) internal pure returns (bool) { + return str.toSlice().eq(other.toSlice()); + } + + /** + * @dev Checks if a string is empty. + * @param str String to check. + * @return Returns `true` if the string is empty, `false` otherwise. + */ + function isEmpty(string memory str) internal pure returns (bool) { + return length(str) == 0; + } + + /** + * @dev Returns the length of a string. + * @param str String to check. + * @return Length of the string. + */ + function length(string memory str) internal pure returns (uint256) { + return bytes(str).length; + } + + /** + * @dev Check if a given string has a hex prefix + * @param str String to check. + * @return Returns `true` if strings has a hex prefix, `false` otherwise. + */ + function hasHexPrefix(string memory str) internal pure returns (bool) { + return str.toSlice().startsWith(_HEX_PREFIX.toSlice()); + } + + /** + * @dev Converts a hexadecimal string to bytes. + * @param hexString The hexadecimal string to be converted. + * @return The bytes represented by the hexadecimal string, or the zero bytes if the hex is incorrect. + */ + function hexToBytes(string memory hexString) internal view returns (bytes memory) { + StrSlice hexStringSlice = hexString.toSlice(); + StrSlice hexPrefixSlice = _HEX_PREFIX.toSlice(); + + // Check and remove hex prefix + if (!hexStringSlice.startsWith(_HEX_PREFIX.toSlice())) return _ZERO_BYTES; + hexString = hexStringSlice.stripPrefix(hexPrefixSlice).toString(); + + bytes memory hexStringBytes = bytes(hexString); + bytes memory resultBytes = new bytes(hexStringBytes.length / 2); + for (uint256 i = 0; i < resultBytes.length; i++) { + (uint8 firstByte, bool firstByteValid) = _hexCharToByte(hexStringBytes[2 * i]); + if (!firstByteValid) return _ZERO_BYTES; + + (uint8 secondByte, bool secondByteValid) = _hexCharToByte(hexStringBytes[2 * i + 1]); + if (!secondByteValid) return _ZERO_BYTES; + + resultBytes[i] = bytes1(firstByte * 16 + secondByte); + } + return resultBytes; + } + + /** + * Converts a single hexadecimal character to a byte + */ + function _hexCharToByte(bytes1 hexChar) private pure returns (uint8, bool) { + if (hexChar >= _ASCII_0 && hexChar <= _ASCII_9) { + return (uint8(hexChar) - uint8(_ASCII_0), true); + } else if (hexChar >= _ASCII_CAPITAL_A && hexChar <= _ASCII_CAPITAL_F) { + return (10 + uint8(hexChar) - uint8(_ASCII_CAPITAL_A), true); + } else if (hexChar >= _ASCII_SMALL_A && hexChar <= _ASCII_SMALL_F) { + return (10 + uint8(hexChar) - uint8(_ASCII_SMALL_A), true); + } else { + return (0, false); + } + } +} diff --git a/indy-besu/smart_contracts/demos/flow-with-did-ethr.ts b/indy-besu/smart_contracts/demos/flow-with-did-ethr.ts new file mode 100644 index 000000000..32ec266ba --- /dev/null +++ b/indy-besu/smart_contracts/demos/flow-with-did-ethr.ts @@ -0,0 +1,86 @@ +import { encodeBytes32String, toUtf8Bytes } from 'ethers' +import environment from '../environment' +import { Actor } from './utils/actor' +import { ROLES } from '../contracts-ts' +import { createCredentialDefinitionObject, createSchemaObject } from '../utils' +import assert from 'assert' + +async function demo() { + let receipt: any + + const trustee = await new Actor(environment.accounts.account1).init() + const faber = await new Actor().init() + const alice = await new Actor().init() + const unauthorized = await new Actor().init() + + console.log('1. Trustee assign ENDORSER role to Faber') + receipt = await trustee.roleControl.assignRole(ROLES.ENDORSER, faber.address) + console.log(`Role ${ROLES.ENDORSER} assigned to account ${faber.address}. Receipt: ${JSON.stringify(receipt)}`) + + console.log('2. Try set service attribute to DID document by an unauthorized account') + await assert.rejects( + unauthorized.ethereumDIDRegistry.setAttribute( + unauthorized.address, + encodeBytes32String('did/svc/did-communication'), + toUtf8Bytes('https://example.com'), + 86400, + ), + (err) => { + console.log(JSON.stringify(err)) + return true + }, + ) + + console.log('3. Faber sets service attribute to DID document (Optional)') + receipt = await faber.ethereumDIDRegistry.setAttribute( + faber.address, + encodeBytes32String('did/svc/did-communication'), + toUtf8Bytes('https://example.com'), + 86400, + ) + console.log(`Attribute created for id ${faber.address}. Receipt: ${JSON.stringify(receipt)}`) + + console.log("4. Faber creates a Test Schema using the 'did:ethr' DID as the issuer") + const schema = createSchemaObject({ issuerId: faber.didEthr }) + receipt = await faber.schemaRegistry.createSchema(schema) + console.log(`Schema created for id ${schema.id}. Receipt: ${JSON.stringify(receipt)}`) + + console.log('5. Faber resolves Test Schema to ensure its written') + const resolvedSchema = await faber.schemaRegistry.resolveSchema(schema.id) + console.log(`Schema resolved for ${schema.id}. Schema: ${JSON.stringify(resolvedSchema.schema)}`) + + console.log("6. Faber create a Test Credential Definition using the 'did:ethr' DID as the issuer") + const credentialDefinition = createCredentialDefinitionObject({ issuerId: faber.didEthr, schemaId: schema.id }) + receipt = await faber.credentialDefinitionRegistry.createCredentialDefinition(credentialDefinition) + console.log(`Credential Definition created for id ${schema.id}. Receipt: ${JSON.stringify(receipt)}`) + + console.log('7. Faber resolves Test Credential Definition to ensure its written') + const resolvedCredentialDefinition = await faber.credentialDefinitionRegistry.resolveCredentialDefinition( + credentialDefinition.id, + ) + console.log( + `Credential Definition resolved for ${credentialDefinition.id}. Credential Definition: ${JSON.stringify( + resolvedCredentialDefinition.credDef, + )}`, + ) + + console.log('8. Alice resolves Test Schema') + const testSchema = await alice.schemaRegistry.resolveSchema(schema.id) + console.log(`Schema resolved for ${schema.id}. Schema: ${JSON.stringify(testSchema.schema)}`) + + console.log('9. Alice resolves Test Credential Definition') + const testCredentialDefinition = await alice.credentialDefinitionRegistry.resolveCredentialDefinition( + credentialDefinition.id, + ) + console.log( + `Credential Definition resolved for ${credentialDefinition.id}. Credential Definition: ${JSON.stringify( + testCredentialDefinition.credDef, + )}`, + ) +} + +if (require.main === module) { + demo() +} + +module.exports = exports = demo diff --git a/indy-besu/smart_contracts/demos/utils/actor.ts b/indy-besu/smart_contracts/demos/utils/actor.ts index bb525941e..bdb7f59bd 100644 --- a/indy-besu/smart_contracts/demos/utils/actor.ts +++ b/indy-besu/smart_contracts/demos/utils/actor.ts @@ -1,10 +1,11 @@ import { RoleControl, - DidRegistry, + IndyDidRegistry, SchemaRegistry, CredentialDefinitionRegistry, ValidatorControl, UpgradeControl, + EthereumDIDRegistry, } from '../../contracts-ts' import { Account, AccountInfo } from '../../utils' @@ -12,7 +13,8 @@ export class Actor { public account: Account public roleControl!: RoleControl public validatorControl!: ValidatorControl - public didRegistry!: DidRegistry + public didRegistry!: IndyDidRegistry + public ethereumDIDRegistry!: EthereumDIDRegistry public schemaRegistry!: SchemaRegistry public credentialDefinitionRegistry!: CredentialDefinitionRegistry public upgradeControl!: UpgradeControl @@ -24,7 +26,10 @@ export class Actor { public async init() { this.roleControl = await new RoleControl(this.account).getInstance(RoleControl.defaultAddress) this.validatorControl = await new ValidatorControl(this.account).getInstance(ValidatorControl.defaultAddress) - this.didRegistry = await new DidRegistry(this.account).getInstance(DidRegistry.defaultAddress) + this.didRegistry = await new IndyDidRegistry(this.account).getInstance(IndyDidRegistry.defaultAddress) + this.ethereumDIDRegistry = await new EthereumDIDRegistry(this.account).getInstance( + EthereumDIDRegistry.defaultAddress, + ) this.schemaRegistry = await new SchemaRegistry(this.account).getInstance(SchemaRegistry.defaultAddress) this.credentialDefinitionRegistry = await new CredentialDefinitionRegistry(this.account).getInstance( CredentialDefinitionRegistry.defaultAddress, @@ -41,6 +46,10 @@ export class Actor { return this.account.did } + public get didEthr() { + return this.account.didEthr + } + public get didDocument() { return this.account.didDocument } diff --git a/indy-besu/smart_contracts/package.json b/indy-besu/smart_contracts/package.json index 58a0de495..2cef990c9 100644 --- a/indy-besu/smart_contracts/package.json +++ b/indy-besu/smart_contracts/package.json @@ -18,11 +18,12 @@ "demo/roles": "yarn run-on-besu demos/role-control.ts", "demo/validators": "yarn run-on-besu demos/validator-control.ts", "demo/flow": "yarn run-on-besu demos/flow.ts", + "demo/flow-with-did-ethr": "yarn run-on-besu demos/flow-with-did-ethr.ts", "demo/account": "yarn run-on-besu demos/account-control.ts", "demo/upgrade": "yarn run-on-besu demos/upgrade-control.ts", "genesis/generate": "ts-node scripts/genesis/generate.ts", "postinstall": "cd ../../ && husky install indy-besu/smart_contracts/.husky", - "solc-compile": "solc -o compiled-contracts --optimize --bin-runtime --evm-version=constantinople @dk1a=$(pwd)/node_modules/@dk1a @openzeppelin=$(pwd)/node_modules/@openzeppelin contracts/**/*.sol node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol" + "solc-compile": "solc -o compiled-contracts --optimize --bin-runtime --evm-version=constantinople @dk1a=$(pwd)/node_modules/@dk1a @openzeppelin=$(pwd)/node_modules/@openzeppelin ethr-did-registry=$(pwd)/node_modules/ethr-did-registry contracts/**/*.sol node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol" }, "license": "Apache-2.0", "dependencies": { @@ -36,6 +37,7 @@ "@openzeppelin/contracts": "^5.0.0", "async-promise-pool": "^1.0.6", "ethers": "6.8.0", + "ethr-did-registry": "^1.2.0", "fs-extra": "^10.0.0", "hardhat-gas-reporter": "^1.0.8", "prettier-plugin-solidity": "^1.1.3", diff --git a/indy-besu/smart_contracts/scripts/genesis/config.ts b/indy-besu/smart_contracts/scripts/genesis/config.ts index 72878ec52..163057cee 100644 --- a/indy-besu/smart_contracts/scripts/genesis/config.ts +++ b/indy-besu/smart_contracts/scripts/genesis/config.ts @@ -1,11 +1,12 @@ import { AccountControlConfig, CredentialDefinitionsConfig, - DidRegexConfig, - DidsConfig, - DidValidatorConfig, + EthereumDidRegistryConfig, + IndyDidRegistryConfig, + IndyDidValidatorConfig, RolesConfig, SchemasConfig, + UniversalDidResolverConfig, ValidatorsConfig, } from './contracts' import { UpgradeControlConfig } from './contracts/upgradeControl' @@ -17,17 +18,17 @@ export const outFile = 'ContractsGenesis.json' export interface Config { accountControl: AccountControlConfig credentialDefinitionRegistry: CredentialDefinitionsConfig - didValidator: DidValidatorConfig - didRegistry: DidsConfig - didRegex: DidRegexConfig + indyDidValidator: IndyDidValidatorConfig + indyDidRegistry: IndyDidRegistryConfig + ethereumDidRegistry: EthereumDidRegistryConfig roleControl: RolesConfig schemaRegistry: SchemasConfig + universalDidResolver: UniversalDidResolverConfig upgradeControl: UpgradeControlConfig validatorControl: ValidatorsConfig } const contractsAddresses = { - didRegex: '0x0000000000000000000000000000000000001111', didValidator: '0x0000000000000000000000000000000000002222', didRegistry: '0x0000000000000000000000000000000000003333', credentialDefinitionRegistry: '0x0000000000000000000000000000000000004444', @@ -36,6 +37,8 @@ const contractsAddresses = { validators: '0x0000000000000000000000000000000000007777', accountControl: '0x0000000000000000000000000000000000008888', upgradeControl: '0x0000000000000000000000000000000000009999', + universalDidResolver: '0x000000000000000000000000000000000019999', + ethereumDIDRegistry: '0x0000000000000000000000000000000000018888', } export const config: Config = { @@ -54,32 +57,31 @@ export const config: Config = { description: 'Smart contract to manage credential definitions', data: { credentialDefinitions: [], - didRegistryAddress: contractsAddresses.didRegistry, + universalDidResolverAddress: contractsAddresses.universalDidResolver, schemaRegistryAddress: contractsAddresses.schemas, upgradeControlAddress: contractsAddresses.upgradeControl, }, }, - didRegex: { - name: 'DidRegex', - address: contractsAddresses.didRegex, - description: 'Regex library to validate DID syntax', - }, - didValidator: { - name: 'DidValidator', + indyDidValidator: { + name: 'IndyDidValidator', address: contractsAddresses.didValidator, description: 'Library to validate DID', - libraries: { 'contracts/did/DidRegex.sol:DidRegex': contractsAddresses.didRegex }, }, - didRegistry: { - name: 'DidRegistry', + indyDidRegistry: { + name: 'IndyDidRegistry', address: contractsAddresses.didRegistry, description: 'Smart contract to manage DIDs', - libraries: { 'contracts/did/DidValidator.sol:DidValidator': contractsAddresses.didValidator }, + libraries: { 'contracts/did/IndyDidValidator.sol:IndyDidValidator': contractsAddresses.didValidator }, data: { dids: [], upgradeControlAddress: contractsAddresses.upgradeControl, }, }, + ethereumDidRegistry: { + name: 'EthereumExtDidRegistry', + address: contractsAddresses.ethereumDIDRegistry, + description: 'Ethereum registry for ERC-1056 ethr did methods', + }, roleControl: { name: 'RoleControl', address: contractsAddresses.roles, @@ -121,6 +123,16 @@ export const config: Config = { description: 'Smart contract to manage schemas', data: { schemas: [], + universalDidResolverAddress: contractsAddresses.universalDidResolver, + upgradeControlAddress: contractsAddresses.upgradeControl, + }, + }, + universalDidResolver: { + name: 'UniversalDidResolver', + address: contractsAddresses.universalDidResolver, + description: 'Smart contract to resolve DIDs from various DID registries', + data: { + etheriumDidRegistryAddress: contractsAddresses.ethereumDIDRegistry, didRegistryAddress: contractsAddresses.didRegistry, upgradeControlAddress: contractsAddresses.upgradeControl, }, diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts index 37aceb548..5a989ae18 100644 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts @@ -6,7 +6,7 @@ import { buildProxySection, slots } from '../helpers' export interface CredentialDefinitionsConfig extends ContractConfig { data: { credentialDefinitions: Array<{ id: string; data: { name: string } }> - didRegistryAddress: string + universalDidResolverAddress: string schemaRegistryAddress: string upgradeControlAddress: string } @@ -16,11 +16,11 @@ export function credentialDefinitionRegistry() { const { name, address, description, data } = config.credentialDefinitionRegistry const storage: any = {} - // address of upgrade control contact stored in slot 2 + // address of upgrade control contact stored in slot 0 storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) - // address of DID registry contact stored in slot 0 - storage[slots['1']] = padLeft(data.didRegistryAddress, 64) - // address of schema registry contact stored in slot 1 + // address of DID registry contact stored in slot 1 + storage[slots['1']] = padLeft(data.universalDidResolverAddress, 64) + // address of schema registry contact stored in slot 2 storage[slots['2']] = padLeft(data.schemaRegistryAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/didValidator.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/didValidator.ts deleted file mode 100644 index feebb3712..000000000 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/didValidator.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { config } from '../config' -import { ContractConfig } from '../contractConfig' -import { buildSection } from '../helpers' - -export interface DidValidatorConfig extends ContractConfig { - libraries: { [libraryName: string]: string } -} - -export function didValidator() { - const { name, address, description, libraries } = config.didValidator - const storage: any = {} - return buildSection(name, address, description, storage, libraries) -} diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/ethereumDidRegistry.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/ethereumDidRegistry.ts new file mode 100644 index 000000000..87e3f3659 --- /dev/null +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/ethereumDidRegistry.ts @@ -0,0 +1,12 @@ +import { config } from '../config' +import { ContractConfig } from '../contractConfig' +import { buildProxySection } from '../helpers' + +export interface EthereumDidRegistryConfig extends ContractConfig {} + +export function ethereumDidRegistry() { + const { name, address, description } = config.ethereumDidRegistry + const storage: any = {} + + return buildProxySection(name, address, description, storage) +} diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/index.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/index.ts index 2e619e2ed..58c83a6b9 100644 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/index.ts +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/index.ts @@ -1,9 +1,10 @@ export * from './accountControl' export * from './credentialDefinitionRegistry' -export * from './didRegistry' -export * from './didRegex' -export * from './didValidator' +export * from './indyDidRegistry' +export * from './indyDidValidator' +export * from './ethereumDidRegistry' export * from './roleControl' export * from './schemaRegistry' +export * from './universalDidResolver' export * from './upgradeControl' export * from './validatorControl' diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/didRegistry.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts similarity index 82% rename from indy-besu/smart_contracts/scripts/genesis/contracts/didRegistry.ts rename to indy-besu/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts index fa59f9884..aef6b6db5 100644 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/didRegistry.ts +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts @@ -3,7 +3,7 @@ import { config } from '../config' import { ContractConfig } from '../contractConfig' import { buildProxySection, slots } from '../helpers' -export interface DidsConfig extends ContractConfig { +export interface IndyDidRegistryConfig extends ContractConfig { libraries: { [libraryName: string]: string } data: { dids: Array<{ id: string; data: any }> @@ -11,8 +11,8 @@ export interface DidsConfig extends ContractConfig { } } -export function didRegistry() { - const { name, address, description, libraries, data } = config.didRegistry +export function indyDidRegistry() { + const { name, address, description, libraries, data } = config.indyDidRegistry const storage: any = {} storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/didRegex.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/indyDidValidator.ts similarity index 56% rename from indy-besu/smart_contracts/scripts/genesis/contracts/didRegex.ts rename to indy-besu/smart_contracts/scripts/genesis/contracts/indyDidValidator.ts index a8653541f..4072121c2 100644 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/didRegex.ts +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/indyDidValidator.ts @@ -2,10 +2,10 @@ import { config } from '../config' import { ContractConfig } from '../contractConfig' import { buildSection } from '../helpers' -export interface DidRegexConfig extends ContractConfig {} +export interface IndyDidValidatorConfig extends ContractConfig {} -export function didRegex() { - const { name, address, description } = config.didRegex +export function indyDidValidator() { + const { name, address, description } = config.indyDidValidator const storage: any = {} return buildSection(name, address, description, storage) } diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts index 239202686..1e7511420 100644 --- a/indy-besu/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts @@ -6,7 +6,7 @@ import { buildProxySection, slots } from '../helpers' export interface SchemasConfig extends ContractConfig { data: { schemas: Array<{ id: string; data: { name: string } }> - didRegistryAddress: string + universalDidResolverAddress: string upgradeControlAddress: string } } @@ -15,9 +15,9 @@ export function schemaRegistry() { const { name, address, description, data } = config.schemaRegistry const storage: any = {} - // address of upgrade control contact stored in slot 1 + // address of upgrade control contact stored in slot 0 storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) - // address of DID registry contact stored in slot 0 - storage[slots['1']] = padLeft(data.didRegistryAddress, 64) + // address of DID resolver contact stored in slot 1 + storage[slots['1']] = padLeft(data.universalDidResolverAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/indy-besu/smart_contracts/scripts/genesis/contracts/universalDidResolver.ts b/indy-besu/smart_contracts/scripts/genesis/contracts/universalDidResolver.ts new file mode 100644 index 000000000..9f9bcdb33 --- /dev/null +++ b/indy-besu/smart_contracts/scripts/genesis/contracts/universalDidResolver.ts @@ -0,0 +1,25 @@ +import { padLeft } from 'web3-utils' +import { config } from '../config' +import { ContractConfig } from '../contractConfig' +import { buildProxySection, slots } from '../helpers' + +export interface UniversalDidResolverConfig extends ContractConfig { + data: { + didRegistryAddress: string + etheriumDidRegistryAddress: string + upgradeControlAddress: string + } +} + +export function universalDidResolver() { + const { name, address, description, data } = config.universalDidResolver + const storage: any = {} + + // address of upgrade control contact stored in slot 0 + storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) + // address of DID registry contact stored in slot 1 + storage[slots['1']] = padLeft(data.didRegistryAddress, 64) + // address of etherium DID registry contact stored in slot 2 + storage[slots['2']] = padLeft(data.etheriumDidRegistryAddress, 64) + return buildProxySection(name, address, description, storage) +} diff --git a/indy-besu/smart_contracts/scripts/genesis/generate.ts b/indy-besu/smart_contracts/scripts/genesis/generate.ts index 689bfdec0..a0abfcbab 100644 --- a/indy-besu/smart_contracts/scripts/genesis/generate.ts +++ b/indy-besu/smart_contracts/scripts/genesis/generate.ts @@ -3,11 +3,12 @@ import { outFile } from './config' import { accountControl, credentialDefinitionRegistry, - didRegex, - didRegistry, - didValidator, + ethereumDidRegistry, + indyDidRegistry, + indyDidValidator, roleControl, schemaRegistry, + universalDidResolver, upgradeControl, validatorControl, } from './contracts' @@ -18,9 +19,10 @@ function main() { ...roleControl(), ...validatorControl(), ...upgradeControl(), - ...didRegex(), - ...didValidator(), - ...didRegistry(), + ...indyDidValidator(), + ...indyDidRegistry(), + ...ethereumDidRegistry(), + ...universalDidResolver(), ...schemaRegistry(), ...credentialDefinitionRegistry(), } diff --git a/indy-besu/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts b/indy-besu/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts index 550dc6f34..804c3a670 100644 --- a/indy-besu/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts +++ b/indy-besu/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts @@ -1,21 +1,27 @@ import { expect } from 'chai' -import { DidRegistry } from '../../contracts-ts' +import { IndyDidRegistry } from '../../contracts-ts' import { createCredentialDefinitionObject } from '../../utils' -import { createDid, createSchema, deployCredentialDefinitionRegistry } from '../utils/contract-helpers' +import { + createDid, + createSchema, + deployCredentialDefinitionRegistry, + TestableCredentialDefinitionRegistry, + TestableSchemaRegistry, +} from '../utils/contract-helpers' import { ClErrors } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('CredentialDefinitionRegistry', function () { - let didRegistry: DidRegistry - let schemaRegistry: any - let credentialDefinitionRegistry: any + let didRegistry: IndyDidRegistry + let schemaRegistry: TestableSchemaRegistry + let credentialDefinitionRegistry: TestableCredentialDefinitionRegistry let testAccounts: TestAccounts let schemaId: string const issuerId = 'did:indy2:mainnet:SEp33q43PsdP7nDATyySSH' beforeEach(async function () { const { - didRegistry: didRegistryInit, + indyDidRegistry: didRegistryInit, schemaRegistry: schemaRegistryInit, credentialDefinitionRegistry: credentialDefinitionRegistryInit, testAccounts: testAccountsInit, @@ -153,4 +159,33 @@ describe('CredentialDefinitionRegistry', function () { // .withArgs(credDef.id) // }) }) + + describe('Add/Resolve Credential Definition with did:ethr Issuer', function () { + it('Should create and resolve Credential Definition', async function () { + const ethrIssuerId = `did:ethr:${testAccounts.trustee.account.address}` + const credDef = createCredentialDefinitionObject({ issuerId: ethrIssuerId, schemaId }) + + await credentialDefinitionRegistry.createCredentialDefinition(credDef) + const result = await credentialDefinitionRegistry.resolveCredentialDefinition(credDef.id) + + expect(result.credDef).to.be.deep.equal(credDef) + }) + + it('Should fail if Credential Definition is being created with not owned Issuer DID', async function () { + const ethrIssuerId = `did:ethr:${testAccounts.trustee2.account.address}` + const credDef = createCredentialDefinitionObject({ issuerId: ethrIssuerId, schemaId }) + + await expect(credentialDefinitionRegistry.createCredentialDefinition(credDef)) + .to.be.revertedWithCustomError(credentialDefinitionRegistry.baseInstance, ClErrors.SenderIsNotIssuerDidOwner) + .withArgs(testAccounts.trustee.account.address, testAccounts.trustee2.account.address) + }) + + it('Should fail if Credential Definition is being created with invalid Issuer ID', async function () { + const credDef = createCredentialDefinitionObject({ issuerId: 'did:ethr:ab$ddfgh354345', schemaId }) + + await expect(credentialDefinitionRegistry.createCredentialDefinition(credDef)) + .to.be.revertedWithCustomError(schemaRegistry.baseInstance, ClErrors.InvalidIssuerId) + .withArgs(credDef.issuerId) + }) + }) }) diff --git a/indy-besu/smart_contracts/test/cl/SchemaRegistry.spec.ts b/indy-besu/smart_contracts/test/cl/SchemaRegistry.spec.ts index b2ef48a64..132f14a40 100644 --- a/indy-besu/smart_contracts/test/cl/SchemaRegistry.spec.ts +++ b/indy-besu/smart_contracts/test/cl/SchemaRegistry.spec.ts @@ -1,19 +1,19 @@ import { expect } from 'chai' -import { DidRegistry, SchemaRegistry } from '../../contracts-ts' +import { IndyDidRegistry, SchemaRegistry } from '../../contracts-ts' import { createSchemaObject } from '../../utils' -import { createDid, deploySchemaRegistry } from '../utils/contract-helpers' +import { createDid, deploySchemaRegistry, TestableSchemaRegistry } from '../utils/contract-helpers' import { ClErrors } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('SchemaRegistry', function () { - let didRegistry: DidRegistry - let schemaRegistry: any + let didRegistry: IndyDidRegistry + let schemaRegistry: TestableSchemaRegistry let testAccounts: TestAccounts const issuerId = 'did:indy2:mainnet:SEp33q43PsdP7nDATyySSH' beforeEach(async function () { const { - didRegistry: didRegistryInit, + indyDidRegistry: didRegistryInit, schemaRegistry: schemaRegistryInit, testAccounts: testAccountsInit, } = await deploySchemaRegistry() @@ -119,4 +119,35 @@ describe('SchemaRegistry', function () { .withArgs(testAccounts.trustee2.account.address, testAccounts.trustee.account.address) }) }) + + describe('Add/Resolve Schema with did:ethr Issuer', function () { + it('Should create and resolve Schema', async function () { + const ethrIssuerId = `did:ethr:${testAccounts.trustee.account.address}` + + const schema = createSchemaObject({ issuerId: ethrIssuerId }) + + await schemaRegistry.createSchema(schema) + const result = await schemaRegistry.resolveSchema(schema.id) + + expect(result.schema).to.be.deep.equal(schema) + }) + + it('Should fail if Schema is being created with not owned Issuer DID', async function () { + const ethrIssuerId = `did:ethr:${testAccounts.trustee2.account.address}` + + const schema = createSchemaObject({ issuerId: ethrIssuerId }) + + await expect(schemaRegistry.createSchema(schema)) + .to.be.revertedWithCustomError(schemaRegistry.baseInstance, ClErrors.SenderIsNotIssuerDidOwner) + .withArgs(testAccounts.trustee.account.address, testAccounts.trustee2.account.address) + }) + + it('Should fail if Schema is being created with invalid Issuer ID', async function () { + const schema = createSchemaObject({ issuerId: 'did:ethr:ab$ddfgh354345' }) + + await expect(schemaRegistry.createSchema(schema)) + .to.be.revertedWithCustomError(schemaRegistry.baseInstance, ClErrors.InvalidIssuerId) + .withArgs(schema.issuerId) + }) + }) }) diff --git a/indy-besu/smart_contracts/test/did/DidRegistry.spec.ts b/indy-besu/smart_contracts/test/did/DidRegistry.spec.ts index 0a83cab4f..dc719d2c8 100644 --- a/indy-besu/smart_contracts/test/did/DidRegistry.spec.ts +++ b/indy-besu/smart_contracts/test/did/DidRegistry.spec.ts @@ -1,28 +1,25 @@ import { expect } from 'chai' -import { VerificationMethod } from '../../contracts-ts/DidRegistry' +import { VerificationMethod } from '../../contracts-ts/types/Did' import { createBaseDidDocument } from '../../utils/entity-factories' -import { deployDidRegistry } from '../utils/contract-helpers' -import { DidRegex, DidValidator } from '../utils/contract-helpers' +import { deployIndyDidRegistry, TestableIndyDidRegistry } from '../utils/contract-helpers' +import { IndyDidValidator } from '../utils/contract-helpers' import { DidError } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('DIDContract', function () { - let didRegistry: any - let didValidator: DidValidator - let didRegex: DidRegex + let didRegistry: TestableIndyDidRegistry + let didValidator: IndyDidValidator let testAccounts: TestAccounts beforeEach(async function () { const { - didRegistry: didRegistryInit, - didValidator: didValidatorInit, - didRegex: didRegexInit, + indyDidRegistry: didRegistryInit, + indyDidValidator: didValidatorInit, testAccounts: testAccountsInit, - } = await deployDidRegistry() + } = await deployIndyDidRegistry() didRegistry = didRegistryInit didValidator = didValidatorInit - didRegex = didRegexInit testAccounts = testAccountsInit didRegistry.connect(testAccounts.trustee.account) diff --git a/indy-besu/smart_contracts/test/did/UniversalDidResolver.spec.ts b/indy-besu/smart_contracts/test/did/UniversalDidResolver.spec.ts new file mode 100644 index 000000000..118199591 --- /dev/null +++ b/indy-besu/smart_contracts/test/did/UniversalDidResolver.spec.ts @@ -0,0 +1,70 @@ +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers' +import { expect } from 'chai' +import { createBaseDidDocument } from '../../utils' +import { deployUniversalDidResolver, TestableUniversalDidResolver } from '../utils/contract-helpers' +import { DidError } from '../utils/errors' +import { TestAccounts } from '../utils/test-entities' + +describe('UniversalDidResolver', function () { + const indy2DidDocument = createBaseDidDocument('did:indy2:testnet:SEp33q43PsdP7nDATyySSH') + let universalDidReolver: TestableUniversalDidResolver + let testAccounts: TestAccounts + + async function deployUniversalDidResolverFixture() { + const { + universalDidReolver: universalDidReolverInit, + indyDidRegistry, + testAccounts: testAccountsInit, + } = await deployUniversalDidResolver() + + indyDidRegistry.connect(testAccountsInit.trustee.account) + await indyDidRegistry.createDid(indy2DidDocument) + + return { universalDidReolverInit, testAccountsInit } + } + + beforeEach(async function () { + const { universalDidReolverInit, testAccountsInit } = await loadFixture(deployUniversalDidResolverFixture) + + universalDidReolver = universalDidReolverInit + testAccounts = testAccountsInit + + universalDidReolver.connect(testAccounts.trustee.account) + }) + + describe('Resolve did:indy2', function () { + it('Should resolve DID document', async function () { + const document = await universalDidReolver.resolveDocument(indy2DidDocument.id) + + expect(document).to.be.deep.equal(indy2DidDocument) + }) + + it('Should resolve DID metadata', async function () { + const metadata = await universalDidReolver.resolveMetadata(indy2DidDocument.id) + + expect(metadata).to.contain({ + creator: testAccounts.trustee.account.address, + deactivated: false, + }) + }) + }) + + describe('Resolve did:ethr', function () { + it('Should resolve DID metadata', async function () { + const metadata = await universalDidReolver.resolveMetadata(`did:ethr:${testAccounts.trustee.account.address}`) + + expect(metadata).to.contain({ + creator: testAccounts.trustee.account.address, + deactivated: false, + }) + }) + + it('Should fail if an incorrect DID method-specific-id is provided', async function () { + const incorrectDid = 'did:ethr:ab$ddfgh354345' + + await expect(universalDidReolver.resolveMetadata(incorrectDid)) + .revertedWithCustomError(universalDidReolver.baseInstance, DidError.IncorrectDid) + .withArgs(incorrectDid) + }) + }) +}) diff --git a/indy-besu/smart_contracts/test/utils/contract-helpers.ts b/indy-besu/smart_contracts/test/utils/contract-helpers.ts index ed2b257c3..9856a44c2 100644 --- a/indy-besu/smart_contracts/test/utils/contract-helpers.ts +++ b/indy-besu/smart_contracts/test/utils/contract-helpers.ts @@ -1,23 +1,24 @@ import { CredentialDefinitionRegistry, - DidRegistry, + IndyDidRegistry, RoleControl, SchemaRegistry, + UniversalDidResolver, UpgradeControl, ValidatorControl, } from '../../contracts-ts' import { Contract, createBaseDidDocument, createSchemaObject } from '../../utils' import { getTestAccounts, ZERO_ADDRESS } from './test-entities' -export class DidRegex extends testableContractMixin(Contract) { +export class EthereumDIDRegistry extends testableContractMixin(Contract) { constructor() { - super(DidRegex.name) + super(EthereumDIDRegistry.name) } } -export class DidValidator extends testableContractMixin(Contract) { +export class IndyDidValidator extends testableContractMixin(Contract) { constructor() { - super(DidValidator.name) + super(IndyDidValidator.name) } } @@ -27,12 +28,13 @@ export class UpgradablePrototype extends testableContractMixin(Contract) { } } -export const TestableDidRegistry = testableContractMixin(DidRegistry) -export const TestableSchemaRegistry = testableContractMixin(SchemaRegistry) -export const TestableCredentialDefinitionRegistry = testableContractMixin(CredentialDefinitionRegistry) -export const TestableRoleControl = testableContractMixin(RoleControl) -export const TestableValidatorControl = testableContractMixin(ValidatorControl) -export const TestableUpgradeControl = testableContractMixin(UpgradeControl) +export class TestableIndyDidRegistry extends testableContractMixin(IndyDidRegistry) {} +export class TestableSchemaRegistry extends testableContractMixin(SchemaRegistry) {} +export class TestableCredentialDefinitionRegistry extends testableContractMixin(CredentialDefinitionRegistry) {} +export class TestableRoleControl extends testableContractMixin(RoleControl) {} +export class TestableValidatorControl extends testableContractMixin(ValidatorControl) {} +export class TestableUpgradeControl extends testableContractMixin(UpgradeControl) {} +export class TestableUniversalDidResolver extends testableContractMixin(UniversalDidResolver) {} export async function deployRoleControl() { const roleControl = await new RoleControl().deployProxy({ params: [ZERO_ADDRESS] }) @@ -41,33 +43,48 @@ export async function deployRoleControl() { return { roleControl, testAccounts } } -export async function deployDidRegistry() { +export async function deployIndyDidRegistry() { const { testAccounts } = await deployRoleControl() - const didRegex = await new DidRegex().deploy() - const didValidator = await new DidValidator().deploy({ libraries: [didRegex] }) - const didRegistry = await new TestableDidRegistry().deployProxy({ params: [ZERO_ADDRESS], libraries: [didValidator] }) + const indyDidValidator = await new IndyDidValidator().deploy() + const indyDidRegistry = await new TestableIndyDidRegistry().deployProxy({ + params: [ZERO_ADDRESS], + libraries: [indyDidValidator], + }) - return { didRegistry, didValidator, didRegex, testAccounts } + return { indyDidRegistry, indyDidValidator, testAccounts } +} + +export async function deployUniversalDidResolver() { + const { indyDidRegistry, testAccounts } = await deployIndyDidRegistry() + const ethereumDIDRegistry = await new EthereumDIDRegistry().deploy() + + const universalDidReolver = await new TestableUniversalDidResolver().deployProxy({ + params: [ZERO_ADDRESS, indyDidRegistry.address, ethereumDIDRegistry.address], + }) + + return { universalDidReolver, ethereumDIDRegistry, indyDidRegistry, testAccounts } } export async function deploySchemaRegistry() { - const { didRegistry, testAccounts } = await deployDidRegistry() - const schemaRegistry = await new TestableSchemaRegistry().deployProxy({ params: [didRegistry.address, ZERO_ADDRESS] }) + const { universalDidReolver, indyDidRegistry, testAccounts } = await deployUniversalDidResolver() + const schemaRegistry = await new TestableSchemaRegistry().deployProxy({ + params: [ZERO_ADDRESS, universalDidReolver.address], + }) - return { didRegistry, schemaRegistry, testAccounts } + return { universalDidReolver, indyDidRegistry, schemaRegistry, testAccounts } } export async function deployCredentialDefinitionRegistry() { - const { didRegistry, schemaRegistry, testAccounts } = await deploySchemaRegistry() + const { universalDidReolver, indyDidRegistry, schemaRegistry, testAccounts } = await deploySchemaRegistry() const credentialDefinitionRegistry = await new TestableCredentialDefinitionRegistry().deployProxy({ - params: [didRegistry.address, schemaRegistry.address, ZERO_ADDRESS], + params: [ZERO_ADDRESS, universalDidReolver.address, schemaRegistry.address], }) - return { credentialDefinitionRegistry, didRegistry, schemaRegistry, testAccounts } + return { credentialDefinitionRegistry, universalDidReolver, indyDidRegistry, schemaRegistry, testAccounts } } -export async function createDid(didRegistry: DidRegistry, did: string) { +export async function createDid(didRegistry: IndyDidRegistry, did: string) { const didDocument = createBaseDidDocument(did) await didRegistry.createDid(didDocument) return didDocument diff --git a/indy-besu/smart_contracts/test/utils/errors.ts b/indy-besu/smart_contracts/test/utils/errors.ts index b59d16d57..2d316fea4 100644 --- a/indy-besu/smart_contracts/test/utils/errors.ts +++ b/indy-besu/smart_contracts/test/utils/errors.ts @@ -6,6 +6,7 @@ export namespace ClErrors { export const FieldRequired = 'FieldRequired' export const IssuerNotFound = 'IssuerNotFound' export const IssuerHasBeenDeactivated = 'IssuerHasBeenDeactivated' + export const InvalidIssuerId = 'InvalidIssuerId' export const SenderIsNotIssuerDidOwner = 'SenderIsNotIssuerDidOwner' // Schema errors diff --git a/indy-besu/smart_contracts/utils/account.ts b/indy-besu/smart_contracts/utils/account.ts index b548ba098..cae364273 100644 --- a/indy-besu/smart_contracts/utils/account.ts +++ b/indy-besu/smart_contracts/utils/account.ts @@ -35,6 +35,10 @@ export class Account { return did } + public get didEthr() { + return `did:ethr:${this.address}` + } + public get didDocument() { return createBaseDidDocument(this.did) } diff --git a/indy-besu/smart_contracts/yarn.lock b/indy-besu/smart_contracts/yarn.lock index 4f040c545..ca5fc3748 100644 --- a/indy-besu/smart_contracts/yarn.lock +++ b/indy-besu/smart_contracts/yarn.lock @@ -2964,6 +2964,11 @@ ethjs-util@0.1.6, ethjs-util@^0.1.6: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +ethr-did-registry@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethr-did-registry/-/ethr-did-registry-1.2.0.tgz#7140b3f3a8358c24689c6223f1dffeff37ae88b2" + integrity sha512-KmqvyQbJHoY8WGtYV5V33s7Ypl2KnH5N8pCYfldNt0yJsz1z2xHVKVXXavUhaRsCMqy0pUwRMJHpqlY3eSi2mQ== + eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" diff --git a/indy-besu/vdr/src/client/client.rs b/indy-besu/vdr/src/client/client.rs index 74aeef511..bb34499d6 100644 --- a/indy-besu/vdr/src/client/client.rs +++ b/indy-besu/vdr/src/client/client.rs @@ -155,7 +155,7 @@ pub mod test { pub const NODE_ADDRESS: &str = "http://127.0.0.1:8545"; pub const CONTRACTS_SPEC_BASE_PATH: &str = "../smart_contracts/artifacts/contracts/"; pub const DID_REGISTRY_ADDRESS: &str = "0x0000000000000000000000000000000000003333"; - pub const DID_REGISTRY_SPEC_PATH: &str = "did/DidRegistry.sol/DidRegistry.json"; + pub const DID_REGISTRY_SPEC_PATH: &str = "did/IndyDidRegistry.sol/IndyDidRegistry.json"; pub const SCHEMA_REGISTRY_ADDRESS: &str = "0x0000000000000000000000000000000000005555"; pub const SCHEMA_REGISTRY_SPEC_PATH: &str = "cl/SchemaRegistry.sol/SchemaRegistry.json"; pub const CRED_DEF_REGISTRY_ADDRESS: &str = "0x0000000000000000000000000000000000004444"; diff --git a/indy-besu/vdr/src/contracts/did/did_registry.rs b/indy-besu/vdr/src/contracts/did/did_registry.rs index 716aa3f6f..552d027e2 100644 --- a/indy-besu/vdr/src/contracts/did/did_registry.rs +++ b/indy-besu/vdr/src/contracts/did/did_registry.rs @@ -10,17 +10,17 @@ use crate::{ DID, }; -/// DidRegistry contract methods -pub struct DidRegistry; +/// IndyDidRegistry contract methods +pub struct IndyDidRegistry; -impl DidRegistry { - const CONTRACT_NAME: &'static str = "DidRegistry"; +impl IndyDidRegistry { + const CONTRACT_NAME: &'static str = "IndyDidRegistry"; const METHOD_CREATE_DID: &'static str = "createDid"; const METHOD_UPDATE_DID: &'static str = "updateDid"; const METHOD_DEACTIVATE_DID: &'static str = "deactivateDid"; const METHOD_RESOLVE_DID: &'static str = "resolveDid"; - /// Build transaction to execute DidRegistry.createDid contract method to create a new DID + /// Build transaction to execute IndyDidRegistry.createDid contract method to create a new DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -58,7 +58,7 @@ impl DidRegistry { transaction } - /// Build transaction to execute DidRegistry.updateDid contract method to update DID document for an existing DID + /// Build transaction to execute IndyDidRegistry.updateDid contract method to update DID document for an existing DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -96,7 +96,7 @@ impl DidRegistry { transaction } - /// Build transaction to execute DidRegistry.deactivateDid contract method to deactivate an existing DID + /// Build transaction to execute IndyDidRegistry.deactivateDid contract method to deactivate an existing DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -134,7 +134,7 @@ impl DidRegistry { transaction } - /// Build transaction to execute DidRegistry.resolveDid contract method to receive a DID Document associated with the DID + /// Build transaction to execute IndyDidRegistry.resolveDid contract method to receive a DID Document associated with the DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -168,7 +168,7 @@ impl DidRegistry { transaction } - /// Parse the result of execution DidRegistry.resolveDid contract method to receive a DID Document associated with the DID + /// Parse the result of execution IndyDidRegistry.resolveDid contract method to receive a DID Document associated with the DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -198,7 +198,7 @@ impl DidRegistry { result } - /// Single step function executing DidRegistry.createDid smart contract method to create a new DID + /// Single step function executing IndyDidRegistry.createDid smart contract method to create a new DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -231,7 +231,7 @@ impl DidRegistry { receipt } - /// Single step function executing DidRegistry.updateDid smart contract method to update DID Document for an existing DID + /// Single step function executing IndyDidRegistry.updateDid smart contract method to update DID Document for an existing DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -264,7 +264,7 @@ impl DidRegistry { receipt } - /// Single step function executing DidRegistry.deactivateDid smart contract method to deactivate as existing DID + /// Single step function executing IndyDidRegistry.deactivateDid smart contract method to deactivate as existing DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -297,7 +297,7 @@ impl DidRegistry { receipt } - /// Single step function executing DidRegistry.resolveDid smart contract method to resolve DID Document for an existing DID + /// Single step function executing IndyDidRegistry.resolveDid smart contract method to resolve DID Document for an existing DID /// /// # Params /// - `client` client connected to the network where contract will be executed @@ -343,7 +343,7 @@ pub mod test { #[cfg(feature = "ledger_test")] pub async fn create_did(client: &LedgerClient) -> DidDocument { let did_doc = did_doc(None); - let _receipt = DidRegistry::create_did(&client, &TRUSTEE_ACC, &did_doc) + let _receipt = IndyDidRegistry::create_did(&client, &TRUSTEE_ACC, &did_doc) .await .unwrap(); did_doc @@ -364,7 +364,7 @@ pub mod test { fn build_create_did_transaction_test() { init_env_logger(); let client = client(None); - let transaction = DidRegistry::build_create_did_transaction( + let transaction = IndyDidRegistry::build_create_did_transaction( &client, &TRUSTEE_ACC, &did_doc(Some(ISSUER_ID)), @@ -509,7 +509,7 @@ pub mod test { also_known_as: Some(vec![]), }; let transaction = - DidRegistry::build_create_did_transaction(&client, &TRUSTEE_ACC, &did).unwrap(); + IndyDidRegistry::build_create_did_transaction(&client, &TRUSTEE_ACC, &did).unwrap(); let expected_transaction = Transaction { type_: TransactionType::Write, from: Some(TRUSTEE_ACC.clone()), @@ -683,7 +683,8 @@ pub mod test { init_env_logger(); let client = client(None); let transaction = - DidRegistry::build_resolve_did_transaction(&client, &DID::new(ISSUER_ID)).unwrap(); + IndyDidRegistry::build_resolve_did_transaction(&client, &DID::new(ISSUER_ID)) + .unwrap(); let expected_transaction = Transaction { type_: TransactionType::Read, from: None, @@ -798,7 +799,7 @@ pub mod test { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]; - let parsed_did_doc = DidRegistry::parse_resolve_did_result(&client, &data).unwrap(); + let parsed_did_doc = IndyDidRegistry::parse_resolve_did_result(&client, &data).unwrap(); assert_eq!(did_doc(Some(issuer_did)), parsed_did_doc); } } diff --git a/indy-besu/vdr/src/contracts/mod.rs b/indy-besu/vdr/src/contracts/mod.rs index 9060baa18..a1d25e29c 100644 --- a/indy-besu/vdr/src/contracts/mod.rs +++ b/indy-besu/vdr/src/contracts/mod.rs @@ -6,7 +6,7 @@ pub mod network; pub use auth::{Role, RoleControl}; pub use cl::{CredentialDefinition, CredentialDefinitionRegistry, Schema, SchemaRegistry}; pub use did::{ - DidDocument, DidDocumentWithMeta, DidRegistry, Service, ServiceEndpoint, StringOrVector, + DidDocument, DidDocumentWithMeta, IndyDidRegistry, Service, ServiceEndpoint, StringOrVector, VerificationMethod, VerificationMethodOrReference, }; pub use network::ValidatorControl; diff --git a/indy-besu/vdr/src/lib.rs b/indy-besu/vdr/src/lib.rs index d7824b8f2..a32d22827 100644 --- a/indy-besu/vdr/src/lib.rs +++ b/indy-besu/vdr/src/lib.rs @@ -19,7 +19,7 @@ pub use contracts::{ }, }, did::{ - did_registry::DidRegistry, + did_registry::IndyDidRegistry, types::{ did_doc::{DidDocument, VerificationKey, VerificationKeyType, DID}, did_doc_builder::DidDocumentBuilder, @@ -70,7 +70,8 @@ mod tests { // write let did_doc = did_doc(None); let transaction = - DidRegistry::build_create_did_transaction(&client, &TRUSTEE_ACC, &did_doc).unwrap(); + IndyDidRegistry::build_create_did_transaction(&client, &TRUSTEE_ACC, &did_doc) + .unwrap(); let signed_transaction = client.sign_transaction(&transaction).await.unwrap(); let block_hash = client .submit_transaction(&signed_transaction) @@ -83,9 +84,10 @@ mod tests { // read let transaction = - DidRegistry::build_resolve_did_transaction(&client, &did_doc.id).unwrap(); + IndyDidRegistry::build_resolve_did_transaction(&client, &did_doc.id).unwrap(); let result = client.submit_transaction(&transaction).await.unwrap(); - let resolved_did_doc = DidRegistry::parse_resolve_did_result(&client, &result).unwrap(); + let resolved_did_doc = + IndyDidRegistry::parse_resolve_did_result(&client, &result).unwrap(); assert_eq!(did_doc, resolved_did_doc); Ok(()) @@ -97,12 +99,12 @@ mod tests { // write let did_doc = did_doc(None); - let _receipt = DidRegistry::create_did(&client, &TRUSTEE_ACC, &did_doc) + let _receipt = IndyDidRegistry::create_did(&client, &TRUSTEE_ACC, &did_doc) .await .unwrap(); // read - let resolved_did_doc = DidRegistry::resolve_did(&client, &did_doc.id) + let resolved_did_doc = IndyDidRegistry::resolve_did(&client, &did_doc.id) .await .unwrap(); assert_eq!(did_doc, resolved_did_doc); @@ -116,13 +118,14 @@ mod tests { let second_client = create_client(TRUSTEE2_PRIVATE_KEY).await; let did_doc = did_doc(None); - let _receipt = DidRegistry::create_did(&first_client, &TRUSTEE_ACC, &did_doc) + let _receipt = IndyDidRegistry::create_did(&first_client, &TRUSTEE_ACC, &did_doc) .await .unwrap(); - let receipt = DidRegistry::deactivate_did(&second_client, &TRUSTEE2_ACC, &did_doc.id) - .await - .unwrap(); + let receipt = + IndyDidRegistry::deactivate_did(&second_client, &TRUSTEE2_ACC, &did_doc.id) + .await + .unwrap(); println!("Receipt: {}", receipt); Ok(()) @@ -134,19 +137,19 @@ mod tests { let second_client = create_client(TRUSTEE2_PRIVATE_KEY).await; let mut did_doc = did_doc(None); - let _receipt = DidRegistry::create_did(&first_client, &TRUSTEE_ACC, &did_doc) + let _receipt = IndyDidRegistry::create_did(&first_client, &TRUSTEE_ACC, &did_doc) .await .unwrap(); let old_context = did_doc.context; did_doc.context = StringOrVector::String("https://www.w3.org/ns/did/v2".to_string()); - let receipt = DidRegistry::update_did(&second_client, &TRUSTEE2_ACC, &did_doc) + let receipt = IndyDidRegistry::update_did(&second_client, &TRUSTEE2_ACC, &did_doc) .await .unwrap(); println!("Receipt: {}", receipt); - let not_updated_did_doc = DidRegistry::resolve_did(&first_client, &did_doc.id) + let not_updated_did_doc = IndyDidRegistry::resolve_did(&first_client, &did_doc.id) .await .unwrap(); @@ -265,7 +268,7 @@ mod tests { // create DID Document let did_doc = create_did(&client).await; - DidRegistry::resolve_did(&client, &did_doc.id) + IndyDidRegistry::resolve_did(&client, &did_doc.id) .await .unwrap();