diff --git a/.gitignore b/.gitignore index cda7d8b0..3faf563a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,11 @@ logs .idea vdr/out vdr/target +network/config/nodes/validator5/key # Blockscout blockscout-db-data redis-data stats-db-data + + diff --git a/docs/design/auth.md b/docs/design/auth.md index 39c8da27..f52a1b12 100644 --- a/docs/design/auth.md +++ b/docs/design/auth.md @@ -178,16 +178,21 @@ Contract name: **transactionAllowed** ### Account role management -| Contract | Method | Value | Required Role | Action Description | -|-------------|------------|------------|---------------|------------------------------------------| -| RoleControl | hasRole | - | any | Check if an account has a requested role | -| RoleControl | getRole | - | any | Get account role | -| RoleControl | assignRole | Trustee | Trustee | Assign Trustee role to an account | -| RoleControl | assignRole | Endorser | Trustee | Assign Endorser role to an account | -| RoleControl | assignRole | Steward | Trustee | Assign Steward role to an account | -| RoleControl | revokeRole | Trustee | Trustee | Revoke Trustee role from an account | -| RoleControl | revokeRole | Endorser | Trustee | Assign Endorser role to an account | -| RoleControl | revokeRole | Steward | Trustee | Assign Steward role to an account | +| Contract | Method | Value | Required Role | Action Description | +|-------------|-------------------------------|------------|---------------|----------------------------------------------------------------------------| +| RoleControl | hasRole | - | any | Check if an account has a requested role | +| RoleControl | getRole | - | any | Get account role | +| RoleControl | isTrustee | - | any | Ensure that account has a Trustee role assigned | +| RoleControl | isEndorser | - | any | Ensure that account has a Endorser role assigned | +| RoleControl | isSteward | - | any | Ensure that account has a Steward role assigned | +| RoleControl | isTrusteeOrEndorser | - | any | Ensure that account has either Trustee or Endorse role assigned | +| RoleControl | isTrusteeOrEndorserOrSteward | - | any | Ensure that account has either Trustee or Endorse or Steward role assigned | +| RoleControl | assignRole | Trustee | Trustee | Assign Trustee role to an account | +| RoleControl | assignRole | Endorser | Trustee | Assign Endorser role to an account | +| RoleControl | assignRole | Steward | Trustee | Assign Steward role to an account | +| RoleControl | revokeRole | Trustee | Trustee | Revoke Trustee role from an account | +| RoleControl | revokeRole | Endorser | Trustee | Assign Endorser role to an account | +| RoleControl | revokeRole | Steward | Trustee | Assign Steward role to an account | ### Validator nodes management @@ -197,23 +202,46 @@ Contract name: **transactionAllowed** | ValidatorControl | addValidator | Steward | Add new validator node | | ValidatorControl | removeValidator | Steward | Remove validator node | -### DID Document management - -| 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 | +### DID `indybesu` Registry management + +| Contract | Method | Required Role | Action Description | +|-------------------|---------------------|----------------------------|---------------------------------------------| +| IndyDidRegistry | createDid | Trustee, Endorser, Steward | Create a new DID Document | +| IndyDidRegistry | createDidSigned | Trustee, Endorser, Steward | Endorse creation of a new DID Document | +| IndyDidRegistry | updateDid | DID owner, Trustee | Update DID an existing Document | +| IndyDidRegistry | updateDidSigned | Trustee | Endorse update of an existing DID Document | +| IndyDidRegistry | deactivateDid | DID owner, Trustee | Deactivate an existing DID | +| IndyDidRegistry | deactivateDidSigned | Trustee | Endorse deactivation of an existing DID | +| IndyDidRegistry | resolveDid | any | Resolve DID Document for a DID | + +### DID `ethr` Registry management + +| Contract | Method | Required Role | Action Description | +|------------------------|-----------------------|---------------|---------------------------------------| +| EthereumExtDidRegistry | changeOwner | DID owner | Change DID owner | +| EthereumExtDidRegistry | changeOwnerSigned | DID owner | Endorse changing of a DID owner | +| EthereumExtDidRegistry | addDelegate | DID owner | Add a delegate key | +| EthereumExtDidRegistry | addDelegateSigned | DID owner | Endorse adding of a delegate key | +| EthereumExtDidRegistry | revokeDelegate | DID owner | Revoke a delegate key | +| EthereumExtDidRegistry | revokeDelegateSigned | DID owner | Endorse revoking of a delegate key | +| EthereumExtDidRegistry | setAttribute | DID owner | Add a DID attribute | +| EthereumExtDidRegistry | setAttributeSigned | DID owner | Endorse adding of a DID attribute | +| EthereumExtDidRegistry | revokeAttribute | DID owner | Revoke a DID attribute | +| EthereumExtDidRegistry | revokeAttributeSigned | DID owner | Endorse revoking of a DID attribute | +| EthereumExtDidRegistry | identityOwner | any | Get DID owner | +| EthereumExtDidRegistry | changed | any | Get block number of latest DID change | +| EthereumExtDidRegistry | nonce | any | Get nonce to signe for endorsing | ### CL Registry management -| Contract | Method | Required Role | Action Description | -|------------------------------|-----------------------------|-----------------------------|------------------------------------------| -| SchemaRegistry | createSchema | Trustee, Endorser, Steward | Create a new Schema | -| SchemaRegistry | resolveSchema | any | Resolve Schema by id | -| CredentialDefinitionRegistry | createCredentialDefinition | Trustee, Endorser, Steward | Create a new Credential Definition | -| CredentialDefinitionRegistry | resolveCredentialDefinition | any | Resolve Credential Definition by id | +| Contract | Method | Required Role | Action Description | +|------------------------------|----------------------------------|-----------------------------|-------------------------------------------------| +| SchemaRegistry | createSchema | Trustee, Endorser, Steward | Create a new Schema | +| SchemaRegistry | createSchemaSigned | Trustee, Endorser, Steward | Endorse creation of a new Schema | +| SchemaRegistry | resolveSchema | any | Resolve Schema by id | +| CredentialDefinitionRegistry | createCredentialDefinition | Trustee, Endorser, Steward | Create a new Credential Definition | +| CredentialDefinitionRegistry | createCredentialDefinitionSigned | Trustee, Endorser, Steward | Endorse creation of a new Credential Definition | +| CredentialDefinitionRegistry | resolveCredentialDefinition | any | Resolve Credential Definition by id | ### Contract upgrade management @@ -223,6 +251,17 @@ Contract name: **transactionAllowed** | UpgradeControl | approve | Trustee | Approve the upgrade of a specefic contract implementation | | UpgradeControl | ensureSufficientApprovals | any | Ensures that an implementation upgrade has received sufficient approvals | +### Legacy identifiers mapping + +| Contract | Method | Required Role | Action Description | +|--------------------------|-----------------------------|----------------------------|---------------------------------------------------------------------------------------------| +| LegacyMappingRegistry | createDidMapping | Trustee, Endorser, Steward | Create a new mapping of legacy indy/sov DID identifier to account address | +| LegacyMappingRegistry | createDidMappingSigned | Trustee, Endorser, Steward | Endorse creation a new mapping of legacy indy/sov DID identifier to account address | +| LegacyMappingRegistry | createResourceMapping | Trustee, Endorser, Steward | Create a new mapping of legacy schema/credential definition identifier to new one | +| LegacyMappingRegistry | createResourceMappingSigned | Trustee, Endorser, Steward | Endorse creation a new mapping of legacy schema/credential definition identifier to new one | +| LegacyMappingRegistry | didMapping | any | Resolve mapping account address for legacy DID identifier | +| LegacyMappingRegistry | resourceMapping | any | Resolve resource mapping for legacy idetifier | + ### General transactions management | Transaction | Required Role | Action Description | diff --git a/docs/design/cl-registry.md b/docs/design/cl-registry.md index 08597c16..7701c820 100644 --- a/docs/design/cl-registry.md +++ b/docs/design/cl-registry.md @@ -73,7 +73,9 @@ Contract name: **SchemaRegistry** * `schema` - AnonCreds schema JSON as bytes. * Restrictions: * Schema id must be unique. - * Corresponding issuer DID must exist, be active, and owned by sender. + * Sender is equal to identity. + * Corresponding issuer DID must exist, be active, and owned by identity. + * Sender must have either TRUSTEE or ENDORSER or STEWARD role assigned. * Format: ``` SchemaRegistry.createSchema( @@ -190,8 +192,10 @@ Contract name: **CredentialDefinitionRegistry** * `credDef` - AnonCreds Credential Definition JSON as bytes * Restrictions: * Credential Definition must be unique. - * Corresponding issuer DID must exist, be active, and owned by sender. + * Sender mus tbe equal to identity. + * Corresponding issuer DID must exist, be active, and owned by identity. * Corresponding schema must exist. + * Sender must have either TRUSTEE or ENDORSER or STEWARD role assigned. * Format: ``` CredentialDefinitionRegistry.createCredentialDefinition( diff --git a/docs/design/conmponents.png b/docs/design/conmponents.png index 400a613e..1293fdc2 100644 Binary files a/docs/design/conmponents.png and b/docs/design/conmponents.png differ diff --git a/docs/design/conmponents.puml b/docs/design/conmponents.puml index 0bb44028..af1ea080 100644 --- a/docs/design/conmponents.puml +++ b/docs/design/conmponents.puml @@ -12,6 +12,7 @@ package "Ethereum Network" { component [Universal Did Resolver] component [Schema Registry] component [Credential Definition Registry] + component [Legacy Mapping Registry] } } } diff --git a/docs/design/contracts.puml b/docs/design/contracts.puml index a0a644e2..07a0c85f 100644 --- a/docs/design/contracts.puml +++ b/docs/design/contracts.puml @@ -78,6 +78,13 @@ package "Smart Contracts" { Store CL Credential Definitions end note } + + package "Migration" { + component [Legacy Mapping Registry] + note bottom of [Legacy Mapping Registry] + Store Mapping for legacy DID/Schema/CredentialDefinition identifiers + end note + } } [Identity] --> [Role Control] @@ -86,6 +93,7 @@ package "Smart Contracts" { [Universal Did Resolver] --> [Ethereum Did Registry] [Schema Registry] --> [Universal Did Resolver] [Credential Definition Registry] --> [Universal Did Resolver] + [Legacy Mapping Registry] --> [Universal Did Resolver] } @enduml diff --git a/docs/design/indybesu-did-registry.md b/docs/design/indybesu-did-registry.md index b0594cf8..f314bba9 100644 --- a/docs/design/indybesu-did-registry.md +++ b/docs/design/indybesu-did-registry.md @@ -15,7 +15,6 @@ struct DidMetadata { address owner; - address sender; uint256 created; uint256 updated; uint256 versionId; @@ -44,7 +43,6 @@ "), metadata: { owner: 0x93917cadbace5dfce132b991732c6cda9bcc5b8a, - sender: 0x93917cadbace5dfce132b991732c6cda9bcc5b8a, created: 1234, updated: 1234, versionId: 1234, @@ -66,7 +64,6 @@ DID Document must match to the [specification](https://www.w3.org/TR/did-core/). Each DID Document MUST have a metadata section when a representation is produced. It can have the following properties: * owner (address): An address of DID owner -* sender (address): An address of DID Document sender * created (timestamp): Time of a block ordered a transaction for DID Doc creation * updated (timestamp): The updated field is null if an Update operation has never been performed on the DID document Time of a block ordered a transaction changed a DID Doc last time @@ -88,6 +85,8 @@ Contract name: **IndyDidRegistry** * Restrictions: * DID must not exist * Valid DID must be provided + * Sender must be equal to identity + * Sender must have either TRUSTEE or ENDORSER or STEWARD role assigned * Format: ``` IndyDidRegistry.createDid( @@ -115,7 +114,8 @@ Contract name: **IndyDidRegistry** * Restrictions: * DID must exist * DID must be active - * Sender must be authorized to perform update (owner or sender) + * Sender must be equal to identity + * Sender must be either identity owner or have a TRUSTEE role assigned * Format: ``` IndyDidRegistry.updateDid( @@ -138,11 +138,12 @@ Contract name: **IndyDidRegistry** * Method: `deactivateDid` * Description: Transaction to deactivate an existing DID * Parameters: - * `did` - Address of DID owner + * `identity` - Address of DID owner * Restrictions: * DID must exist * DID must be active - * Sender must be authorized to perform deactivation (owner or sender) + * Sender must be equal to identity + * Sender must be either identity owner or have a TRUSTEE role assigned * Format: ``` IndyDidRegistry.deactivateDid( diff --git a/network/config/besu/genesis.json b/network/config/besu/genesis.json index 260b5ac9..9dd0ab9f 100644 --- a/network/config/besu/genesis.json +++ b/network/config/besu/genesis.json @@ -80,12 +80,12 @@ "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000e4b52aa82142466f16866aab7df38ac244194ace" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000da385cc3489dab3d903a3faf644f91e44d2bece7" } }, - "0xe4b52aa82142466f16866aab7df38ac244194ace": { + "0xda385cc3489dab3d903a3faf644f91e44d2bece7": { "comment": "Implementation: Account permissioning smart contract", - "code": "0x60806040526004361061004a5760003560e01c8063485cc9551461004f5780634f1ef2861461007157806352d1902d14610084578063936421d5146100ac578063ad3cb1cc146100dc575b600080fd5b34801561005b57600080fd5b5061006f61006a36600461082c565b61011a565b005b61006f61007f366004610875565b610246565b34801561009057600080fd5b50610099610265565b6040519081526020015b60405180910390f35b3480156100b857600080fd5b506100cc6100c7366004610937565b610282565b60405190151581526020016100a3565b3480156100e857600080fd5b5061010d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a39190610a0c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156101605750825b905060008267ffffffffffffffff16600114801561017d5750303b155b90508115801561018b575080155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156101d357845460ff60401b1916600160401b1785555b600180546001600160a01b0319166001600160a01b0389161790556101f7866103a8565b831561023d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b61024e6103d2565b61025782610479565b61026182826104df565b5050565b600061026f6105a6565b50600080516020610ad183398151915290565b60006001600160a01b03871615801561030b575060018054604051634f4bdc7b60e11b81526001600160a01b0390911691639e97b8f6916102c891908c90600401610a3f565b602060405180830381865afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103099190610a79565b155b156103185750600061039d565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061034b906000908c90600401610a3f565b602060405180830381865afa158015610368573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038c9190610a79565b156103995750600061039d565b5060015b979650505050505050565b6103b06105ef565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061045957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661044d600080516020610ad1833981519152546001600160a01b031690565b6001600160a01b031614155b156104775760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610539575060408051601f3d908101601f1916820190925261053691810190610a9b565b60015b61056657604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610ad1833981519152811461059757604051632a87526960e21b81526004810182905260240161055d565b6105a18383610638565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104775760405163703e46dd60e11b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661047757604051631afcd79f60e31b815260040160405180910390fd5b6106418261068e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610686576105a182826106f3565b610261610769565b806001600160a01b03163b6000036106c457604051634c9c8ce360e01b81526001600160a01b038216600482015260240161055d565b600080516020610ad183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516107109190610ab4565b600060405180830381855af49150503d806000811461074b576040519150601f19603f3d011682016040523d82523d6000602084013e610750565b606091505b5091509150610760858383610788565b95945050505050565b34156104775760405163b398979f60e01b815260040160405180910390fd5b60608261079d57610798826107e7565b6107e0565b81511580156107b457506001600160a01b0384163b155b156107dd57604051639996b31560e01b81526001600160a01b038516600482015260240161055d565b50805b9392505050565b8051156107f75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461082757600080fd5b919050565b6000806040838503121561083f57600080fd5b61084883610810565b915061085660208401610810565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561088857600080fd5b61089183610810565b9150602083013567ffffffffffffffff808211156108ae57600080fd5b818501915085601f8301126108c257600080fd5b8135818111156108d4576108d461085f565b604051601f8201601f19908116603f011681019083821181831017156108fc576108fc61085f565b8160405282815288602084870101111561091557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060c0888a03121561095257600080fd5b61095b88610810565b965061096960208901610810565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8082111561099b57600080fd5b818a0191508a601f8301126109af57600080fd5b8135818111156109be57600080fd5b8b60208285010111156109d057600080fd5b60208301945080935050505092959891949750929550565b60005b83811015610a035781810151838201526020016109eb565b50506000910152565b6020815260008251806020840152610a2b8160408501602087016109e8565b601f01601f19169190910160400192915050565b6040810160048410610a6157634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b600060208284031215610a8b57600080fd5b815180151581146107e057600080fd5b600060208284031215610aad57600080fd5b5051919050565b60008251610ac68184602087016109e8565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122024c7a984c1746f95a2bb68bb5a8f4cbdcd789ffee8005f9c276c257eb25e2fb764736f6c63430008170033" + "code": "0x60806040526004361061004a5760003560e01c8063485cc9551461004f5780634f1ef2861461007157806352d1902d14610084578063936421d5146100ac578063ad3cb1cc146100dc575b600080fd5b34801561005b57600080fd5b5061006f61006a3660046107ab565b61011a565b005b61006f61007f3660046107f4565b610246565b34801561009057600080fd5b50610099610265565b6040519081526020015b60405180910390f35b3480156100b857600080fd5b506100cc6100c73660046108b6565b610282565b60405190151581526020016100a3565b3480156100e857600080fd5b5061010d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a3919061098b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156101605750825b905060008267ffffffffffffffff16600114801561017d5750303b155b90508115801561018b575080155b156101a95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156101d357845460ff60401b1916600160401b1785555b600180546001600160a01b0319166001600160a01b0389161790556101f786610327565b831561023d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b61024e610351565b610257826103f8565b610261828261045e565b5050565b600061026f610525565b50600080516020610a5083398151915290565b60006001600160a01b03871615801561030b575060018054604051634f4bdc7b60e11b81526001600160a01b0390911691639e97b8f6916102c891908c906004016109be565b602060405180830381865afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030991906109f8565b155b156103185750600061031c565b5060015b979650505050505050565b61032f61056e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806103d857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103cc600080516020610a50833981519152546001600160a01b031690565b6001600160a01b031614155b156103f65760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561044357600080fd5b505afa158015610457573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156104b8575060408051601f3d908101601f191682019092526104b591810190610a1a565b60015b6104e557604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610a50833981519152811461051657604051632a87526960e21b8152600481018290526024016104dc565b61052083836105b7565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103f65760405163703e46dd60e11b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166103f657604051631afcd79f60e31b815260040160405180910390fd5b6105c08261060d565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610605576105208282610672565b6102616106e8565b806001600160a01b03163b60000361064357604051634c9c8ce360e01b81526001600160a01b03821660048201526024016104dc565b600080516020610a5083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161068f9190610a33565b600060405180830381855af49150503d80600081146106ca576040519150601f19603f3d011682016040523d82523d6000602084013e6106cf565b606091505b50915091506106df858383610707565b95945050505050565b34156103f65760405163b398979f60e01b815260040160405180910390fd5b60608261071c5761071782610766565b61075f565b815115801561073357506001600160a01b0384163b155b1561075c57604051639996b31560e01b81526001600160a01b03851660048201526024016104dc565b50805b9392505050565b8051156107765780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b03811681146107a657600080fd5b919050565b600080604083850312156107be57600080fd5b6107c78361078f565b91506107d56020840161078f565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561080757600080fd5b6108108361078f565b9150602083013567ffffffffffffffff8082111561082d57600080fd5b818501915085601f83011261084157600080fd5b813581811115610853576108536107de565b604051601f8201601f19908116603f0116810190838211818310171561087b5761087b6107de565b8160405282815288602084870101111561089457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060c0888a0312156108d157600080fd5b6108da8861078f565b96506108e86020890161078f565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8082111561091a57600080fd5b818a0191508a601f83011261092e57600080fd5b81358181111561093d57600080fd5b8b602082850101111561094f57600080fd5b60208301945080935050505092959891949750929550565b60005b8381101561098257818101518382015260200161096a565b50506000910152565b60208152600082518060208401526109aa816040850160208701610967565b601f01601f19169190910160400192915050565b60408101600484106109e057634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b600060208284031215610a0a57600080fd5b8151801515811461075f57600080fd5b600060208284031215610a2c57600080fd5b5051919050565b60008251610a45818460208701610967565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dd71c3bbf155a41df61408debf2eb7d33112dc2b86106e30c69f07843aca2a5064736f6c63430008170033" }, "0x0000000000000000000000000000000000006666": { "comment": "Proxy: Smart contract to manage account roles", @@ -102,12 +102,12 @@ "88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c3": "0000000000000000000000000000000000000000000000000000000000000001", "a15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c": "0000000000000000000000000000000000000000000000000000000000000005", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000b916cf0bdb279c2d91fa7ab4b11d364ddaa8ae15" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000de262a8a005b5e422f66c9d9ced8ed7296293038" } }, - "0xb916cf0bdb279c2d91fa7ab4b11d364ddaa8ae15": { + "0xde262a8a005b5e422f66c9d9ced8ed7296293038": { "comment": "Implementation: Smart contract to manage account roles", - "code": "0x6080604052600436106100865760003560e01c806388a5bf6e1161005957806388a5bf6e146101425780639e97b8f614610162578063ad3cb1cc14610182578063c4d66de8146101c0578063d02971ca146101e057600080fd5b8063442767331461008b5780634cbb87d3146100da5780634f1ef2861461010a57806352d1902d1461011f575b600080fd5b34801561009757600080fd5b506100c46100a6366004610bc5565b6001600160a01b031660009081526001602052604090205460ff1690565b6040516100d19190610bf6565b60405180910390f35b3480156100e657600080fd5b506100fa6100f5366004610c2d565b610215565b60405190151581526020016100d1565b61011d610118366004610c76565b61037d565b005b34801561012b57600080fd5b5061013461039c565b6040519081526020016100d1565b34801561014e57600080fd5b506100c461015d366004610c2d565b6103b9565b34801561016e57600080fd5b506100fa61017d366004610c2d565b61052e565b34801561018e57600080fd5b506101b3604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100d19190610d5c565b3480156101cc57600080fd5b5061011d6101db366004610bc5565b610577565b3480156101ec57600080fd5b506102006101fb366004610d8f565b6106f2565b60405163ffffffff90911681526020016100d1565b60008260006002600083600381111561023057610230610be0565b600381111561024157610241610be0565b815260208101919091526040016000205460ff169050610261813361052e565b6102855760405163472511eb60e11b81523360048201526024015b60405180910390fd5b61028f858561052e565b15610370576001600160a01b0384166000908152600160205260408120805460ff1916905560039086828111156102c8576102c8610be0565b60038111156102d9576102d9610be0565b815260208101919091526040016000908120805463ffffffff16916102fd83610dc0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f5a8379f4a3380f87fd5924475f76a3471ac8d775668601653e3f9ef69a3dd2718760405161035f9190610bf6565b60405180910390a360019250610375565b600092505b505092915050565b610385610738565b61038e826107df565b6103988282610845565b5050565b60006103a6610907565b50600080516020610e3983398151915290565b6000826000600260008360038111156103d4576103d4610be0565b60038111156103e5576103e5610be0565b815260208101919091526040016000205460ff169050610405813361052e565b6104245760405163472511eb60e11b815233600482015260240161027c565b61042e858561052e565b610525576001600160a01b03841660009081526001602081905260409091208054879260ff199091169083600381111561046a5761046a610be0565b02179055506003600086600381111561048557610485610be0565b600381111561049657610496610be0565b815260208101919091526040016000908120805463ffffffff16916104ba83610de0565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f47307e88f3e82b4e8cdffde5a264aa53a2ee17636fd8df7effe0a098da4956568760405161051c9190610bf6565b60405180910390a35b50929392505050565b600082600381111561054257610542610be0565b6001600160a01b03831660009081526001602052604090205460ff16600381111561056f5761056f610be0565b149392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105c15750805467ffffffffffffffff808416911610155b156105df5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155610609610950565b60026020527fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e08054600160ff1991821681179092557f679795a0195a1b76cdebb7c51d74e058aee92919b8c3389af86ef24535e8a28c805482168317905560036000527f88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c3805490911690911790556106a08361095e565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006003600083600381111561070a5761070a610be0565b600381111561071b5761071b610be0565b815260208101919091526040016000205463ffffffff1692915050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806107bf57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107b3600080516020610e39833981519152546001600160a01b031690565b6001600160a01b031614155b156107dd5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561082a57600080fd5b505afa15801561083e573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e03565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b038316600482015260240161027c565b600080516020610e3983398151915281146108f857604051632a87526960e21b81526004810182905260240161027c565b6109028383610988565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107dd5760405163703e46dd60e11b815260040160405180910390fd5b61095b6001336103b9565b50565b6109666109de565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b61099182610a27565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156109d6576109028282610a8c565b610398610b02565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107dd57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610a5d57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161027c565b600080516020610e3983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610aa99190610e1c565b600060405180830381855af49150503d8060008114610ae4576040519150601f19603f3d011682016040523d82523d6000602084013e610ae9565b606091505b5091509150610af9858383610b21565b95945050505050565b34156107dd5760405163b398979f60e01b815260040160405180910390fd5b606082610b3657610b3182610b80565b610b79565b8151158015610b4d57506001600160a01b0384163b155b15610b7657604051639996b31560e01b81526001600160a01b038516600482015260240161027c565b50805b9392505050565b805115610b905780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610bc057600080fd5b919050565b600060208284031215610bd757600080fd5b610b7982610ba9565b634e487b7160e01b600052602160045260246000fd5b6020810160048310610c1857634e487b7160e01b600052602160045260246000fd5b91905290565b803560048110610bc057600080fd5b60008060408385031215610c4057600080fd5b610c4983610c1e565b9150610c5760208401610ba9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c8957600080fd5b610c9283610ba9565b9150602083013567ffffffffffffffff80821115610caf57600080fd5b818501915085601f830112610cc357600080fd5b813581811115610cd557610cd5610c60565b604051601f8201601f19908116603f01168101908382118183101715610cfd57610cfd610c60565b81604052828152886020848701011115610d1657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610d53578181015183820152602001610d3b565b50506000910152565b6020815260008251806020840152610d7b816040850160208701610d38565b601f01601f19169190910160400192915050565b600060208284031215610da157600080fd5b610b7982610c1e565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff821680610dd657610dd6610daa565b6000190192915050565b600063ffffffff808316818103610df957610df9610daa565b6001019392505050565b600060208284031215610e1557600080fd5b5051919050565b60008251610e2e818460208701610d38565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201732ba2607bd323ad6b9ab7eaab6517fb63fd8cc432dcc9caa62384d439517ce64736f6c63430008170033" + "code": "0x6080604052600436106100dd5760003560e01c80639da13ae41161007f578063c4d66de811610059578063c4d66de814610277578063c784cd1714610297578063d02971ca146102b7578063df283017146102ec57600080fd5b80639da13ae4146101f95780639e97b8f614610219578063ad3cb1cc1461023957600080fd5b80634cbb87d3116100bb5780634cbb87d3146101735780634f1ef286146101a357806352d1902d146101b657806388a5bf6e146101d957600080fd5b8063013d7444146100e2578063076bca6c146101045780634427673314610124575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610dfb565b61030c565b005b34801561011057600080fd5b5061010261011f366004610dfb565b61036d565b34801561013057600080fd5b5061015d61013f366004610dfb565b6001600160a01b031660009081526001602052604090205460ff1690565b60405161016a9190610e2c565b60405180910390f35b34801561017f57600080fd5b5061019361018e366004610e63565b610409565b604051901515815260200161016a565b6101026101b1366004610eac565b61056c565b3480156101c257600080fd5b506101cb610587565b60405190815260200161016a565b3480156101e557600080fd5b5061015d6101f4366004610e63565b6105a4565b34801561020557600080fd5b50610102610214366004610dfb565b610719565b34801561022557600080fd5b50610193610234366004610e63565b610720565b34801561024557600080fd5b5061026a604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161016a9190610f92565b34801561028357600080fd5b50610102610292366004610dfb565b610769565b3480156102a357600080fd5b506101026102b2366004610dfb565b6108e4565b3480156102c357600080fd5b506102d76102d2366004610fc5565b6108eb565b60405163ffffffff909116815260200161016a565b3480156102f857600080fd5b50610102610307366004610dfb565b610931565b60025b6001600160a01b03821660009081526001602052604090205460ff16600381111561033c5761033c610e16565b1461036a5760405163472511eb60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b50565b6001600160a01b03811660009081526001602052604090205460ff16600281600381111561039d5761039d610e16565b141580156103bd575060018160038111156103ba576103ba610e16565b14155b80156103dc575060035b8160038111156103d9576103d9610e16565b14155b156104055760405163472511eb60e11b81526001600160a01b0383166004820152602401610361565b5050565b60008260006002600083600381111561042457610424610e16565b600381111561043557610435610e16565b815260208101919091526040016000205460ff1690506104558133610720565b6104745760405163472511eb60e11b8152336004820152602401610361565b61047e8585610720565b1561055f576001600160a01b0384166000908152600160205260408120805460ff1916905560039086828111156104b7576104b7610e16565b60038111156104c8576104c8610e16565b815260208101919091526040016000908120805463ffffffff16916104ec83610ff6565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f5a8379f4a3380f87fd5924475f76a3471ac8d775668601653e3f9ef69a3dd2718760405161054e9190610e2c565b60405180910390a360019250610564565b600092505b505092915050565b610574610971565b61057d82610a18565b6104058282610a7e565b6000610591610b40565b5060008051602061106f83398151915290565b6000826000600260008360038111156105bf576105bf610e16565b60038111156105d0576105d0610e16565b815260208101919091526040016000205460ff1690506105f08133610720565b61060f5760405163472511eb60e11b8152336004820152602401610361565b6106198585610720565b610710576001600160a01b03841660009081526001602081905260409091208054879260ff199091169083600381111561065557610655610e16565b02179055506003600086600381111561067057610670610e16565b600381111561068157610681610e16565b815260208101919091526040016000908120805463ffffffff16916106a583611016565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316846001600160a01b03167f47307e88f3e82b4e8cdffde5a264aa53a2ee17636fd8df7effe0a098da495656876040516107079190610e2c565b60405180910390a35b50929392505050565b600361030f565b600082600381111561073457610734610e16565b6001600160a01b03831660009081526001602052604090205460ff16600381111561076157610761610e16565b149392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806107b35750805467ffffffffffffffff808416911610155b156107d15760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556107fb610b89565b60026020527fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e08054600160ff1991821681179092557f679795a0195a1b76cdebb7c51d74e058aee92919b8c3389af86ef24535e8a28c805482168317905560036000527f88601476d11616a71c5be67555bd1dff4b1cbf21533d2669b768b61518cfe1c38054909116909117905561089283610b94565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600161030f565b60006003600083600381111561090357610903610e16565b600381111561091457610914610e16565b815260208101919091526040016000205463ffffffff1692915050565b6001600160a01b03811660009081526001602052604090205460ff16600281600381111561096157610961610e16565b141580156103dc575060016103c7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806109f857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109ec60008051602061106f833981519152546001600160a01b031690565b6001600160a01b031614155b15610a165760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ad8575060408051601f3d908101601f19168201909252610ad591810190611039565b60015b610b0057604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610361565b60008051602061106f8339815191528114610b3157604051632a87526960e21b815260048101829052602401610361565b610b3b8383610bbe565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a165760405163703e46dd60e11b815260040160405180910390fd5b61036a6001336105a4565b610b9c610c14565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610bc782610c5d565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610c0c57610b3b8282610cc2565b610405610d38565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610a1657604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610c9357604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610361565b60008051602061106f83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610cdf9190611052565b600060405180830381855af49150503d8060008114610d1a576040519150601f19603f3d011682016040523d82523d6000602084013e610d1f565b606091505b5091509150610d2f858383610d57565b95945050505050565b3415610a165760405163b398979f60e01b815260040160405180910390fd5b606082610d6c57610d6782610db6565b610daf565b8151158015610d8357506001600160a01b0384163b155b15610dac57604051639996b31560e01b81526001600160a01b0385166004820152602401610361565b50805b9392505050565b805115610dc65780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610df657600080fd5b919050565b600060208284031215610e0d57600080fd5b610daf82610ddf565b634e487b7160e01b600052602160045260246000fd5b6020810160048310610e4e57634e487b7160e01b600052602160045260246000fd5b91905290565b803560048110610df657600080fd5b60008060408385031215610e7657600080fd5b610e7f83610e54565b9150610e8d60208401610ddf565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610ebf57600080fd5b610ec883610ddf565b9150602083013567ffffffffffffffff80821115610ee557600080fd5b818501915085601f830112610ef957600080fd5b813581811115610f0b57610f0b610e96565b604051601f8201601f19908116603f01168101908382118183101715610f3357610f33610e96565b81604052828152886020848701011115610f4c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610f89578181015183820152602001610f71565b50506000910152565b6020815260008251806020840152610fb1816040850160208701610f6e565b601f01601f19169190910160400192915050565b600060208284031215610fd757600080fd5b610daf82610e54565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff82168061100c5761100c610fe0565b6000190192915050565b600063ffffffff80831681810361102f5761102f610fe0565b6001019392505050565b60006020828403121561104b57600080fd5b5051919050565b60008251611064818460208701610f6e565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220a329dc24cb52879e6ed49355ee49de0d28574fc8e81b83fafb7c1aa71a668cb964736f6c63430008170033" }, "0x0000000000000000000000000000000000007777": { "comment": "Proxy: Smart contract to manage validator nodes", @@ -125,12 +125,12 @@ "149d22bf3f008a1407770ecbdb723975d92c5073caa510ba413c1db0f8063ed8": "0000000000000000000000886328869e4e1f401e1052a5f4aae8b45f42610201", "7f33ce678224e207038746a5939df116c5dff1ccc6e79de84c95388c521e898c": "000000000000000000000f48de4a0c2939e62891f3c6aca68982975477e45301", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000005ba18f9ac09815e3e955999bf8962f49bcaaba2c" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000574d1ff6ba07746f04b7d55cfca416ea8b6254cf" } }, - "0x5ba18f9ac09815e3e955999bf8962f49bcaaba2c": { + "0x574d1ff6ba07746f04b7d55cfca416ea8b6254cf": { "comment": "Implementation: Smart contract to manage validator nodes", - "code": "0x6080604052600436106100705760003560e01c806352d1902d1161004e57806352d1902d146100ca57806398772d88146100f2578063ad3cb1cc14610112578063b7ab4db51461015057600080fd5b806340a141ff146100755780634d238c8e146100975780634f1ef286146100b7575b600080fd5b34801561008157600080fd5b50610095610090366004610eff565b610172565b005b3480156100a357600080fd5b506100956100b2366004610eff565b610430565b6100956100c5366004610f8a565b610718565b3480156100d657600080fd5b506100df610737565b6040519081526020015b60405180910390f35b3480156100fe57600080fd5b5061009561010d366004611030565b610754565b34801561011e57600080fd5b50610143604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100e99190611151565b34801561015c57600080fd5b50610165610a1c565b6040516100e99190611184565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906101a59060039033906004016111d1565b602060405180830381865afa1580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e6919061120b565b61020a5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b806001600160a01b0381166102325760405163713ce51160e01b815260040160405180910390fd5b6002546001036102555760405163f1a1929360e01b815260040160405180910390fd5b6001600160a01b03828116600090815260036020908152604091829020825180840190935254928316808352600160a01b90930460ff1690820152906102b957604051635a4887e160e01b81526001600160a01b0384166004820152602401610201565b600081602001519050600060028260ff16815481106102da576102da61122d565b6000918252602082200154600280546001600160a01b0390921693509061030390600190611243565b815481106103135761031361122d565b600091825260209091200154600280546001600160a01b039092169250829160ff86169081106103455761034561122d565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600390915260409020805460ff60a01b1916600160a01b60ff86160217905560028054806103a2576103a2611264565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0384168083526003825260409283902080546001600160a81b0319169055600254925160ff9093168352339290917fb10fc4fba5b5eb2a6e82796887299220653537d6a5fc8a3fb60937bd2442ea29910160405180910390a3505050505050565b600154604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906104639060039033906004016111d1565b602060405180830381865afa158015610480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a4919061120b565b6104c35760405163472511eb60e11b8152336004820152602401610201565b806001600160a01b0381166104eb5760405163713ce51160e01b815260040160405180910390fd5b6002546101001161051357604051635dd7a94360e11b81526101006004820152602401610201565b60025460005b8160ff168160ff16101561063f5760006003600060028460ff16815481106105435761054361122d565b60009182526020808320909101546001600160a01b039081168452838201949094526040928301909120825180840190935254928316825260ff600160a01b909304831690820152600280549193509184169081106105a4576105a461122d565b6000918252602090912001546001600160a01b039081169086160361060a5760028260ff16815481106105d9576105d961122d565b60009182526020909120015460405163164688df60e21b81526001600160a01b039091166004820152602401610201565b80516001600160a01b0316330361063657604051635154e66760e11b8152336004820152602401610201565b50600101610519565b506040805180820182523380825260ff84811660208085019182526001600160a01b038981166000818152600384528881209751885495518716600160a01b026001600160a81b03199096169316929092179390931790955560028054600181018255958190527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90950180546001600160a01b0319168317905593549451949091168452909290917f4583e1f70afe5f9f38886187732a4b1336bad46fc758cdd6ad86815931d6f6c2910160405180910390a3505050565b610720610a7e565b61072982610b25565b6107338282610b8b565b5050565b6000610741610c4d565b506000805160206112b083398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061079e5750805467ffffffffffffffff808416911610155b156107bc5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155825160000361080057604051635a7582eb60e11b815260040160405180910390fd5b82516101001161082757604051635dd7a94360e11b81526101006004820152602401610201565b60005b83518110156109a35760006001600160a01b03168482815181106108505761085061122d565b6020026020010151602001516001600160a01b0316036108835760405163d4c3bd5160e01b815260040160405180910390fd5b60006001600160a01b03168482815181106108a0576108a061122d565b6020026020010151600001516001600160a01b0316036108d35760405163713ce51160e01b815260040160405180910390fd5b60008482815181106108e7576108e761122d565b6020908102919091018101518051600280546001818101835560009283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180546001600160a01b039485166001600160a01b0319909116179055604080518082018252858701518516815260ff808a1682890190815296518616855260039097529220915182549451909516600160a01b026001600160a81b031990941694909216939093179190911790915591909101905061082a565b50600180546001600160a01b0319166001600160a01b0387161790556109c884610c96565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020018280548015610a7457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a56575b5050505050905090565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610b0557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610af96000805160206112b0833981519152546001600160a01b031690565b6001600160a01b031614155b15610b235760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610b7057600080fd5b505afa158015610b84573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610be5575060408051601f3d908101601f19168201909252610be29181019061127a565b60015b610c0d57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610201565b6000805160206112b08339815191528114610c3e57604051632a87526960e21b815260048101829052602401610201565b610c488383610cc0565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b235760405163703e46dd60e11b815260040160405180910390fd5b610c9e610d16565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610cc982610d5f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610d0e57610c488282610dc4565b610733610e3c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b2357604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610d9557604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610201565b6000805160206112b083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610de19190611293565b600060405180830381855af49150503d8060008114610e1c576040519150601f19603f3d011682016040523d82523d6000602084013e610e21565b606091505b5091509150610e31858383610e5b565b925050505b92915050565b3415610b235760405163b398979f60e01b815260040160405180910390fd5b606082610e7057610e6b82610eba565b610eb3565b8151158015610e8757506001600160a01b0384163b155b15610eb057604051639996b31560e01b81526001600160a01b0385166004820152602401610201565b50805b9392505050565b805115610eca5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610efa57600080fd5b919050565b600060208284031215610f1157600080fd5b610eb382610ee3565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610f5357610f53610f1a565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610f8257610f82610f1a565b604052919050565b60008060408385031215610f9d57600080fd5b610fa683610ee3565b915060208084013567ffffffffffffffff80821115610fc457600080fd5b818601915086601f830112610fd857600080fd5b813581811115610fea57610fea610f1a565b610ffc601f8201601f19168501610f59565b9150808252878482850101111561101257600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060006060848603121561104557600080fd5b61104e84610ee3565b9250602061105d818601610ee3565b925060408086013567ffffffffffffffff8082111561107b57600080fd5b818801915088601f83011261108f57600080fd5b8135818111156110a1576110a1610f1a565b6110af858260051b01610f59565b818152858101925060069190911b83018501908a8211156110cf57600080fd5b928501925b8184101561111d5784848c0312156110ec5760008081fd5b6110f4610f30565b6110fd85610ee3565b815261110a878601610ee3565b81880152835292840192918501916110d4565b8096505050505050509250925092565b60005b83811015611148578181015183820152602001611130565b50506000910152565b602081526000825180602084015261117081604085016020870161112d565b601f01601f19169190910160400192915050565b6020808252825182820181905260009190848201906040850190845b818110156111c55783516001600160a01b0316835292840192918401916001016111a0565b50909695505050505050565b60408101600484106111f357634e487b7160e01b600052602160045260246000fd5b9281526001600160a01b039190911660209091015290565b60006020828403121561121d57600080fd5b81518015158114610eb357600080fd5b634e487b7160e01b600052603260045260246000fd5b81810381811115610e3657634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006020828403121561128c57600080fd5b5051919050565b600082516112a581846020870161112d565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220bcbd3b9c450d49e9afc43b6469dd3f2303a44f81e42def0b1bb1e8d14ce15af464736f6c63430008170033" + "code": "0x6080604052600436106100705760003560e01c806352d1902d1161004e57806352d1902d146100ca57806398772d88146100f2578063ad3cb1cc14610112578063b7ab4db51461015057600080fd5b806340a141ff146100755780634d238c8e146100975780634f1ef286146100b7575b600080fd5b34801561008157600080fd5b50610095610090366004610e93565b610172565b005b3480156100a357600080fd5b506100956100b2366004610e93565b6103fa565b6100956100c5366004610f1e565b6106ac565b3480156100d657600080fd5b506100df6106cb565b6040519081526020015b60405180910390f35b3480156100fe57600080fd5b5061009561010d366004610fc4565b6106e8565b34801561011e57600080fd5b50610143604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100e991906110e5565b34801561015c57600080fd5b506101656109b0565b6040516100e99190611118565b6001546040516327684eb960e21b81523360048201526001600160a01b0390911690639da13ae49060240160006040518083038186803b1580156101b557600080fd5b505afa1580156101c9573d6000803e3d6000fd5b50839250506001600160a01b03821690506101f75760405163713ce51160e01b815260040160405180910390fd5b60025460010361021a5760405163f1a1929360e01b815260040160405180910390fd5b6001600160a01b03828116600090815260036020908152604091829020825180840190935254928316808352600160a01b90930460ff16908201529061028357604051635a4887e160e01b81526001600160a01b03841660048201526024015b60405180910390fd5b600081602001519050600060028260ff16815481106102a4576102a4611165565b6000918252602082200154600280546001600160a01b039092169350906102cd9060019061117b565b815481106102dd576102dd611165565b600091825260209091200154600280546001600160a01b039092169250829160ff861690811061030f5761030f611165565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600390915260409020805460ff60a01b1916600160a01b60ff861602179055600280548061036c5761036c61119c565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0384168083526003825260409283902080546001600160a81b0319169055600254925160ff9093168352339290917fb10fc4fba5b5eb2a6e82796887299220653537d6a5fc8a3fb60937bd2442ea29910160405180910390a3505050505050565b6001546040516327684eb960e21b81523360048201526001600160a01b0390911690639da13ae49060240160006040518083038186803b15801561043d57600080fd5b505afa158015610451573d6000803e3d6000fd5b50839250506001600160a01b038216905061047f5760405163713ce51160e01b815260040160405180910390fd5b600254610100116104a757604051635dd7a94360e11b8152610100600482015260240161027a565b60025460005b8160ff168160ff1610156105d35760006003600060028460ff16815481106104d7576104d7611165565b60009182526020808320909101546001600160a01b039081168452838201949094526040928301909120825180840190935254928316825260ff600160a01b9093048316908201526002805491935091841690811061053857610538611165565b6000918252602090912001546001600160a01b039081169086160361059e5760028260ff168154811061056d5761056d611165565b60009182526020909120015460405163164688df60e21b81526001600160a01b03909116600482015260240161027a565b80516001600160a01b031633036105ca57604051635154e66760e11b815233600482015260240161027a565b506001016104ad565b506040805180820182523380825260ff84811660208085019182526001600160a01b038981166000818152600384528881209751885495518716600160a01b026001600160a81b03199096169316929092179390931790955560028054600181018255958190527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90950180546001600160a01b0319168317905593549451949091168452909290917f4583e1f70afe5f9f38886187732a4b1336bad46fc758cdd6ad86815931d6f6c2910160405180910390a3505050565b6106b4610a12565b6106bd82610ab9565b6106c78282610b1f565b5050565b60006106d5610be1565b506000805160206111e883398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806107325750805467ffffffffffffffff808416911610155b156107505760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155825160000361079457604051635a7582eb60e11b815260040160405180910390fd5b8251610100116107bb57604051635dd7a94360e11b8152610100600482015260240161027a565b60005b83518110156109375760006001600160a01b03168482815181106107e4576107e4611165565b6020026020010151602001516001600160a01b0316036108175760405163d4c3bd5160e01b815260040160405180910390fd5b60006001600160a01b031684828151811061083457610834611165565b6020026020010151600001516001600160a01b0316036108675760405163713ce51160e01b815260040160405180910390fd5b600084828151811061087b5761087b611165565b6020908102919091018101518051600280546001818101835560009283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180546001600160a01b039485166001600160a01b0319909116179055604080518082018252858701518516815260ff808a1682890190815296518616855260039097529220915182549451909516600160a01b026001600160a81b03199094169490921693909317919091179091559190910190506107be565b50600180546001600160a01b0319166001600160a01b03871617905561095c84610c2a565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020018280548015610a0857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109ea575b5050505050905090565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610a9957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a8d6000805160206111e8833981519152546001600160a01b031690565b6001600160a01b031614155b15610ab75760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b158015610b0457600080fd5b505afa158015610b18573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610b79575060408051601f3d908101601f19168201909252610b76918101906111b2565b60015b610ba157604051634c9c8ce360e01b81526001600160a01b038316600482015260240161027a565b6000805160206111e88339815191528114610bd257604051632a87526960e21b81526004810182905260240161027a565b610bdc8383610c54565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ab75760405163703e46dd60e11b815260040160405180910390fd5b610c32610caa565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610c5d82610cf3565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610ca257610bdc8282610d58565b6106c7610dd0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610ab757604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610d2957604051634c9c8ce360e01b81526001600160a01b038216600482015260240161027a565b6000805160206111e883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610d7591906111cb565b600060405180830381855af49150503d8060008114610db0576040519150601f19603f3d011682016040523d82523d6000602084013e610db5565b606091505b5091509150610dc5858383610def565b925050505b92915050565b3415610ab75760405163b398979f60e01b815260040160405180910390fd5b606082610e0457610dff82610e4e565b610e47565b8151158015610e1b57506001600160a01b0384163b155b15610e4457604051639996b31560e01b81526001600160a01b038516600482015260240161027a565b50805b9392505050565b805115610e5e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610e8e57600080fd5b919050565b600060208284031215610ea557600080fd5b610e4782610e77565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610ee757610ee7610eae565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610f1657610f16610eae565b604052919050565b60008060408385031215610f3157600080fd5b610f3a83610e77565b915060208084013567ffffffffffffffff80821115610f5857600080fd5b818601915086601f830112610f6c57600080fd5b813581811115610f7e57610f7e610eae565b610f90601f8201601f19168501610eed565b91508082528784828501011115610fa657600080fd5b80848401858401376000848284010152508093505050509250929050565b600080600060608486031215610fd957600080fd5b610fe284610e77565b92506020610ff1818601610e77565b925060408086013567ffffffffffffffff8082111561100f57600080fd5b818801915088601f83011261102357600080fd5b81358181111561103557611035610eae565b611043858260051b01610eed565b818152858101925060069190911b83018501908a82111561106357600080fd5b928501925b818410156110b15784848c0312156110805760008081fd5b611088610ec4565b61109185610e77565b815261109e878601610e77565b8188015283529284019291850191611068565b8096505050505050509250925092565b60005b838110156110dc5781810151838201526020016110c4565b50506000910152565b60208152600082518060208401526111048160408501602087016110c1565b601f01601f19169190910160400192915050565b6020808252825182820181905260009190848201906040850190845b818110156111595783516001600160a01b031683529284019291840191600101611134565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610dca57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000602082840312156111c457600080fd5b5051919050565b600082516111dd8184602087016110c1565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122075a298dbf9a0d9084b969c5a98968c849b02b5de06e3105d0dcd6de7bf46685c64736f6c63430008170033" }, "0x0000000000000000000000000000000000009999": { "comment": "Proxy: Smart contract to manage proxy contract upgrades", @@ -138,25 +138,26 @@ "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000b194eabbb2d2cc4180093e0df47bb231658c407e" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000b3675c3df39ffb648f3bd7a439d55b0febba54a8" } }, - "0xb194eabbb2d2cc4180093e0df47bb231658c407e": { + "0xb3675c3df39ffb648f3bd7a439d55b0febba54a8": { "comment": "Implementation: Smart contract to manage proxy contract upgrades", - "code": "0x6080604052600436106100705760003560e01c80637e5465ba1161004e5780637e5465ba146100d2578063ad3cb1cc146100f2578063c4d66de814610130578063e8f158641461015057600080fd5b80634f1ef2861461007557806352d1902d1461008a578063574a81d7146100b2575b600080fd5b610088610083366004610c59565b610170565b005b34801561009657600080fd5b5061009f61018f565b6040519081526020015b60405180910390f35b3480156100be57600080fd5b506100886100cd366004610d1b565b6101ac565b3480156100de57600080fd5b506100886100ed366004610d1b565b6101d3565b3480156100fe57600080fd5b50610123604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a99190610d72565b34801561013c57600080fd5b5061008861014b366004610da5565b610475565b34801561015c57600080fd5b5061008861016b366004610d1b565b610565565b610178610791565b61018182610838565b61018b8282610845565b5050565b6000610199610902565b50600080516020610f6083398151915290565b6101b6828261094b565b61018b57604051638af69cf160e01b815260040160405180910390fd5b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610206906001903390600401610de2565b602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610e08565b61026b5760405163472511eb60e11b81523360048201526024015b60405180910390fd5b6001600160a01b0380831660009081526001602090815260408083209385168352929052908120600201548391839190036102cc57604051633af3b55760e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b0380851660009081526001602090815260408083209387168352928152828220338352905220548490849060ff1615610332576040516316d5788b60e31b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038087166000908152600160208181526040808420948a16808552858352818520338652808452918520805460ff191685179055845293905291909101805463ffffffff169161038883610e40565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316856001600160a01b0316876001600160a01b03167fc42e62d9f6b29d37599fcb472a6f30bc6e8c8d6fbbcb774ac585c02b314bd2ad60405160405180910390a46103fb868661094b565b1561046d576040805163278f794360e11b81526001600160a01b03878116600483015260248201929092526000604482015290871690634f1ef28690606401600060405180830381600087803b15801561045457600080fd5b505af1158015610468573d6000803e3d6000fd5b505050505b505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104bf5750805467ffffffffffffffff808416911610155b156104dd5760405163f92ee8a960e01b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815468ff0000000000000000191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690610598906001903390600401610de2565b602060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610e08565b6105f85760405163472511eb60e11b8152336004820152602401610262565b80806001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610653575060408051601f3d908101601f1916820190925261065091810190610e63565b60015b61067b57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915281146106ac57604051632a87526960e21b815260048101829052602401610262565b6001600160a01b03808516600090815260016020908152604080832093871683529290522060020154849084901561070a57604051634cc571cf60e01b81526001600160a01b03808416600483015282166024820152604401610262565b6001600160a01b038681166000818152600160208181526040808420958b16808552959091528083209182018054640100000000600160c01b031916336401000000008102919091179091554260029093019290925551909392917fe33956f8d60ae2b38d9860e46ec9b53d8fb58aa99a9404b1195b7ce35d2941dc91a45050505b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061081857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661080c600080516020610f60833981519152546001600160a01b031690565b6001600160a01b031614155b156108365760405163703e46dd60e11b815260040160405180910390fd5b565b61084230826101ac565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561089f575060408051601f3d908101601f1916820190925261089c91810190610e63565b60015b6108c757604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610262565b600080516020610f6083398151915281146108f857604051632a87526960e21b815260048101829052602401610262565b61078c8383610a28565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108365760405163703e46dd60e11b815260040160405180910390fd5b60008054604051636814b8e560e11b815282916001600160a01b03169063d02971ca9061097d90600190600401610e7c565b602060405180830381865afa15801561099a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109be9190610e8a565b6001600160a01b03808616600090815260016020818152604080842094891684529390529181209091015491925063ffffffff90911690610a0a610a03846006610eb0565b600a610a7e565b90508063ffffffff168263ffffffff16101593505050505b92915050565b610a3182610aa8565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a765761078c8282610b0d565b61018b610b83565b600081610a8c600185610ed8565b610a969190610ef5565b610aa1906001610f26565b9392505050565b806001600160a01b03163b600003610ade57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610262565b600080516020610f6083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610b2a9190610f43565b600060405180830381855af49150503d8060008114610b65576040519150601f19603f3d011682016040523d82523d6000602084013e610b6a565b606091505b5091509150610b7a858383610ba2565b95945050505050565b34156108365760405163b398979f60e01b815260040160405180910390fd5b606082610bb757610bb282610bfe565b610aa1565b8151158015610bce57506001600160a01b0384163b155b15610bf757604051639996b31560e01b81526001600160a01b0385166004820152602401610262565b5092915050565b805115610c0e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610c3e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c6c57600080fd5b610c7583610c27565b9150602083013567ffffffffffffffff80821115610c9257600080fd5b818501915085601f830112610ca657600080fd5b813581811115610cb857610cb8610c43565b604051601f8201601f19908116603f01168101908382118183101715610ce057610ce0610c43565b81604052828152886020848701011115610cf957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060408385031215610d2e57600080fd5b610d3783610c27565b9150610d4560208401610c27565b90509250929050565b60005b83811015610d69578181015183820152602001610d51565b50506000910152565b6020815260008251806020840152610d91816040850160208701610d4e565b601f01601f19169190910160400192915050565b600060208284031215610db757600080fd5b610aa182610c27565b60048110610dde57634e487b7160e01b600052602160045260246000fd5b9052565b60408101610df08285610dc0565b6001600160a01b039290921660209190910152919050565b600060208284031215610e1a57600080fd5b81518015158114610aa157600080fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103610e5957610e59610e2a565b6001019392505050565b600060208284031215610e7557600080fd5b5051919050565b60208101610a228284610dc0565b600060208284031215610e9c57600080fd5b815163ffffffff81168114610aa157600080fd5b63ffffffff818116838216028082169190828114610ed057610ed0610e2a565b505092915050565b63ffffffff828116828216039080821115610bf757610bf7610e2a565b600063ffffffff80841680610f1a57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b63ffffffff818116838216019080821115610bf757610bf7610e2a565b60008251610f55818460208701610d4e565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e2a4e2c158ec7d38443cf09da5dacb8f5d2cef32752a3b7a150d8d9a0a5dc4f264736f6c63430008170033" + "code": "0x6080604052600436106100705760003560e01c80637e5465ba1161004e5780637e5465ba146100d2578063ad3cb1cc146100f2578063c4d66de814610130578063e8f158641461015057600080fd5b80634f1ef2861461007557806352d1902d1461008a578063574a81d7146100b2575b600080fd5b610088610083366004610be2565b610170565b005b34801561009657600080fd5b5061009f61018f565b6040519081526020015b60405180910390f35b3480156100be57600080fd5b506100886100cd366004610ca4565b6101ac565b3480156100de57600080fd5b506100886100ed366004610ca4565b6101d3565b3480156100fe57600080fd5b50610123604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100a99190610cfb565b34801561013c57600080fd5b5061008861014b366004610d2e565b61043c565b34801561015c57600080fd5b5061008861016b366004610ca4565b61052c565b610178610720565b610181826107c7565b61018b82826107d4565b5050565b6000610199610891565b50600080516020610e9983398151915290565b6101b682826108da565b61018b57604051638af69cf160e01b815260040160405180910390fd5b60005460405163c784cd1760e01b81523360048201526001600160a01b039091169063c784cd179060240160006040518083038186803b15801561021657600080fd5b505afa15801561022a573d6000803e3d6000fd5b5050506001600160a01b03808416600090815260016020908152604080832093861683529290529081206002015484925083910361029357604051633af3b55760e01b81526001600160a01b038084166004830152821660248201526044015b60405180910390fd5b6001600160a01b0380851660009081526001602090815260408083209387168352928152828220338352905220548490849060ff16156102f9576040516316d5788b60e31b81526001600160a01b0380841660048301528216602482015260440161028a565b6001600160a01b038087166000908152600160208181526040808420948a16808552858352818520338652808452918520805460ff191685179055845293905291909101805463ffffffff169161034f83610d5f565b91906101000a81548163ffffffff021916908363ffffffff16021790555050336001600160a01b0316856001600160a01b0316876001600160a01b03167fc42e62d9f6b29d37599fcb472a6f30bc6e8c8d6fbbcb774ac585c02b314bd2ad60405160405180910390a46103c286866108da565b15610434576040805163278f794360e11b81526001600160a01b03878116600483015260248201929092526000604482015290871690634f1ef28690606401600060405180830381600087803b15801561041b57600080fd5b505af115801561042f573d6000803e3d6000fd5b505050505b505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104865750805467ffffffffffffffff808416911610155b156104a45760405163f92ee8a960e01b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815468ff0000000000000000191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60005460405163c784cd1760e01b81523360048201526001600160a01b039091169063c784cd179060240160006040518083038186803b15801561056f57600080fd5b505afa158015610583573d6000803e3d6000fd5b5050505080806001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156105e2575060408051601f3d908101601f191682019092526105df91810190610d82565b60015b61060a57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161028a565b600080516020610e99833981519152811461063b57604051632a87526960e21b81526004810182905260240161028a565b6001600160a01b03808516600090815260016020908152604080832093871683529290522060020154849084901561069957604051634cc571cf60e01b81526001600160a01b0380841660048301528216602482015260440161028a565b6001600160a01b038681166000818152600160208181526040808420958b16808552959091528083209182018054640100000000600160c01b031916336401000000008102919091179091554260029093019290925551909392917fe33956f8d60ae2b38d9860e46ec9b53d8fb58aa99a9404b1195b7ce35d2941dc91a45050505b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806107a757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661079b600080516020610e99833981519152546001600160a01b031690565b6001600160a01b031614155b156107c55760405163703e46dd60e11b815260040160405180910390fd5b565b6107d130826101ac565b50565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561082e575060408051601f3d908101601f1916820190925261082b91810190610d82565b60015b61085657604051634c9c8ce360e01b81526001600160a01b038316600482015260240161028a565b600080516020610e99833981519152811461088757604051632a87526960e21b81526004810182905260240161028a565b61071b83836109b1565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107c55760405163703e46dd60e11b815260040160405180910390fd5b60008054604051636814b8e560e11b815282916001600160a01b03169063d02971ca9061090c90600190600401610d9b565b602060405180830381865afa158015610929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094d9190610dc3565b6001600160a01b03808616600090815260016020818152604080842094891684529390529181209091015491925063ffffffff90911690610999610992846006610de9565b600a610a07565b63ffffffff9081169216919091101595945050505050565b6109ba82610a31565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156109ff5761071b8282610a96565b61018b610b0c565b600081610a15600185610e11565b610a1f9190610e2e565b610a2a906001610e5f565b9392505050565b806001600160a01b03163b600003610a6757604051634c9c8ce360e01b81526001600160a01b038216600482015260240161028a565b600080516020610e9983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610ab39190610e7c565b600060405180830381855af49150503d8060008114610aee576040519150601f19603f3d011682016040523d82523d6000602084013e610af3565b606091505b5091509150610b03858383610b2b565b95945050505050565b34156107c55760405163b398979f60e01b815260040160405180910390fd5b606082610b4057610b3b82610b87565b610a2a565b8151158015610b5757506001600160a01b0384163b155b15610b8057604051639996b31560e01b81526001600160a01b038516600482015260240161028a565b5092915050565b805115610b975780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610bc757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610bf557600080fd5b610bfe83610bb0565b9150602083013567ffffffffffffffff80821115610c1b57600080fd5b818501915085601f830112610c2f57600080fd5b813581811115610c4157610c41610bcc565b604051601f8201601f19908116603f01168101908382118183101715610c6957610c69610bcc565b81604052828152886020848701011115610c8257600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060408385031215610cb757600080fd5b610cc083610bb0565b9150610cce60208401610bb0565b90509250929050565b60005b83811015610cf2578181015183820152602001610cda565b50506000910152565b6020815260008251806020840152610d1a816040850160208701610cd7565b601f01601f19169190910160400192915050565b600060208284031215610d4057600080fd5b610a2a82610bb0565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103610d7857610d78610d49565b6001019392505050565b600060208284031215610d9457600080fd5b5051919050565b6020810160048310610dbd57634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215610dd557600080fd5b815163ffffffff81168114610a2a57600080fd5b63ffffffff818116838216028082169190828114610e0957610e09610d49565b505092915050565b63ffffffff828116828216039080821115610b8057610b80610d49565b600063ffffffff80841680610e5357634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b63ffffffff818116838216019080821115610b8057610b80610d49565b60008251610e8e818460208701610cd7565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220b26bef8983efb5fd70370cc1ab50f1a7ff61c750834c946fe0dcd8611d0cd3b864736f6c63430008170033" }, "0x0000000000000000000000000000000000003333": { "comment": "Proxy: Smart contract to manage DIDs", "code": "0x6080604052600a600c565b005b60186014601a565b6051565b565b6000604c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015606f573d6000f35b3d6000fdfea26469706673582212208de99705f21830b33bf2bd4a57ce70f27ec58ac48b2c88e1c96b59a11978ef8164736f6c63430008170033", "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", + "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000095e9a3a129f3147b524b3c3d9e9e36b145a0215b" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000008163abc8f4e4388e4ea9536ee6787be3cca0460e" } }, - "0x95e9a3a129f3147b524b3c3d9e9e36b145a0215b": { + "0x8163abc8f4e4388e4ea9536ee6787be3cca0460e": { "comment": "Implementation: Smart contract to manage DIDs", - "code": "0x60806040526004361061009c5760003560e01c8063ad3cb1cc11610064578063ad3cb1cc1461014f578063c041bd661461018d578063c4d66de8146101ad578063c6569381146101cd578063d066db54146101ed578063f59579441461020d57600080fd5b80631830eb5b146100a15780633f4f62b7146100d75780634f1ef286146100f957806352d1902d1461010c57806385e931351461012f575b600080fd5b3480156100ad57600080fd5b506100c16100bc366004611060565b61022d565b6040516100ce91906110cb565b60405180910390f35b3480156100e357600080fd5b506100f76100f236600461119b565b610399565b005b6100f7610107366004611229565b610443565b34801561011857600080fd5b50610121610462565b6040519081526020016100ce565b34801561013b57600080fd5b506100f761014a366004611060565b61047f565b34801561015b57600080fd5b50610180604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ce91906112eb565b34801561019957600080fd5b506100f76101a83660046112fe565b61048c565b3480156101b957600080fd5b506100f76101c8366004611060565b61055f565b3480156101d957600080fd5b506100f76101e8366004611340565b610644565b3480156101f957600080fd5b506100f761020836600461119b565b610655565b34801561021957600080fd5b506100f7610228366004611340565b6106f6565b610235610fe0565b6001600160a01b0382166000908152600160205260408120600301548391036102815760405163431dc9ff60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b6001600160a01b0383166000908152600160205260409081902081518083019092528054829082906102b290611393565b80601f01602080910402602001604051908101604052809291908181526020018280546102de90611393565b801561032b5780601f106103005761010080835404028352916020019161032b565b820191906000526020600020905b81548152906001019060200180831161030e57829003601f168201915b50505091835250506040805160c08101825260018401546001600160a01b039081168252600285015416602082810191909152600385015492820192909252600484015460608201526005840154608082015260069093015460ff16151560a0840152015291505b50919050565b6040516000906103bb90601960f81b90839030908b90889088906020016113c7565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915061043a90889060019060a0016020604051602081039080840390855afa158015610429573d6000803e3d6000fd5b5050506020604051035185856106fe565b50505050505050565b61044b610840565b610454826108e7565b61045e8282610946565b5050565b600061046c610a03565b506000805160206115d183398151915290565b6104898133610a4c565b50565b604051601960f81b60208201526000602182018190526001600160601b031930606090811b8216602285015287901b1660368301526c19195858dd1a5d985d19511a59609a1b604a8301529060570160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8716918301919091526060820185905260808201849052915061055890869060019060a0016020604051602081039080840390855afa158015610549573d6000803e3d6000fd5b50505060206040510351610a4c565b5050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105a95750805467ffffffffffffffff808416911610155b156105c75760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556105f283610bde565b805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b61065083338484610c08565b505050565b60405160009061067790601960f81b90839030908b9088908890602001611429565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915061043a90889060019060a0016020604051602081039080840390855afa1580156106e5573d6000803e3d6000fd5b505050602060405103518585610c08565b610650833384845b6001600160a01b038416600090815260016020526040902060030154849015610745576040516305d68dff60e01b81526001600160a01b0382166004820152602401610278565b8484806001600160a01b0316826001600160a01b03161461078c576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b6001600160a01b03871660009081526001602052604090206107af8587836114db565b506001600160a01b03871660008181526001602081815260409283902091820180546001600160a01b0319908116861790915560028301805490911633179055426003830181905560048301554360059092019190915590519182527f04ba3b3eaab06ab3e10d3d39ba7db30a9af06393b6574671b7a1000a5d4a0e3691015b60405180910390a150505050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806108c757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108bb6000805160206115d1833981519152546001600160a01b031690565b6001600160a01b031614155b156108e55760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561093257600080fd5b505afa158015610558573d6000803e3d6000fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156109a0575060408051601f3d908101601f1916820190925261099d9181019061159b565b60015b6109c857604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610278565b6000805160206115d183398151915281146109f957604051632a87526960e21b815260048101829052602401610278565b6106508383610dbf565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108e55760405163703e46dd60e11b815260040160405180910390fd5b6001600160a01b038216600090815260016020526040812060030154839103610a935760405163431dc9ff60e11b81526001600160a01b0382166004820152602401610278565b6001600160a01b038316600090815260016020526040902060060154839060ff1615610add5760405163e9aeaecd60e01b81526001600160a01b0382166004820152602401610278565b8383806001600160a01b0316826001600160a01b031614610b24576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b85336001600160a01b03821614801590610b5b57506001600160a01b03818116600090815260016020526040902060020154163314155b15610b7b57604051633fcc3f1760e01b8152336004820152602401610278565b6001600160a01b03871660008181526001602081815260409283902060068101805460ff19169093179092554360059092019190915590519182527f236b7a85392c62d219956b1f2d21f622daa26da228a7972f50caa2be59bf1706910161082f565b610be6610e15565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038416600090815260016020526040812060030154859103610c4f5760405163431dc9ff60e11b81526001600160a01b0382166004820152602401610278565b6001600160a01b038516600090815260016020526040902060060154859060ff1615610c995760405163e9aeaecd60e01b81526001600160a01b0382166004820152602401610278565b8585806001600160a01b0316826001600160a01b031614610ce0576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b87336001600160a01b03821614801590610d1757506001600160a01b03818116600090815260016020526040902060020154163314155b15610d3757604051633fcc3f1760e01b8152336004820152602401610278565b6001600160a01b0389166000908152600160205260409020610d5a8789836114db565b506001600160a01b0389166000818152600160209081526040918290204260048201554360059091015590519182527f90e3a0a6e9a465f47796c468fa4ba727e3aa2b9270bae4b93cd3dea9ac6e3452910160405180910390a1505050505050505050565b610dc882610e5e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e0d576106508282610ec3565b61045e610f39565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166108e557604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610e9457604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610278565b6000805160206115d183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610ee091906115b4565b600060405180830381855af49150503d8060008114610f1b576040519150601f19603f3d011682016040523d82523d6000602084013e610f20565b606091505b5091509150610f30858383610f58565b95945050505050565b34156108e55760405163b398979f60e01b815260040160405180910390fd5b606082610f6d57610f6882610fb7565b610fb0565b8151158015610f8457506001600160a01b0384163b155b15610fad57604051639996b31560e01b81526001600160a01b0385166004820152602401610278565b50805b9392505050565b805115610fc75780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60405180604001604052806060815260200161103f6040518060c0016040528060006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000151581525090565b905290565b80356001600160a01b038116811461105b57600080fd5b919050565b60006020828403121561107257600080fd5b610fb082611044565b60005b8381101561109657818101518382015260200161107e565b50506000910152565b600081518084526110b781602086016020860161107b565b601f01601f19169290920160200192915050565b602081526000825160e060208401526110e861010084018261109f565b9050602084015160018060a01b038082511660408601528060208301511660608601525060408101516080850152606081015160a0850152608081015160c085015260a0810151151560e0850152508091505092915050565b803560ff8116811461105b57600080fd5b60008083601f84011261116457600080fd5b50813567ffffffffffffffff81111561117c57600080fd5b60208301915083602082850101111561119457600080fd5b9250929050565b60008060008060008060a087890312156111b457600080fd5b6111bd87611044565b95506111cb60208801611141565b94506040870135935060608701359250608087013567ffffffffffffffff8111156111f557600080fd5b61120189828a01611152565b979a9699509497509295939492505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561123c57600080fd5b61124583611044565b9150602083013567ffffffffffffffff8082111561126257600080fd5b818501915085601f83011261127657600080fd5b81358181111561128857611288611213565b604051601f8201601f19908116603f011681019083821181831017156112b0576112b0611213565b816040528281528860208487010111156112c957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b602081526000610fb0602083018461109f565b6000806000806080858703121561131457600080fd5b61131d85611044565b935061132b60208601611141565b93969395505050506040820135916060013590565b60008060006040848603121561135557600080fd5b61135e84611044565b9250602084013567ffffffffffffffff81111561137a57600080fd5b61138686828701611152565b9497909650939450505050565b600181811c908216806113a757607f821691505b60208210810361039357634e487b7160e01b600052602260045260246000fd5b6001600160f81b03198781168252861660018201526001600160601b0319606086811b8216600284015285901b1660168201526818dc99585d19511a5960ba1b602a820152600082846033840137506000910160330190815295945050505050565b6001600160f81b03198781168252861660018201526001600160601b0319606086811b8216600284015285901b166016820152681d5c19185d19511a5960ba1b602a820152600082846033840137506000910160330190815295945050505050565b601f821115610650576000816000526020600020601f850160051c810160208610156114b45750805b601f850160051c820191505b818110156114d3578281556001016114c0565b505050505050565b67ffffffffffffffff8311156114f3576114f3611213565b611507836115018354611393565b8361148b565b6000601f84116001811461153b57600085156115235750838201355b600019600387901b1c1916600186901b178355610558565b600083815260209020601f19861690835b8281101561156c578685013582556020948501946001909201910161154c565b50868210156115895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156115ad57600080fd5b5051919050565b600082516115c681846020870161107b565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220b75ecbb6e5a63054e274f77eb197b5779b1d5075386463a4507b298eb896de8464736f6c63430008170033" + "code": "0x60806040526004361061009c5760003560e01c806385e931351161006457806385e931351461014f578063ad3cb1cc1461016f578063c041bd66146101ad578063c6569381146101cd578063d066db54146101ed578063f59579441461020d57600080fd5b80631830eb5b146100a15780633f4f62b7146100d7578063485cc955146100f95780634f1ef2861461011957806352d1902d1461012c575b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046111be565b61022d565b6040516100ce9190611229565b60405180910390f35b3480156100e357600080fd5b506100f76100f23660046112ea565b61038c565b005b34801561010557600080fd5b506100f7610114366004611362565b610436565b6100f76101273660046113ab565b610537565b34801561013857600080fd5b50610141610556565b6040519081526020016100ce565b34801561015b57600080fd5b506100f761016a3660046111be565b610573565b34801561017b57600080fd5b506101a0604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ce919061146d565b3480156101b957600080fd5b506100f76101c8366004611480565b610580565b3480156101d957600080fd5b506100f76101e83660046114c2565b610653565b3480156101f957600080fd5b506100f76102083660046112ea565b610664565b34801561021957600080fd5b506100f76102283660046114c2565b610705565b61023561114e565b6001600160a01b0382166000908152600260208190526040822001548391036102815760405163431dc9ff60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b6001600160a01b0383166000908152600260205260409081902081518083019092528054829082906102b290611515565b80601f01602080910402602001604051908101604052809291908181526020018280546102de90611515565b801561032b5780601f106103005761010080835404028352916020019161032b565b820191906000526020600020905b81548152906001019060200180831161030e57829003601f168201915b50505091835250506040805160a08101825260018401546001600160a01b0316815260028401546020828101919091526003850154928201929092526004840154606082015260059093015460ff1615156080840152015291505b50919050565b6040516000906103ae90601960f81b90839030908b9088908890602001611549565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915061042d90889060019060a0016020604051602081039080840390855afa15801561041c573d6000803e3d6000fd5b50505060206040510351858561070d565b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104805750805467ffffffffffffffff808416911610155b1561049e5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556104c98461089e565b600180546001600160a01b0319166001600160a01b038516179055805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61053f6108c8565b6105488261096f565b61055282826109ce565b5050565b6000610560610a8b565b5060008051602061175383398151915290565b61057d8133610ad4565b50565b604051601960f81b60208201526000602182018190526001600160601b031930606090811b8216602285015287901b1660368301526c19195858dd1a5d985d19511a59609a1b604a8301529060570160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8716918301919091526060820185905260808201849052915061064c90869060019060a0016020604051602081039080840390855afa15801561063d573d6000803e3d6000fd5b50505060206040510351610ad4565b5050505050565b61065f83338484610cde565b505050565b60405160009061068690601960f81b90839030908b90889088906020016115ab565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915061042d90889060019060a0016020604051602081039080840390855afa1580156106f4573d6000803e3d6000fd5b505050602060405103518585610cde565b61065f833384845b6001600160a01b03841660009081526002602081905260409091200154849015610755576040516305d68dff60e01b81526001600160a01b0382166004820152602401610278565b8484806001600160a01b0316826001600160a01b03161461079c576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b6001546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b1580156107df57600080fd5b505afa1580156107f3573d6000803e3d6000fd5b505050506001600160a01b038716600090815260026020526040902061081a85878361165d565b506001600160a01b0387166000818152600260208181526040928390206001810180546001600160a01b031916861790554292810183905560038101929092554360049092019190915590519182527f04ba3b3eaab06ab3e10d3d39ba7db30a9af06393b6574671b7a1000a5d4a0e3691015b60405180910390a150505050505050565b6108a6610f2d565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061094f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610943600080516020611753833981519152546001600160a01b031690565b6001600160a01b031614155b1561096d5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156109ba57600080fd5b505afa15801561064c573d6000803e3d6000fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610a28575060408051601f3d908101601f19168201909252610a259181019061171d565b60015b610a5057604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610278565b6000805160206117538339815191528114610a8157604051632a87526960e21b815260048101829052602401610278565b61065f8383610f76565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461096d5760405163703e46dd60e11b815260040160405180910390fd5b6001600160a01b038216600090815260026020819052604082200154839103610b1b5760405163431dc9ff60e11b81526001600160a01b0382166004820152602401610278565b6001600160a01b038316600090815260026020526040902060050154839060ff1615610b655760405163e9aeaecd60e01b81526001600160a01b0382166004820152602401610278565b8383806001600160a01b0316826001600160a01b031614610bac576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b856001600160a01b0381163303610c24576001600160a01b03871660008181526002602090815260409182902060058101805460ff191660011790554360049091015590519182527f236b7a85392c62d219956b1f2d21f622daa26da228a7972f50caa2be59bf1706910160405180910390a161042d565b60015460405163c784cd1760e01b81523360048201526001600160a01b039091169063c784cd179060240160006040518083038186803b158015610c6757600080fd5b505afa158015610c7b573d6000803e3d6000fd5b505050506001600160a01b03871660008181526002602090815260409182902060058101805460ff191660011790554360049091015590519182527f236b7a85392c62d219956b1f2d21f622daa26da228a7972f50caa2be59bf1706910161088d565b6001600160a01b038416600090815260026020819052604082200154859103610d255760405163431dc9ff60e11b81526001600160a01b0382166004820152602401610278565b6001600160a01b038516600090815260026020526040902060050154859060ff1615610d6f5760405163e9aeaecd60e01b81526001600160a01b0382166004820152602401610278565b8585806001600160a01b0316826001600160a01b031614610db6576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610278565b876001600160a01b0381163303610e49576001600160a01b0389166000908152600260205260409020610dea87898361165d565b506001600160a01b0389166000818152600260209081526040918290204260038201554360049091015590519182527f90e3a0a6e9a465f47796c468fa4ba727e3aa2b9270bae4b93cd3dea9ac6e3452910160405180910390a1610f22565b60015460405163c784cd1760e01b81523360048201526001600160a01b039091169063c784cd179060240160006040518083038186803b158015610e8c57600080fd5b505afa158015610ea0573d6000803e3d6000fd5b505050506001600160a01b0389166000908152600260205260409020610ec787898361165d565b506001600160a01b0389166000818152600260209081526040918290204260038201554360049091015590519182527f90e3a0a6e9a465f47796c468fa4ba727e3aa2b9270bae4b93cd3dea9ac6e3452910160405180910390a15b505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661096d57604051631afcd79f60e31b815260040160405180910390fd5b610f7f82610fcc565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610fc45761065f8282611031565b6105526110a7565b806001600160a01b03163b60000361100257604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610278565b60008051602061175383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161104e9190611736565b600060405180830381855af49150503d8060008114611089576040519150601f19603f3d011682016040523d82523d6000602084013e61108e565b606091505b509150915061109e8583836110c6565b95945050505050565b341561096d5760405163b398979f60e01b815260040160405180910390fd5b6060826110db576110d682611125565b61111e565b81511580156110f257506001600160a01b0384163b155b1561111b57604051639996b31560e01b81526001600160a01b0385166004820152602401610278565b50805b9392505050565b8051156111355780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60405180604001604052806060815260200161119d6040518060a0016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000151581525090565b905290565b80356001600160a01b03811681146111b957600080fd5b919050565b6000602082840312156111d057600080fd5b61111e826111a2565b60005b838110156111f45781810151838201526020016111dc565b50506000910152565b600081518084526112158160208601602086016111d9565b601f01601f19169290920160200192915050565b602081526000825160c0602084015261124560e08401826111fd565b9050602084015160018060a01b0381511660408501526020810151606085015260408101516080850152606081015160a08501526080810151151560c0850152508091505092915050565b803560ff811681146111b957600080fd5b60008083601f8401126112b357600080fd5b50813567ffffffffffffffff8111156112cb57600080fd5b6020830191508360208285010111156112e357600080fd5b9250929050565b60008060008060008060a0878903121561130357600080fd5b61130c876111a2565b955061131a60208801611290565b94506040870135935060608701359250608087013567ffffffffffffffff81111561134457600080fd5b61135089828a016112a1565b979a9699509497509295939492505050565b6000806040838503121561137557600080fd5b61137e836111a2565b915061138c602084016111a2565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156113be57600080fd5b6113c7836111a2565b9150602083013567ffffffffffffffff808211156113e457600080fd5b818501915085601f8301126113f857600080fd5b81358181111561140a5761140a611395565b604051601f8201601f19908116603f0116810190838211818310171561143257611432611395565b8160405282815288602084870101111561144b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60208152600061111e60208301846111fd565b6000806000806080858703121561149657600080fd5b61149f856111a2565b93506114ad60208601611290565b93969395505050506040820135916060013590565b6000806000604084860312156114d757600080fd5b6114e0846111a2565b9250602084013567ffffffffffffffff8111156114fc57600080fd5b611508868287016112a1565b9497909650939450505050565b600181811c9082168061152957607f821691505b60208210810361038657634e487b7160e01b600052602260045260246000fd5b6001600160f81b03198781168252861660018201526001600160601b0319606086811b8216600284015285901b1660168201526818dc99585d19511a5960ba1b602a820152600082846033840137506000910160330190815295945050505050565b6001600160f81b03198781168252861660018201526001600160601b0319606086811b8216600284015285901b166016820152681d5c19185d19511a5960ba1b602a820152600082846033840137506000910160330190815295945050505050565b601f82111561065f576000816000526020600020601f850160051c810160208610156116365750805b601f850160051c820191505b8181101561165557828155600101611642565b505050505050565b67ffffffffffffffff83111561167557611675611395565b611689836116838354611515565b8361160d565b6000601f8411600181146116bd57600085156116a55750838201355b600019600387901b1c1916600186901b17835561064c565b600083815260209020601f19861690835b828110156116ee57868501358255602094850194600190920191016116ce565b508682101561170b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60006020828403121561172f57600080fd5b5051919050565b600082516117488184602087016111d9565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200dfcb65c93349603191e27a5ae37b914701f0c72a2360dbb6adbac009bba2ed564736f6c63430008170033" }, "0x0000000000000000000000000000000000018888": { "comment": "Proxy: Ethereum registry for ERC-1056 ethr did methods", @@ -179,12 +180,12 @@ "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000003333", "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000018888", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000004bd283f0cec8306da575e11cb71c2587d63c8865" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000000fe082ecf72e0b6247737102f55a91c346694ae8" } }, - "0x4bd283f0cec8306da575e11cb71c2587d63c8865": { + "0x0fe082ecf72e0b6247737102f55a91c346694ae8": { "comment": "Implementation: Smart contract to resolve DIDs from various DID registries", - "code": "0x6080604052600436106100555760003560e01c806329181c6c1461005a5780634f1ef2861461009057806352d1902d146100a557806366874f25146100c8578063ad3cb1cc1461013f578063c0c53b8b14610170575b600080fd5b34801561006657600080fd5b5061007a6100753660046118f7565b610190565b60405161008791906119b8565b60405180910390f35b6100a361009e366004611a97565b6102e6565b005b3480156100b157600080fd5b506100ba610305565b604051908152602001610087565b3480156100d457600080fd5b506100e86100e33660046118f7565b610322565b604051610087919081516001600160a01b0390811682526020808401519091169082015260408083015190820152606080830151908201526080808301519082015260a09182015115159181019190915260c00190565b34801561014b57600080fd5b5061007a604051806040016040528060058152602001640352e302e360dc1b81525081565b34801561017c57600080fd5b506100a361018b366004611b29565b61055e565b606060006101d384848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067292505050565b905060006101e482602001516107bd565b90506001600160a01b03811661021a578484604051631859e3bb60e11b8152600401610211929190611b74565b60405180910390fd5b8151610225906107f6565b156102a757600154604051631830eb5b60e01b81526001600160a01b03838116600483015290911690631830eb5b90602401600060405180830381865afa158015610274573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261029c9190810190611ba3565b5192506102e0915050565b81516040516102b99190602001611ccc565b60408051601f198184030181529082905263fdc1b5c360e01b825261021191600401611d1c565b92915050565b6102ee610833565b6102f7826108da565b6103018282610940565b5050565b600061030f610a02565b50600080516020611f3383398151915290565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152600061039584848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067292505050565b905060006103a682602001516107bd565b90506001600160a01b0381166103d3578484604051631859e3bb60e11b8152600401610211929190611b74565b81516103de90610a4b565b15610496576002546040516310e67a9d60e31b81526001600160a01b0383811660048301526000921690638733d4e890602401602060405180830381865afa15801561042e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104529190611d70565b6040805160c0810182526001600160a01b039092168252600060208301819052908201819052606082018190526080820181905260a082015293506102e092505050565b81516104a1906107f6565b1561052557600154604051631830eb5b60e01b81526001600160a01b03838116600483015290911690631830eb5b90602401600060405180830381865afa1580156104f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105189190810190611ba3565b60200151925050506102e0565b81516040516105379190602001611ccc565b60408051601f198184030181529082905263fdc1b5c360e01b825261021191600401611d8d565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105a7575080546001600160401b03808416911610155b156105c55760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556105ef85610a75565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6040805180820190915260608082526020820152600061069183610a9f565b905060006106b7604051806040016040528060018152602001601d60f91b815250610a9f565b90506000806106c68484610aaa565b95509250905080158061070457506107026106fb60405180604001604052806003815260200162191a5960ea1b815250610a9f565b8390610af8565b155b156107245785604051631859e3bb60e11b815260040161021191906119b8565b61072e8484610aaa565b955092509050806107545785604051631859e3bb60e11b815260040161021191906119b8565b604080518082019091526060808252602082015261077183610b0b565b81526040805180820190915260018152601d60f91b602082015261079f9061079890610a9f565b8690610b16565b94506107ae9150849050610b0b565b60208201529695505050505050565b600060166107c9835190565b036107d657506000919050565b60006107e183610b40565b90506107ec81611de1565b60601c9392505050565b60006102e061082460405180604001604052806008815260200167696e64796265737560c01b815250610a9f565b61082d84610a9f565b90610af8565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806108ba57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108ae600080516020611f33833981519152546001600160a01b031690565b6001600160a01b031614155b156108d85760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561092557600080fd5b505afa158015610939573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561099a575060408051601f3d908101601f1916820190925261099791810190611e1d565b60015b6109c257604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610211565b600080516020611f3383398151915281146109f357604051632a87526960e21b815260048101829052602401610211565b6109fd8383610d32565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108d85760405163703e46dd60e11b815260040160405180910390fd5b60006102e06108246040518060400160405280600481526020016332ba343960e11b815250610a9f565b610a7d610d88565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006102e082610dd1565b6000808080610ab98686610de5565b90506000198103610ad557600086600093509350935050610af1565b610ae986826001600160801b038816610ef0565b935093509350505b9250925092565b6000610b048383610f5d565b9392505050565b60606102e082610fa7565b6000808080610b25868661101e565b90506000198103610ad5576000808793509350935050610af1565b60606000610b4d83610a9f565b90506000610b7460405180604001604052806002815260200161060f60f31b815250610a9f565b9050610ba3610b9c60405180604001604052806002815260200161060f60f31b815250610a9f565b8390611110565b610bbe57505060408051602081019091526000815292915050565b610bd0610bcb838361111c565b610b0b565b93506000849050600060028251610be79190611e4c565b6001600160401b03811115610bfe57610bfe6119e0565b6040519080825280601f01601f191660200182016040528015610c28576020820181803683370190505b50905060005b8151811015610d2857600080610c6d85610c49856002611e6e565b81518110610c5957610c59611e85565b01602001516001600160f81b031916611128565b9150915080610c92575050604080516020810190915260008152979650505050505050565b600080610caf87610ca4876002611e6e565b610c49906001611e9b565b9150915080610cd65750506040805160208101909152600081529998505050505050505050565b81610ce2856010611eae565b610cec9190611ed1565b60f81b868681518110610d0157610d01611e85565b60200101906001600160f81b031916908160001a9053505060019093019250610c2e915050565b5095945050505050565b610d3b8261120e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610d80576109fd8282611273565b6103016112e9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166108d857604051631afcd79f60e31b815260040160405180910390fd5b600080602083019050610b04818451611308565b60006001600160801b03838116908316808303610e07576000925050506102e0565b811580610e1357508181115b15610e2457600019925050506102e0565b6000610e308660801c90565b90506000610e3e8660801c90565b90506000610e4d825160001a90565b90505b6000610e5d848784611314565b90506000198103610e785760001996505050505050506102e0565b94859003949283019285851115610e995760001996505050505050506102e0565b84832085852003610ec557610eae8960801c90565b610eb89085611eea565b96505050505050506102e0565b85600103610edd5760001996505050505050506102e0565b6000199095019460019093019250610e50565b600080600080610f008760801c90565b90506001600160801b03871685870181811115610f30576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b038381169083168114610f7d5760009150506102e0565b610f9f610f8a8560801c90565b610f948560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b03811115610fca57610fca6119e0565b6040519080825280601f01601f191660200182016040528015610ff4576020820181803683370190505b50905060208101611018816110098560801c90565b6001600160801b0386166113dc565b50919050565b60006001600160801b03838116908316808303611040576000925050506102e0565b81158061104c57508181115b1561105d57600019925050506102e0565b60006110698660801c90565b905060006110778660801c90565b90506000611084876113ea565b905060001984015b600061109985888561142f565b905060001981036110b5576000199750505050505050506102e0565b808211156110ce576000199750505050505050506102e0565b8584208282038681018890209091036110f05797506102e09650505050505050565b81156110fe5750955061108c565b600019985050505050505050506102e0565b6000610b0483836114e3565b6000610b048383611530565b600080600360fc1b6001600160f81b03198416108015906111575750603960f81b6001600160f81b0319841611155b156111755761116b603060f885901c611efd565b9360019350915050565b604160f81b6001600160f81b03198416108015906111a15750602360f91b6001600160f81b0319841611155b156111c15760416111b760f885901c600a611ed1565b61116b9190611efd565b606160f81b6001600160f81b03198416108015906111ed5750603360f91b6001600160f81b0319841611155b156112035760616111b760f885901c600a611ed1565b506000928392509050565b806001600160a01b03163b60000361124457604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610211565b600080516020611f3383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516112909190611f16565b600060405180830381855af49150503d80600081146112cb576040519150601f19603f3d011682016040523d82523d6000602084013e6112d0565b606091505b50915091506112e085838361158a565b95945050505050565b34156108d85760405163b398979f60e01b815260040160405180910390fd5b6000610b0483836115e6565b600060208311611330576113298484846115f2565b9050610b04565b83601f8416808503820160ff8516600080516020611f53833981519152025b81881015611391578751811861136481611703565b15611385578489036113788a60208a6115f2565b0195505050505050610b04565b6020890198505061134f565b826000036113a757600019945050505050610b04565b6113b28284886115f2565b945060001985036113cb57600019945050505050610b04565b509190910391909101949350505050565b8083828460045afa50505050565b60006001600160801b038216808203611416576040516365f4e9df60e01b815260040160405180910390fd5b610b04600182036114278560801c90565b015160001a90565b6000602083116114445761132984848461174e565b601f8316848401811561147c57819003600061146182848761174e565b9050600019811461147a5790869003019150610b049050565b505b60ff8416600080516020611f53833981519152025b868211156114d557601f19909101805190919081186114af81611703565b156114cf578783036114c38460208961174e565b01945050505050610b04565b50611491565b506000199695505050505050565b60006001600160801b0383811690831680821015611506576000925050506102e0565b848183111561151c576115198683611797565b90505b6115268186610f5d565b9695505050505050565b60006001600160801b03838116908316818111156115525784925050506102e0565b60008061155f87846117e2565b909250905061156e8287610f5d565b1561157e5793506102e092505050565b869450505050506102e0565b60608261159f5761159a82611865565b610b04565b81511580156115b657506001600160a01b0384163b155b156115df57604051639996b31560e01b81526001600160a01b0385166004820152602401610211565b5080610b04565b6000610b048383611891565b825160009081602085111561160657602094505b601285106116905760ff8416600080516020611f538339815191520282186116366001600160801b038217611703565b60000361166c5760109150601a86106116675761165b6001600160401b038217611703565b60000361166757601891505b61168a565b61167e6001600160c01b038217611703565b60000361168a57600891505b506116ce565b600a85106116ce5760ff8416600080516020611f538339815191520282186116c06001600160c01b038217611703565b6000036116cc57600891505b505b848110156116f65781811a60ff851681036116ed57509150610b049050565b506001016116ce565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b6000602083111561175e57602092505b83515b831561178b576000199093019280841a60ff84168103611785578492505050610b04565b50611761565b50600019949350505050565b60006001600160801b038316808311156117c4576040516365f4e9df60e01b815260040160405180910390fd5b610f9f6117d18560801c90565b60801b6001600160801b0385161790565b60008060006117f18560801c90565b90506001600160801b0385168085111561181e576040516365f4e9df60e01b815260040160405180910390fd5b608082901b6001600160801b0386161761185861183b8785611e9b565b6118458885611eea565b6001600160801b031660809190911b1790565b9350935050509250929050565b8051156118755780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006001600160801b038311156118bb5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b038211156118e357604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b6000806020838503121561190a57600080fd5b82356001600160401b038082111561192157600080fd5b818501915085601f83011261193557600080fd5b81358181111561194457600080fd5b86602082850101111561195657600080fd5b60209290920196919550909350505050565b60005b8381101561198357818101518382015260200161196b565b50506000910152565b600081518084526119a4816020860160208601611968565b601f01601f19169290920160200192915050565b602081526000610b04602083018461198c565b6001600160a01b038116811461188e57600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611a1857611a186119e0565b60405290565b60405160c081016001600160401b0381118282101715611a1857611a186119e0565b604051601f8201601f191681016001600160401b0381118282101715611a6857611a686119e0565b604052919050565b60006001600160401b03821115611a8957611a896119e0565b50601f01601f191660200190565b60008060408385031215611aaa57600080fd5b8235611ab5816119cb565b915060208301356001600160401b03811115611ad057600080fd5b8301601f81018513611ae157600080fd5b8035611af4611aef82611a70565b611a40565b818152866020838501011115611b0957600080fd5b816020840160208301376000602083830101528093505050509250929050565b600080600060608486031215611b3e57600080fd5b8335611b49816119cb565b92506020840135611b59816119cb565b91506040840135611b69816119cb565b809150509250925092565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006020808385031215611bb657600080fd5b82516001600160401b0380821115611bcd57600080fd5b9084019081860360e0811215611be257600080fd5b611bea6119f6565b835183811115611bf957600080fd5b84019250601f83018813611c0c57600080fd5b8251611c1a611aef82611a70565b8181528987838701011115611c2e57600080fd5b611c3d82888301898801611968565b82525060c0601f1983011215611c5257600080fd5b611c5a611a1e565b9250848401519150611c6b826119cb565b908252604083015190611c7d826119cb565b8185840152606084015160408401526080840151606084015260a0840151608084015260c084015193508315158414611cb557600080fd5b60a083019390935250918101919091529392505050565b7f556e737570706f7274656420444944204d6574686f643a202700000000000000815260008251611d04816019850160208701611968565b602760f81b6019939091019283015250601a01919050565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c7665446f63756060820152631b595b9d60e21b608082015260a060208201526000610b0460a083018461198c565b600060208284031215611d8257600080fd5b8151610b04816119cb565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c76654d6574616060820152636461746160e01b608082015260a060208201526000610b0460a083018461198c565b805160208201516bffffffffffffffffffffffff198082169291906014831015611e155780818460140360031b1b83161693505b505050919050565b600060208284031215611e2f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082611e6957634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176102e0576102e0611e36565b634e487b7160e01b600052603260045260246000fd5b808201808211156102e0576102e0611e36565b60ff8181168382160290811690818114611eca57611eca611e36565b5092915050565b60ff81811683821601908111156102e0576102e0611e36565b818103818111156102e0576102e0611e36565b60ff82811682821603908111156102e0576102e0611e36565b60008251611f28818460208701611968565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0101010101010101010101010101010101010101010101010101010101010101a2646970667358221220014a47302f5b30c557d5e0645efd614608af5d3d09360f938f01db1061a0ffba64736f6c63430008170033" + "code": "0x6080604052600436106100555760003560e01c806329181c6c1461005a5780634f1ef2861461009057806352d1902d146100a557806366874f25146100c8578063ad3cb1cc14610130578063c0c53b8b14610161575b600080fd5b34801561006657600080fd5b5061007a6100753660046118f1565b610181565b60405161008791906119b2565b60405180910390f35b6100a361009e366004611a91565b6102d7565b005b3480156100b157600080fd5b506100ba6102f6565b604051908152602001610087565b3480156100d457600080fd5b506100e86100e33660046118f1565b610313565b604051610087919081516001600160a01b0316815260208083015190820152604080830151908201526060808301519082015260809182015115159181019190915260a00190565b34801561013c57600080fd5b5061007a604051806040016040528060058152602001640352e302e360dc1b81525081565b34801561016d57600080fd5b506100a361017c366004611b23565b610558565b606060006101c484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066c92505050565b905060006101d582602001516107b7565b90506001600160a01b03811661020b578484604051631859e3bb60e11b8152600401610202929190611b6e565b60405180910390fd5b8151610216906107f0565b1561029857600154604051631830eb5b60e01b81526001600160a01b03838116600483015290911690631830eb5b90602401600060405180830381865afa158015610265573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261028d9190810190611b9d565b5192506102d1915050565b81516040516102aa9190602001611cb1565b60408051601f198184030181529082905263fdc1b5c360e01b825261020291600401611d01565b92915050565b6102df61082d565b6102e8826108d4565b6102f2828261093a565b5050565b60006103006109fc565b50600080516020611f1883398151915290565b6103506040518060a0016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000151581525090565b600061039184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066c92505050565b905060006103a282602001516107b7565b90506001600160a01b0381166103cf578484604051631859e3bb60e11b8152600401610202929190611b6e565b81516103da90610a45565b15610490576002546040516310e67a9d60e31b81526001600160a01b0383811660048301526000921690638733d4e890602401602060405180830381865afa15801561042a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044e9190611d55565b90506040518060a00160405280826001600160a01b031681526020016000815260200160008152602001600081526020016000151581525093505050506102d1565b815161049b906107f0565b1561051f57600154604051631830eb5b60e01b81526001600160a01b03838116600483015290911690631830eb5b90602401600060405180830381865afa1580156104ea573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105129190810190611b9d565b60200151925050506102d1565b81516040516105319190602001611cb1565b60408051601f198184030181529082905263fdc1b5c360e01b825261020291600401611d72565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806105a1575080546001600160401b03808416911610155b156105bf5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556105e985610a6f565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6040805180820190915260608082526020820152600061068b83610a99565b905060006106b1604051806040016040528060018152602001601d60f91b815250610a99565b90506000806106c08484610aa4565b9550925090508015806106fe57506106fc6106f560405180604001604052806003815260200162191a5960ea1b815250610a99565b8390610af2565b155b1561071e5785604051631859e3bb60e11b815260040161020291906119b2565b6107288484610aa4565b9550925090508061074e5785604051631859e3bb60e11b815260040161020291906119b2565b604080518082019091526060808252602082015261076b83610b05565b81526040805180820190915260018152601d60f91b60208201526107999061079290610a99565b8690610b10565b94506107a89150849050610b05565b60208201529695505050505050565b600060166107c3835190565b036107d057506000919050565b60006107db83610b3a565b90506107e681611dc6565b60601c9392505050565b60006102d161081e60405180604001604052806008815260200167696e64796265737560c01b815250610a99565b61082784610a99565b90610af2565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806108b457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108a8600080516020611f18833981519152546001600160a01b031690565b6001600160a01b031614155b156108d25760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561091f57600080fd5b505afa158015610933573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610994575060408051601f3d908101601f1916820190925261099191810190611e02565b60015b6109bc57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610202565b600080516020611f1883398151915281146109ed57604051632a87526960e21b815260048101829052602401610202565b6109f78383610d2c565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108d25760405163703e46dd60e11b815260040160405180910390fd5b60006102d161081e6040518060400160405280600481526020016332ba343960e11b815250610a99565b610a77610d82565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006102d182610dcb565b6000808080610ab38686610ddf565b90506000198103610acf57600086600093509350935050610aeb565b610ae386826001600160801b038816610eea565b935093509350505b9250925092565b6000610afe8383610f57565b9392505050565b60606102d182610fa1565b6000808080610b1f8686611018565b90506000198103610acf576000808793509350935050610aeb565b60606000610b4783610a99565b90506000610b6e60405180604001604052806002815260200161060f60f31b815250610a99565b9050610b9d610b9660405180604001604052806002815260200161060f60f31b815250610a99565b839061110a565b610bb857505060408051602081019091526000815292915050565b610bca610bc58383611116565b610b05565b93506000849050600060028251610be19190611e31565b6001600160401b03811115610bf857610bf86119da565b6040519080825280601f01601f191660200182016040528015610c22576020820181803683370190505b50905060005b8151811015610d2257600080610c6785610c43856002611e53565b81518110610c5357610c53611e6a565b01602001516001600160f81b031916611122565b9150915080610c8c575050604080516020810190915260008152979650505050505050565b600080610ca987610c9e876002611e53565b610c43906001611e80565b9150915080610cd05750506040805160208101909152600081529998505050505050505050565b81610cdc856010611e93565b610ce69190611eb6565b60f81b868681518110610cfb57610cfb611e6a565b60200101906001600160f81b031916908160001a9053505060019093019250610c28915050565b5095945050505050565b610d3582611208565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610d7a576109f7828261126d565b6102f26112e3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166108d257604051631afcd79f60e31b815260040160405180910390fd5b600080602083019050610afe818451611302565b60006001600160801b03838116908316808303610e01576000925050506102d1565b811580610e0d57508181115b15610e1e57600019925050506102d1565b6000610e2a8660801c90565b90506000610e388660801c90565b90506000610e47825160001a90565b90505b6000610e5784878461130e565b90506000198103610e725760001996505050505050506102d1565b94859003949283019285851115610e935760001996505050505050506102d1565b84832085852003610ebf57610ea88960801c90565b610eb29085611ecf565b96505050505050506102d1565b85600103610ed75760001996505050505050506102d1565b6000199095019460019093019250610e4a565b600080600080610efa8760801c90565b90506001600160801b03871685870181811115610f2a576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b038381169083168114610f775760009150506102d1565b610f99610f848560801c90565b610f8e8560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b03811115610fc457610fc46119da565b6040519080825280601f01601f191660200182016040528015610fee576020820181803683370190505b50905060208101611012816110038560801c90565b6001600160801b0386166113d6565b50919050565b60006001600160801b0383811690831680830361103a576000925050506102d1565b81158061104657508181115b1561105757600019925050506102d1565b60006110638660801c90565b905060006110718660801c90565b9050600061107e876113e4565b905060001984015b6000611093858885611429565b905060001981036110af576000199750505050505050506102d1565b808211156110c8576000199750505050505050506102d1565b8584208282038681018890209091036110ea5797506102d19650505050505050565b81156110f857509550611086565b600019985050505050505050506102d1565b6000610afe83836114dd565b6000610afe838361152a565b600080600360fc1b6001600160f81b03198416108015906111515750603960f81b6001600160f81b0319841611155b1561116f57611165603060f885901c611ee2565b9360019350915050565b604160f81b6001600160f81b031984161080159061119b5750602360f91b6001600160f81b0319841611155b156111bb5760416111b160f885901c600a611eb6565b6111659190611ee2565b606160f81b6001600160f81b03198416108015906111e75750603360f91b6001600160f81b0319841611155b156111fd5760616111b160f885901c600a611eb6565b506000928392509050565b806001600160a01b03163b60000361123e57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610202565b600080516020611f1883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161128a9190611efb565b600060405180830381855af49150503d80600081146112c5576040519150601f19603f3d011682016040523d82523d6000602084013e6112ca565b606091505b50915091506112da858383611584565b95945050505050565b34156108d25760405163b398979f60e01b815260040160405180910390fd5b6000610afe83836115e0565b60006020831161132a576113238484846115ec565b9050610afe565b83601f8416808503820160ff8516600080516020611f38833981519152025b8188101561138b578751811861135e816116fd565b1561137f578489036113728a60208a6115ec565b0195505050505050610afe565b60208901985050611349565b826000036113a157600019945050505050610afe565b6113ac8284886115ec565b945060001985036113c557600019945050505050610afe565b509190910391909101949350505050565b8083828460045afa50505050565b60006001600160801b038216808203611410576040516365f4e9df60e01b815260040160405180910390fd5b610afe600182036114218560801c90565b015160001a90565b60006020831161143e57611323848484611748565b601f8316848401811561147657819003600061145b828487611748565b905060001981146114745790869003019150610afe9050565b505b60ff8416600080516020611f38833981519152025b868211156114cf57601f19909101805190919081186114a9816116fd565b156114c9578783036114bd84602089611748565b01945050505050610afe565b5061148b565b506000199695505050505050565b60006001600160801b0383811690831680821015611500576000925050506102d1565b8481831115611516576115138683611791565b90505b6115208186610f57565b9695505050505050565b60006001600160801b038381169083168181111561154c5784925050506102d1565b60008061155987846117dc565b90925090506115688287610f57565b156115785793506102d192505050565b869450505050506102d1565b606082611599576115948261185f565b610afe565b81511580156115b057506001600160a01b0384163b155b156115d957604051639996b31560e01b81526001600160a01b0385166004820152602401610202565b5080610afe565b6000610afe838361188b565b825160009081602085111561160057602094505b6012851061168a5760ff8416600080516020611f388339815191520282186116306001600160801b0382176116fd565b6000036116665760109150601a8610611661576116556001600160401b0382176116fd565b60000361166157601891505b611684565b6116786001600160c01b0382176116fd565b60000361168457600891505b506116c8565b600a85106116c85760ff8416600080516020611f388339815191520282186116ba6001600160c01b0382176116fd565b6000036116c657600891505b505b848110156116f05781811a60ff851681036116e757509150610afe9050565b506001016116c8565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b6000602083111561175857602092505b83515b8315611785576000199093019280841a60ff8416810361177f578492505050610afe565b5061175b565b50600019949350505050565b60006001600160801b038316808311156117be576040516365f4e9df60e01b815260040160405180910390fd5b610f996117cb8560801c90565b60801b6001600160801b0385161790565b60008060006117eb8560801c90565b90506001600160801b03851680851115611818576040516365f4e9df60e01b815260040160405180910390fd5b608082901b6001600160801b038616176118526118358785611e80565b61183f8885611ecf565b6001600160801b031660809190911b1790565b9350935050509250929050565b80511561186f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006001600160801b038311156118b55760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b038211156118dd57604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b6000806020838503121561190457600080fd5b82356001600160401b038082111561191b57600080fd5b818501915085601f83011261192f57600080fd5b81358181111561193e57600080fd5b86602082850101111561195057600080fd5b60209290920196919550909350505050565b60005b8381101561197d578181015183820152602001611965565b50506000910152565b6000815180845261199e816020860160208601611962565b601f01601f19169290920160200192915050565b602081526000610afe6020830184611986565b6001600160a01b038116811461188857600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611a1257611a126119da565b60405290565b60405160a081016001600160401b0381118282101715611a1257611a126119da565b604051601f8201601f191681016001600160401b0381118282101715611a6257611a626119da565b604052919050565b60006001600160401b03821115611a8357611a836119da565b50601f01601f191660200190565b60008060408385031215611aa457600080fd5b8235611aaf816119c5565b915060208301356001600160401b03811115611aca57600080fd5b8301601f81018513611adb57600080fd5b8035611aee611ae982611a6a565b611a3a565b818152866020838501011115611b0357600080fd5b816020840160208301376000602083830101528093505050509250929050565b600080600060608486031215611b3857600080fd5b8335611b43816119c5565b92506020840135611b53816119c5565b91506040840135611b63816119c5565b809150509250925092565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006020808385031215611bb057600080fd5b82516001600160401b0380821115611bc757600080fd5b9084019081860360c0811215611bdc57600080fd5b611be46119f0565b835183811115611bf357600080fd5b84019250601f83018813611c0657600080fd5b8251611c14611ae982611a6a565b8181528987838701011115611c2857600080fd5b611c3782888301898801611962565b82525060a0601f1983011215611c4c57600080fd5b611c54611a18565b9250848401519150611c65826119c5565b818352604084015185840152606084015160408401526080840151606084015260a084015193508315158414611c9a57600080fd5b608083019390935250918101919091529392505050565b7f556e737570706f7274656420444944204d6574686f643a202700000000000000815260008251611ce9816019850160208701611962565b602760f81b6019939091019283015250601a01919050565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c7665446f63756060820152631b595b9d60e21b608082015260a060208201526000610afe60a0830184611986565b600060208284031215611d6757600080fd5b8151610afe816119c5565b60408152602460408201527f556e6976657273616c4469645265736f6c7665722e7265736f6c76654d6574616060820152636461746160e01b608082015260a060208201526000610afe60a0830184611986565b805160208201516bffffffffffffffffffffffff198082169291906014831015611dfa5780818460140360031b1b83161693505b505050919050565b600060208284031215611e1457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082611e4e57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176102d1576102d1611e1b565b634e487b7160e01b600052603260045260246000fd5b808201808211156102d1576102d1611e1b565b60ff8181168382160290811690818114611eaf57611eaf611e1b565b5092915050565b60ff81811683821601908111156102d1576102d1611e1b565b818103818111156102d1576102d1611e1b565b60ff82811682821603908111156102d1576102d1611e1b565b60008251611f0d818460208701611962565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0101010101010101010101010101010101010101010101010101010101010101a2646970667358221220a378b03a8075cd6a222a23f4aea8f4759a08a6a746ec3b8ff574817c00d7d54764736f6c63430008170033" }, "0x0000000000000000000000000000000000005555": { "comment": "Proxy: Smart contract to manage schemas", @@ -192,13 +193,14 @@ "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", + "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000006ed1e6b395a6dfcecaab459744b5a84c0c6c40c" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000025d5440cf67ec858396dcd050fe62b3575da47a9" } }, - "0x06ed1e6b395a6dfcecaab459744b5a84c0c6c40c": { + "0x25d5440cf67ec858396dcd050fe62b3575da47a9": { "comment": "Implementation: Smart contract to manage schemas", - "code": "0x6080604052600436106100705760003560e01c806352d1902d1161004e57806352d1902d146100ca57806383d3fb3c146100f2578063ad3cb1cc14610112578063aebecb1c1461015057600080fd5b80634812cbf814610075578063485cc955146100975780634f1ef286146100b7575b600080fd5b34801561008157600080fd5b50610095610090366004610c36565b61017d565b005b3480156100a357600080fd5b506100956100b2366004610cf0565b610233565b6100956100c5366004610d70565b610334565b3480156100d657600080fd5b506100df610353565b6040519081526020015b60405180910390f35b3480156100fe57600080fd5b5061009561010d366004610e18565b610370565b34801561011e57600080fd5b50610143604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100e99190610ef4565b34801561015c57600080fd5b5061017061016b366004610f07565b610387565b6040516100e99190610f20565b6040516000906101a590601960f81b90839030908e908b908b908b908b908b90602001610f53565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8c1691830191909152606082018a9052608082018990529150610227908b9060019060a0016020604051602081039080840390855afa158015610213573d6000803e3d6000fd5b505050602060405103518888888888610491565b50505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff168061027d5750805467ffffffffffffffff808416911610155b1561029b5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556102c684610715565b600180546001600160a01b0319166001600160a01b038516179055805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61033c61073f565b610345826107e6565b61034f828261084c565b5050565b600061035d61090e565b5060008051602061124883398151915290565b61037f86338787878787610491565b505050505050565b61038f610bab565b6000828152600260205260408120600101548391036103c95760405163063de83560e21b8152600481018290526024015b60405180910390fd5b6000838152600260205260409081902081518083019092528054829082906103f090610fd9565b80601f016020809104026020016040519081016040528092919081815260200182805461041c90610fd9565b80156104695780601f1061043e57610100808354040283529160200191610469565b820191906000526020600020905b81548152906001019060200180831161044c57829003601f168201915b5050509183525050604080516020818101909252600193909301548352015291505b50919050565b6000858152600260205260409020600101548590156104c6576040516347f6332960e11b8152600481018290526024016103c0565b84848989806001600160a01b0316826001600160a01b03161461050f576040516316343f1760e31b81526001600160a01b038083166004830152831660248201526044016103c0565b6001546040516366874f2560e01b81526001600160a01b03909116906366874f2590610541908790879060040161100d565b60c060405180830381865afa92505050801561057a575060408051601f3d908101601f191682019092526105779181019061103c565b60015b610623573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b506105bf8163431dc9ff60e11b610957565b156105e1578484604051634c92543b60e01b81526004016103c092919061100d565b6105f281631859e3bb60e11b610957565b1561061457848460405163046cb69560e21b81526004016103c092919061100d565b61061d8161097b565b5061068c565b80516001600160a01b03848116911614610663576040516316343f1760e31b81526001600160a01b038084166004830152841660248201526044016103c0565b8060a001511561068a5784846040516350943b5760e11b81526004016103c092919061100d565b505b60008a81526002602052604090206106a587898361111b565b5060008a8152600260205260409081902042600190910155517f45fee04f2246b5d68ef5c7ef25c36f53a681e27c076395d9c46b22af51e8b782906106ff908c908f909182526001600160a01b0316602082015260400190565b60405180910390a1505050505050505050505050565b61071d610987565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806107c657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107ba600080516020611248833981519152546001600160a01b031690565b6001600160a01b031614155b156107e45760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561083157600080fd5b505afa158015610845573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156108a6575060408051601f3d908101601f191682019092526108a3918101906111db565b60015b6108ce57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016103c0565b60008051602061124883398151915281146108ff57604051632a87526960e21b8152600481018290526024016103c0565b61090983836109d0565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107e45760405163703e46dd60e11b815260040160405180910390fd5b600080610963846111f4565b6001600160e01b031984811691161491505092915050565b60208101815182018082fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107e457604051631afcd79f60e31b815260040160405180910390fd5b6109d982610a26565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a1e576109098282610a8b565b61034f610b01565b806001600160a01b03163b600003610a5c57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016103c0565b60008051602061124883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610aa8919061122b565b600060405180830381855af49150503d8060008114610ae3576040519150601f19603f3d011682016040523d82523d6000602084013e610ae8565b606091505b5091509150610af8858383610b20565b95945050505050565b34156107e45760405163b398979f60e01b815260040160405180910390fd5b606082610b3557610b3082610b7f565b610b78565b8151158015610b4c57506001600160a01b0384163b155b15610b7557604051639996b31560e01b81526001600160a01b03851660048201526024016103c0565b50805b9392505050565b805115610b8f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b604051806040016040528060608152602001610bd36040518060200160405280600081525090565b905290565b6001600160a01b0381168114610ba857600080fd5b60008083601f840112610bff57600080fd5b50813567ffffffffffffffff811115610c1757600080fd5b602083019150836020828501011115610c2f57600080fd5b9250929050565b600080600080600080600080600060e08a8c031215610c5457600080fd5b8935610c5f81610bd8565b985060208a013560ff81168114610c7557600080fd5b975060408a0135965060608a0135955060808a0135945060a08a013567ffffffffffffffff80821115610ca757600080fd5b610cb38d838e01610bed565b909650945060c08c0135915080821115610ccc57600080fd5b50610cd98c828d01610bed565b915080935050809150509295985092959850929598565b60008060408385031215610d0357600080fd5b8235610d0e81610bd8565b91506020830135610d1e81610bd8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d6857610d68610d29565b604052919050565b60008060408385031215610d8357600080fd5b8235610d8e81610bd8565b915060208381013567ffffffffffffffff80821115610dac57600080fd5b818601915086601f830112610dc057600080fd5b813581811115610dd257610dd2610d29565b610de4601f8201601f19168501610d3f565b91508082528784828501011115610dfa57600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060008060008060808789031215610e3157600080fd5b8635610e3c81610bd8565b955060208701359450604087013567ffffffffffffffff80821115610e6057600080fd5b610e6c8a838b01610bed565b90965094506060890135915080821115610e8557600080fd5b50610e9289828a01610bed565b979a9699509497509295939492505050565b60005b83811015610ebf578181015183820152602001610ea7565b50506000910152565b60008151808452610ee0816020860160208601610ea4565b601f01601f19169290920160200192915050565b602081526000610b786020830184610ec8565b600060208284031215610f1957600080fd5b5035919050565b602081526000825160406020840152610f3c6060840182610ec8565b905060208401515160408401528091505092915050565b6001600160f81b03198a81168252891660018201526bffffffffffffffffffffffff19606089811b8216600284015288901b1660168201526b637265617465536368656d6160a01b602a82015260368101869052600084866056840137848201605681016000815284868237506000930160560192835250909998505050505050505050565b600181811c90821680610fed57607f821691505b60208210810361048b57634e487b7160e01b600052602260045260246000fd5b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060c0828403121561104e57600080fd5b60405160c0810181811067ffffffffffffffff8211171561107157611071610d29565b604052825161107f81610bd8565b8152602083015161108f81610bd8565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015180151581146110c757600080fd5b60a08201529392505050565b601f821115610909576000816000526020600020601f850160051c810160208610156110fc5750805b601f850160051c820191505b8181101561037f57828155600101611108565b67ffffffffffffffff83111561113357611133610d29565b611147836111418354610fd9565b836110d3565b6000601f84116001811461117b57600085156111635750838201355b600019600387901b1c1916600186901b178355610845565b600083815260209020601f19861690835b828110156111ac578685013582556020948501946001909201910161118c565b50868210156111c95760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156111ed57600080fd5b5051919050565b805160208201516001600160e01b031980821692919060048310156112235780818460040360031b1b83161693505b505050919050565b6000825161123d818460208701610ea4565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212208a86bfb0b7ac9eb68b3e60d3ccc61460dc67be6170ceaca1e08d341f09f54ef364736f6c63430008170033" + "code": "0x6080604052600436106100705760003560e01c806383d3fb3c1161004e57806383d3fb3c146100d2578063ad3cb1cc146100f2578063aebecb1c14610130578063c0c53b8b1461015d57600080fd5b80634812cbf8146100755780634f1ef2861461009757806352d1902d146100aa575b600080fd5b34801561008157600080fd5b50610095610090366004610ca7565b61017d565b005b6100956100a5366004610da8565b610233565b3480156100b657600080fd5b506100bf610252565b6040519081526020015b60405180910390f35b3480156100de57600080fd5b506100956100ed366004610e50565b61026f565b3480156100fe57600080fd5b50610123604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100c99190610f2c565b34801561013c57600080fd5b5061015061014b366004610f3f565b610286565b6040516100c99190610f58565b34801561016957600080fd5b50610095610178366004610f8b565b610390565b6040516000906101a590601960f81b90839030908e908b908b908b908b908b90602001610fd6565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8c1691830191909152606082018a9052608082018990529150610227908b9060019060a0016020604051602081039080840390855afa158015610213573d6000803e3d6000fd5b5050506020604051035188888888886104a7565b50505050505050505050565b61023b610786565b6102448261082d565b61024e8282610893565b5050565b600061025c610955565b506000805160206112b883398151915290565b61027e863387878787876104a7565b505050505050565b61028e610c1c565b6000828152600360205260408120600101548391036102c85760405163063de83560e21b8152600481018290526024015b60405180910390fd5b6000838152600360205260409081902081518083019092528054829082906102ef9061105c565b80601f016020809104026020016040519081016040528092919081815260200182805461031b9061105c565b80156103685780601f1061033d57610100808354040283529160200191610368565b820191906000526020600020905b81548152906001019060200180831161034b57829003601f168201915b5050509183525050604080516020818101909252600193909301548352015291505b50919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806103da5750805467ffffffffffffffff808416911610155b156103f85760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b1781556104238561099e565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff00000000000000001916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b1580156104ea57600080fd5b505afa1580156104fe573d6000803e3d6000fd5b50505060008681526003602052604090206001015486915015610537576040516347f6332960e11b8152600481018290526024016102bf565b84848989806001600160a01b0316826001600160a01b031614610580576040516316343f1760e31b81526001600160a01b038083166004830152831660248201526044016102bf565b6001546040516366874f2560e01b81526001600160a01b03909116906366874f25906105b29087908790600401611090565b60a060405180830381865afa9250505080156105eb575060408051601f3d908101601f191682019092526105e8918101906110bf565b60015b610694573d808015610619576040519150601f19603f3d011682016040523d82523d6000602084013e61061e565b606091505b506106308163431dc9ff60e11b6109c8565b15610652578484604051634c92543b60e01b81526004016102bf929190611090565b61066381631859e3bb60e11b6109c8565b1561068557848460405163046cb69560e21b81526004016102bf929190611090565b61068e816109ec565b506106fd565b80516001600160a01b038481169116146106d4576040516316343f1760e31b81526001600160a01b038084166004830152841660248201526044016102bf565b8060800151156106fb5784846040516350943b5760e11b81526004016102bf929190611090565b505b60008a815260036020526040902061071687898361118b565b5060008a8152600360205260409081902042600190910155517f45fee04f2246b5d68ef5c7ef25c36f53a681e27c076395d9c46b22af51e8b78290610770908c908f909182526001600160a01b0316602082015260400190565b60405180910390a1505050505050505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061080d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108016000805160206112b8833981519152546001600160a01b031690565b6001600160a01b031614155b1561082b5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561087857600080fd5b505afa15801561088c573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156108ed575060408051601f3d908101601f191682019092526108ea9181019061124b565b60015b61091557604051634c9c8ce360e01b81526001600160a01b03831660048201526024016102bf565b6000805160206112b8833981519152811461094657604051632a87526960e21b8152600481018290526024016102bf565b61095083836109f8565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461082b5760405163703e46dd60e11b815260040160405180910390fd5b6109a6610a4e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806109d484611264565b6001600160e01b031984811691161491505092915050565b60208101815182018082fd5b610a0182610a97565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a46576109508282610afc565b61024e610b72565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661082b57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610acd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016102bf565b6000805160206112b883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610b19919061129b565b600060405180830381855af49150503d8060008114610b54576040519150601f19603f3d011682016040523d82523d6000602084013e610b59565b606091505b5091509150610b69858383610b91565b95945050505050565b341561082b5760405163b398979f60e01b815260040160405180910390fd5b606082610ba657610ba182610bf0565b610be9565b8151158015610bbd57506001600160a01b0384163b155b15610be657604051639996b31560e01b81526001600160a01b03851660048201526024016102bf565b50805b9392505050565b805115610c005780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b604051806040016040528060608152602001610c446040518060200160405280600081525090565b905290565b6001600160a01b0381168114610c1957600080fd5b60008083601f840112610c7057600080fd5b50813567ffffffffffffffff811115610c8857600080fd5b602083019150836020828501011115610ca057600080fd5b9250929050565b600080600080600080600080600060e08a8c031215610cc557600080fd5b8935610cd081610c49565b985060208a013560ff81168114610ce657600080fd5b975060408a0135965060608a0135955060808a0135945060a08a013567ffffffffffffffff80821115610d1857600080fd5b610d248d838e01610c5e565b909650945060c08c0135915080821115610d3d57600080fd5b50610d4a8c828d01610c5e565b915080935050809150509295985092959850929598565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610da057610da0610d61565b604052919050565b60008060408385031215610dbb57600080fd5b8235610dc681610c49565b915060208381013567ffffffffffffffff80821115610de457600080fd5b818601915086601f830112610df857600080fd5b813581811115610e0a57610e0a610d61565b610e1c601f8201601f19168501610d77565b91508082528784828501011115610e3257600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060008060008060808789031215610e6957600080fd5b8635610e7481610c49565b955060208701359450604087013567ffffffffffffffff80821115610e9857600080fd5b610ea48a838b01610c5e565b90965094506060890135915080821115610ebd57600080fd5b50610eca89828a01610c5e565b979a9699509497509295939492505050565b60005b83811015610ef7578181015183820152602001610edf565b50506000910152565b60008151808452610f18816020860160208601610edc565b601f01601f19169290920160200192915050565b602081526000610be96020830184610f00565b600060208284031215610f5157600080fd5b5035919050565b602081526000825160406020840152610f746060840182610f00565b905060208401515160408401528091505092915050565b600080600060608486031215610fa057600080fd5b8335610fab81610c49565b92506020840135610fbb81610c49565b91506040840135610fcb81610c49565b809150509250925092565b6001600160f81b03198a81168252891660018201526bffffffffffffffffffffffff19606089811b8216600284015288901b1660168201526b637265617465536368656d6160a01b602a82015260368101869052600084866056840137848201605681016000815284868237506000930160560192835250909998505050505050505050565b600181811c9082168061107057607f821691505b60208210810361038a57634e487b7160e01b600052602260045260246000fd5b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060a082840312156110d157600080fd5b60405160a0810181811067ffffffffffffffff821117156110f4576110f4610d61565b604052825161110281610c49565b808252506020830151602082015260408301516040820152606083015160608201526080830151801515811461113757600080fd5b60808201529392505050565b601f821115610950576000816000526020600020601f850160051c8101602086101561116c5750805b601f850160051c820191505b8181101561027e57828155600101611178565b67ffffffffffffffff8311156111a3576111a3610d61565b6111b7836111b1835461105c565b83611143565b6000601f8411600181146111eb57600085156111d35750838201355b600019600387901b1c1916600186901b17835561088c565b600083815260209020601f19861690835b8281101561121c57868501358255602094850194600190920191016111fc565b50868210156112395760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60006020828403121561125d57600080fd5b5051919050565b805160208201516001600160e01b031980821692919060048310156112935780818460040360031b1b83161693505b505050919050565b600082516112ad818460208701610edc565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204a6b1c815f9db84a075438a82bb7288cd09a021162c7a5a6477e3c55e4473b1064736f6c63430008170033" }, "0x0000000000000000000000000000000000004444": { "comment": "Proxy: Smart contract to manage credential definitions", @@ -206,14 +208,15 @@ "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", - "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000005555", + "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000006666", + "0000000000000000000000000000000000000000000000000000000000000003": "0x0000000000000000000000000000000000000000000000000000000000005555", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000f393f3f457e98fad7be826b115cf56915d19136c" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000592851911a1390a89bb93a4e00dc3818e6d84b03" } }, - "0xf393f3f457e98fad7be826b115cf56915d19136c": { + "0x592851911a1390a89bb93a4e00dc3818e6d84b03": { "comment": "Implementation: Smart contract to manage credential definitions", - "code": "0x6080604052600436106100705760003560e01c80639f889db51161004e5780639f889db5146100d2578063ad3cb1cc146100ff578063b6c409751461013d578063c0c53b8b1461015d57600080fd5b80631108cd7b146100755780634f1ef2861461009757806352d1902d146100aa575b600080fd5b34801561008157600080fd5b50610095610090366004610ccc565b61017d565b005b6100956100a5366004610e47565b610237565b3480156100b657600080fd5b506100bf610256565b6040519081526020015b60405180910390f35b3480156100de57600080fd5b506100f26100ed366004610ed9565b610273565b6040516100c99190610f42565b34801561010b57600080fd5b50610130604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100c99190610f75565b34801561014957600080fd5b50610095610158366004610f88565b61037d565b34801561016957600080fd5b5061009561017836600461101d565b610396565b6040516000906101a790601960f81b90839030908f908c908c908c908c908c908c90602001611068565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a9052915061022a908c9060019060a0016020604051602081039080840390855afa158015610215573d6000803e3d6000fd5b505050602060405103518989898989896104aa565b5050505050505050505050565b61023f6107ac565b61024882610853565b61025282826108b9565b5050565b600061026061097b565b5060008051602061144283398151915290565b61027b610c42565b6000828152600360205260408120600101548391036102b557604051634f4e6fe360e11b8152600481018290526024015b60405180910390fd5b6000838152600360205260409081902081518083019092528054829082906102dc90611100565b80601f016020809104026020016040519081016040528092919081815260200182805461030890611100565b80156103555780601f1061032a57610100808354040283529160200191610355565b820191906000526020600020905b81548152906001019060200180831161033857829003601f168201915b5050509183525050604080516020818101909252600193909301548352015291505b50919050565b61038d87338888888888886104aa565b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806103df575080546001600160401b03808416911610155b156103fd5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610427856109c4565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6000868152600360205260409020600101548690156104df5760405163b1a7a2af60e01b8152600481018290526024016102ac565b85858a8a806001600160a01b0316826001600160a01b031614610528576040516316343f1760e31b81526001600160a01b038083166004830152831660248201526044016102ac565b6001546040516366874f2560e01b81526001600160a01b03909116906366874f259061055a9087908790600401611134565b60c060405180830381865afa925050508015610593575060408051601f3d908101601f1916820190925261059091810190611163565b60015b61063c573d8080156105c1576040519150601f19603f3d011682016040523d82523d6000602084013e6105c6565b606091505b506105d88163431dc9ff60e11b6109ee565b156105fa578484604051634c92543b60e01b81526004016102ac929190611134565b61060b81631859e3bb60e11b6109ee565b1561062d57848460405163046cb69560e21b81526004016102ac929190611134565b61063681610a12565b506106a5565b80516001600160a01b0384811691161461067c576040516316343f1760e31b81526001600160a01b038084166004830152841660248201526044016102ac565b8060a00151156106a35784846040516350943b5760e11b81526004016102ac929190611134565b505b600254604051632bafb2c760e21b8152600481018a905289916001600160a01b03169063aebecb1c906024016000604051808303816000875af11580156106f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261071891908101906111f9565b5060008c8152600360205260409020610732888a83611316565b5042600360008e8152602001908152602001600020600101600001819055507f61a38b1ae2b65567a5f16692367ae7ac5760505f17b3b6e83e306795b9a83ffc8c8f6040516107949291909182526001600160a01b0316602082015260400190565b60405180910390a15050505050505050505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061083357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610827600080516020611442833981519152546001600160a01b031690565b6001600160a01b031614155b156108515760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561089e57600080fd5b505afa1580156108b2573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610913575060408051601f3d908101601f19168201909252610910918101906113d5565b60015b61093b57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016102ac565b600080516020611442833981519152811461096c57604051632a87526960e21b8152600481018290526024016102ac565b6109768383610a1e565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108515760405163703e46dd60e11b815260040160405180910390fd5b6109cc610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806109fa846113ee565b6001600160e01b031984811691161491505092915050565b60208101815182018082fd5b610a2782610abd565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610a6c576109768282610b22565b610252610b98565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661085157604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610af357604051634c9c8ce360e01b81526001600160a01b03821660048201526024016102ac565b60008051602061144283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610b3f9190611425565b600060405180830381855af49150503d8060008114610b7a576040519150601f19603f3d011682016040523d82523d6000602084013e610b7f565b606091505b5091509150610b8f858383610bb7565b95945050505050565b34156108515760405163b398979f60e01b815260040160405180910390fd5b606082610bcc57610bc782610c16565b610c0f565b8151158015610be357506001600160a01b0384163b155b15610c0c57604051639996b31560e01b81526001600160a01b03851660048201526024016102ac565b50805b9392505050565b805115610c265780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b604051806040016040528060608152602001610c6a6040518060200160405280600081525090565b905290565b6001600160a01b0381168114610c3f57600080fd5b60008083601f840112610c9657600080fd5b5081356001600160401b03811115610cad57600080fd5b602083019150836020828501011115610cc557600080fd5b9250929050565b6000806000806000806000806000806101008b8d031215610cec57600080fd5b8a35610cf781610c6f565b995060208b013560ff81168114610d0d57600080fd5b985060408b0135975060608b0135965060808b0135955060a08b01356001600160401b0380821115610d3e57600080fd5b610d4a8e838f01610c84565b909750955060c08d0135945060e08d0135915080821115610d6a57600080fd5b50610d778d828e01610c84565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715610dc857610dc8610d90565b60405290565b604051602081016001600160401b0381118282101715610dc857610dc8610d90565b604051601f8201601f191681016001600160401b0381118282101715610e1857610e18610d90565b604052919050565b60006001600160401b03821115610e3957610e39610d90565b50601f01601f191660200190565b60008060408385031215610e5a57600080fd5b8235610e6581610c6f565b915060208301356001600160401b03811115610e8057600080fd5b8301601f81018513610e9157600080fd5b8035610ea4610e9f82610e20565b610df0565b818152866020838501011115610eb957600080fd5b816020840160208301376000602083830101528093505050509250929050565b600060208284031215610eeb57600080fd5b5035919050565b60005b83811015610f0d578181015183820152602001610ef5565b50506000910152565b60008151808452610f2e816020860160208601610ef2565b601f01601f19169290920160200192915050565b602081526000825160406020840152610f5e6060840182610f16565b905060208401515160408401528091505092915050565b602081526000610c0f6020830184610f16565b600080600080600080600060a0888a031215610fa357600080fd5b8735610fae81610c6f565b96506020880135955060408801356001600160401b0380821115610fd157600080fd5b610fdd8b838c01610c84565b909750955060608a0135945060808a0135915080821115610ffd57600080fd5b5061100a8a828b01610c84565b989b979a50959850939692959293505050565b60008060006060848603121561103257600080fd5b833561103d81610c6f565b9250602084013561104d81610c6f565b9150604084013561105d81610c6f565b809150509250925092565b6001600160f81b03198b811682528a1660018201526bffffffffffffffffffffffff1960608a811b8216600284015289901b1660168201527f63726561746543726564656e7469616c446566696e6974696f6e000000000000602a82015260448101879052600085876064840137858201856064820152838560848301376000930160840192835250909a9950505050505050505050565b600181811c9082168061111457607f821691505b60208210810361037757634e487b7160e01b600052602260045260246000fd5b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060c0828403121561117557600080fd5b60405160c081018181106001600160401b038211171561119757611197610d90565b60405282516111a581610c6f565b815260208301516111b581610c6f565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015180151581146111ed57600080fd5b60a08201529392505050565b6000602080838503121561120c57600080fd5b82516001600160401b038082111561122357600080fd5b90840190818603604081121561123857600080fd5b611240610da6565b83518381111561124f57600080fd5b84019250601f8301881361126257600080fd5b8251611270610e9f82610e20565b818152898783870101111561128457600080fd5b61129382888301898801610ef2565b825250601f1982018513156112a757600080fd5b6112af610dce565b938501518452938401929092525090949350505050565b601f821115610976576000816000526020600020601f850160051c810160208610156112ef5750805b601f850160051c820191505b8181101561130e578281556001016112fb565b505050505050565b6001600160401b0383111561132d5761132d610d90565b6113418361133b8354611100565b836112c6565b6000601f841160018114611375576000851561135d5750838201355b600019600387901b1c1916600186901b1783556108b2565b600083815260209020601f19861690835b828110156113a65786850135825560209485019460019092019101611386565b50868210156113c35760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156113e757600080fd5b5051919050565b805160208201516001600160e01b0319808216929190600483101561141d5780818460040360031b1b83161693505b505050919050565b60008251611437818460208701610ef2565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220762be381bdad8d175a0c6df96ec63f1368d1642451ab2078a30a7c4a2f15ee5264736f6c63430008170033" + "code": "0x6080604052600436106100705760003560e01c80639f889db51161004e5780639f889db5146100d2578063ad3cb1cc146100ff578063b6c409751461013d578063f8c8765e1461015d57600080fd5b80631108cd7b146100755780634f1ef2861461009757806352d1902d146100aa575b600080fd5b34801561008157600080fd5b50610095610090366004610d35565b61017d565b005b6100956100a5366004610eb0565b610237565b3480156100b657600080fd5b506100bf610256565b6040519081526020015b60405180910390f35b3480156100de57600080fd5b506100f26100ed366004610f42565b610273565b6040516100c99190610fab565b34801561010b57600080fd5b50610130604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100c99190610fde565b34801561014957600080fd5b50610095610158366004610ff1565b61037d565b34801561016957600080fd5b50610095610178366004611086565b610396565b6040516000906101a790601960f81b90839030908f908c908c908c908c908c908c906020016110e2565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a9052915061022a908c9060019060a0016020604051602081039080840390855afa158015610215573d6000803e3d6000fd5b505050602060405103518989898989896104b8565b5050505050505050505050565b61023f610815565b610248826108bc565b6102528282610922565b5050565b60006102606109e4565b506000805160206114a983398151915290565b61027b610cab565b6000828152600460205260408120600101548391036102b557604051634f4e6fe360e11b8152600481018290526024015b60405180910390fd5b6000838152600460205260409081902081518083019092528054829082906102dc9061117a565b80601f01602080910402602001604051908101604052809291908181526020018280546103089061117a565b80156103555780601f1061032a57610100808354040283529160200191610355565b820191906000526020600020905b81548152906001019060200180831161033857829003601f168201915b5050509183525050604080516020818101909252600193909301548352015291505b50919050565b61038d87338888888888886104b8565b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806103df575080546001600160401b03808416911610155b156103fd5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561042786610a2d565b600180546001600160a01b038781166001600160a01b031992831617909255600380548784169083161790556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b1580156104fb57600080fd5b505afa15801561050f573d6000803e3d6000fd5b505050600087815260046020526040902060010154879150156105485760405163b1a7a2af60e01b8152600481018290526024016102ac565b85858a8a806001600160a01b0316826001600160a01b031614610591576040516316343f1760e31b81526001600160a01b038083166004830152831660248201526044016102ac565b6001546040516366874f2560e01b81526001600160a01b03909116906366874f25906105c390879087906004016111ae565b60a060405180830381865afa9250505080156105fc575060408051601f3d908101601f191682019092526105f9918101906111dd565b60015b6106a5573d80801561062a576040519150601f19603f3d011682016040523d82523d6000602084013e61062f565b606091505b506106418163431dc9ff60e11b610a57565b15610663578484604051634c92543b60e01b81526004016102ac9291906111ae565b61067481631859e3bb60e11b610a57565b1561069657848460405163046cb69560e21b81526004016102ac9291906111ae565b61069f81610a7b565b5061070e565b80516001600160a01b038481169116146106e5576040516316343f1760e31b81526001600160a01b038084166004830152841660248201526044016102ac565b80608001511561070c5784846040516350943b5760e11b81526004016102ac9291906111ae565b505b600354604051632bafb2c760e21b8152600481018a905289916001600160a01b03169063aebecb1c906024016000604051808303816000875af1158015610759573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107819190810190611260565b5060008c815260046020526040902061079b888a8361137d565b5042600460008e8152602001908152602001600020600101600001819055507f61a38b1ae2b65567a5f16692367ae7ac5760505f17b3b6e83e306795b9a83ffc8c8f6040516107fd9291909182526001600160a01b0316602082015260400190565b60405180910390a15050505050505050505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061089c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108906000805160206114a9833981519152546001600160a01b031690565b6001600160a01b031614155b156108ba5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b15801561090757600080fd5b505afa15801561091b573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561097c575060408051601f3d908101601f191682019092526109799181019061143c565b60015b6109a457604051634c9c8ce360e01b81526001600160a01b03831660048201526024016102ac565b6000805160206114a983398151915281146109d557604051632a87526960e21b8152600481018290526024016102ac565b6109df8383610a87565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108ba5760405163703e46dd60e11b815260040160405180910390fd5b610a35610add565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080610a6384611455565b6001600160e01b031984811691161491505092915050565b60208101815182018082fd5b610a9082610b26565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610ad5576109df8282610b8b565b610252610c01565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166108ba57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610b5c57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016102ac565b6000805160206114a983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610ba8919061148c565b600060405180830381855af49150503d8060008114610be3576040519150601f19603f3d011682016040523d82523d6000602084013e610be8565b606091505b5091509150610bf8858383610c20565b95945050505050565b34156108ba5760405163b398979f60e01b815260040160405180910390fd5b606082610c3557610c3082610c7f565b610c78565b8151158015610c4c57506001600160a01b0384163b155b15610c7557604051639996b31560e01b81526001600160a01b03851660048201526024016102ac565b50805b9392505050565b805115610c8f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b604051806040016040528060608152602001610cd36040518060200160405280600081525090565b905290565b6001600160a01b0381168114610ca857600080fd5b60008083601f840112610cff57600080fd5b5081356001600160401b03811115610d1657600080fd5b602083019150836020828501011115610d2e57600080fd5b9250929050565b6000806000806000806000806000806101008b8d031215610d5557600080fd5b8a35610d6081610cd8565b995060208b013560ff81168114610d7657600080fd5b985060408b0135975060608b0135965060808b0135955060a08b01356001600160401b0380821115610da757600080fd5b610db38e838f01610ced565b909750955060c08d0135945060e08d0135915080821115610dd357600080fd5b50610de08d828e01610ced565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715610e3157610e31610df9565b60405290565b604051602081016001600160401b0381118282101715610e3157610e31610df9565b604051601f8201601f191681016001600160401b0381118282101715610e8157610e81610df9565b604052919050565b60006001600160401b03821115610ea257610ea2610df9565b50601f01601f191660200190565b60008060408385031215610ec357600080fd5b8235610ece81610cd8565b915060208301356001600160401b03811115610ee957600080fd5b8301601f81018513610efa57600080fd5b8035610f0d610f0882610e89565b610e59565b818152866020838501011115610f2257600080fd5b816020840160208301376000602083830101528093505050509250929050565b600060208284031215610f5457600080fd5b5035919050565b60005b83811015610f76578181015183820152602001610f5e565b50506000910152565b60008151808452610f97816020860160208601610f5b565b601f01601f19169290920160200192915050565b602081526000825160406020840152610fc76060840182610f7f565b905060208401515160408401528091505092915050565b602081526000610c786020830184610f7f565b600080600080600080600060a0888a03121561100c57600080fd5b873561101781610cd8565b96506020880135955060408801356001600160401b038082111561103a57600080fd5b6110468b838c01610ced565b909750955060608a0135945060808a013591508082111561106657600080fd5b506110738a828b01610ced565b989b979a50959850939692959293505050565b6000806000806080858703121561109c57600080fd5b84356110a781610cd8565b935060208501356110b781610cd8565b925060408501356110c781610cd8565b915060608501356110d781610cd8565b939692955090935050565b6001600160f81b03198b811682528a1660018201526bffffffffffffffffffffffff1960608a811b8216600284015289901b1660168201527f63726561746543726564656e7469616c446566696e6974696f6e000000000000602a82015260448101879052600085876064840137858201856064820152838560848301376000930160840192835250909a9950505050505050505050565b600181811c9082168061118e57607f821691505b60208210810361037757634e487b7160e01b600052602260045260246000fd5b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600060a082840312156111ef57600080fd5b60405160a081018181106001600160401b038211171561121157611211610df9565b604052825161121f81610cd8565b808252506020830151602082015260408301516040820152606083015160608201526080830151801515811461125457600080fd5b60808201529392505050565b6000602080838503121561127357600080fd5b82516001600160401b038082111561128a57600080fd5b90840190818603604081121561129f57600080fd5b6112a7610e0f565b8351838111156112b657600080fd5b84019250601f830188136112c957600080fd5b82516112d7610f0882610e89565b81815289878387010111156112eb57600080fd5b6112fa82888301898801610f5b565b825250601f19820185131561130e57600080fd5b611316610e37565b938501518452938401929092525090949350505050565b601f8211156109df576000816000526020600020601f850160051c810160208610156113565750805b601f850160051c820191505b8181101561137557828155600101611362565b505050505050565b6001600160401b0383111561139457611394610df9565b6113a8836113a2835461117a565b8361132d565b6000601f8411600181146113dc57600085156113c45750838201355b600019600387901b1c1916600186901b17835561091b565b600083815260209020601f19861690835b8281101561140d57868501358255602094850194600190920191016113ed565b508682101561142a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60006020828403121561144e57600080fd5b5051919050565b805160208201516001600160e01b031980821692919060048310156114845780818460040360031b1b83161693505b505050919050565b6000825161149e818460208701610f5b565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209ac2115acd101f13fa3e2341ea45d9168779ac5a4311acb1e8f74c2de7ba058c64736f6c63430008170033" }, "0x0000000000000000000000000000000000017777": { "comment": "Proxy: Smart contract to store mapping of legacy identifiers to new one", @@ -221,13 +224,14 @@ "storage": { "0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000009999", "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", + "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000025fbafbfec258f928584ffa4f7ee62f0fc89eaa" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000012a67eb50d0c6b5409aabf7b2657dd1e998954af" } }, - "0x025fbafbfec258f928584ffa4f7ee62f0fc89eaa": { + "0x12a67eb50d0c6b5409aabf7b2657dd1e998954af": { "comment": "Implementation: Smart contract to store mapping of legacy identifiers to new one", - "code": "0x6080604052600436106100915760003560e01c806393a8c7421161005957806393a8c74214610133578063ad3cb1cc1461018c578063ae3d4da7146101ca578063c612ab58146101ea578063d924aedb1461020a57600080fd5b8063485cc955146100965780634f1ef286146100b857806352d1902d146100cb57806363de77a2146100f35780637223460a14610113575b600080fd5b3480156100a257600080fd5b506100b66100b1366004611685565b61022a565b005b6100b66100c6366004611743565b610328565b3480156100d757600080fd5b506100e0610347565b6040519081526020015b60405180910390f35b3480156100ff57600080fd5b506100b661010e3660046117e5565b610364565b34801561011f57600080fd5b506100b661012e36600461187f565b61037b565b34801561013f57600080fd5b5061017461014e36600461194f565b80516020818301810180516002825292820191909301209152546001600160a01b031681565b6040516001600160a01b0390911681526020016100ea565b34801561019857600080fd5b506101bd604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ea91906119ef565b3480156101d657600080fd5b506100b66101e5366004611a02565b610435565b3480156101f657600080fd5b506101bd61020536600461194f565b6104eb565b34801561021657600080fd5b506100b6610225366004611ab1565b610590565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff1680610273575080546001600160401b03808416911610155b156102915760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556102bb846105a9565b600180546001600160a01b0319166001600160a01b038516179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6103306105d3565b6103398261067a565b61034382826106e0565b5050565b60006103516107a7565b50600080516020611f2383398151915290565b610373863387878787876107f0565b505050505050565b6040516000906103a590601960f81b90839030908f908c908c908c908c908c908c90602001611b5b565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a90529150610428908c9060019060a0016020604051602081039080840390855afa158015610413573d6000803e3d6000fd5b50505060206040510351898989898989610997565b5050505050505050505050565b60405160009061045d90601960f81b90839030908e908b908b908b908b908b90602001611bf6565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8c1691830191909152606082018a90526080820189905291506104df908b9060019060a0016020604051602081039080840390855afa1580156104cb573d6000803e3d6000fd5b5050506020604051035188888888886107f0565b50505050505050505050565b80516020818301810180516003825292820191909301209152805461050f90611c79565b80601f016020809104026020016040519081016040528092919081815260200182805461053b90611c79565b80156105885780601f1061055d57610100808354040283529160200191610588565b820191906000526020600020905b81548152906001019060200180831161056b57829003601f168201915b505050505081565b6105a08733888888888888610997565b50505050505050565b6105b1610bd4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061065a57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661064e600080516020611f23833981519152546001600160a01b031690565b6001600160a01b031614155b156106785760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156106c557600080fd5b505afa1580156106d9573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561073a575060408051601f3d908101601f1916820190925261073791810190611cb3565b60015b61076757604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020611f23833981519152811461079857604051632a87526960e21b81526004810182905260240161075e565b6107a28383610c1d565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106785760405163703e46dd60e11b815260040160405180910390fd5b8686806001600160a01b0316826001600160a01b031614610837576040516316343f1760e31b81526001600160a01b0380831660048301528316602482015260440161075e565b60006001600160a01b031660028888604051610854929190611ccc565b908152604051908190036020019020546001600160a01b03161461088f578686604051630ab7bdc760e21b815260040161075e929190611d05565b846001600160801b0319166108d988888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c7392505050565b6108e290611d19565b6001600160801b0319161461091057848787604051630876c99d60e21b815260040161075e93929190611d50565b8860028888604051610923929190611ccc565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091557f701a83f8a2a9633e0e6442d096d21203cf8f4b735a8a7298e13cefc208e0f75a9061098490899089908d90611d6a565b60405180910390a1505050505050505050565b8787806001600160a01b0316826001600160a01b0316146109de576040516316343f1760e31b81526001600160a01b0380831660048301528316602482015260440161075e565b600386866040516109f0929190611ccc565b90815260200160405180910390208054610a0990611c79565b159050610a2d5785856040516327ef3c3d60e01b815260040161075e929190611d05565b60028888604051610a3f929190611ccc565b908152604051908190036020019020546001600160a01b038b8116911614610aaf578960028989604051610a74929190611ccc565b908152604051908190036020018120546316343f1760e31b82526001600160a01b03928316600483015291909116602482015260440161075e565b610b36610af189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8492505050565b610b3088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8492505050565b90610c8f565b610b5b578585898960405163998f70a160e01b815260040161075e9493929190611d96565b838360038888604051610b6f929190611ccc565b90815260200160405180910390209182610b8a929190611e10565b507f87526cc0385862de920bf8b05560b5c9eb58f8af45be9f917801198166655f8886868686604051610bc09493929190611d96565b60405180910390a150505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661067857604051631afcd79f60e31b815260040160405180910390fd5b610c2682610ca2565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610c6b576107a28282610d07565b610343610d7d565b6060610c7e82610d9c565b92915050565b6000610c7e826110c2565b6000610c9b83836110d6565b9392505050565b806001600160a01b03163b600003610cd857604051634c9c8ce360e01b81526001600160a01b038216600482015260240161075e565b600080516020611f2383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610d249190611ecf565b600060405180830381855af49150503d8060008114610d5f576040519150601f19603f3d011682016040523d82523d6000602084013e610d64565b606091505b5091509150610d748583836110ee565b95945050505050565b34156106785760405163b398979f60e01b815260040160405180910390fd5b80516060906031906000805b8281108015610dcf575083868281518110610dc557610dc5611eeb565b016020015160f81c145b15610de05760019182019101610da8565b5060008080806117e361209f8702046001016002026001600160401b03811115610e0c57610e0c6116b8565b6040519080825280601f01601f191660200182016040528015610e36576020820181803683370190505b5090506000600460038801046001600160401b03811115610e5957610e596116b8565b604051908082528060200260200182016040528015610e82578160200160208202803683370190505b50905060005b8a51811015610f805760008b8281518110610ea557610ea5611eeb565b602001015160f81c60f81b9050610ed46040518060600160405280603a8152602001611f43603a91398261114a565b909650945084610ef9578b604051634cb9e47360e11b815260040161075e91906119ef565b8251600019015b60008112610f765786848281518110610f1b57610f1b611eeb565b602002602001015163ffffffff16603a026001600160401b0316019750602088901c96508763ffffffff16848281518110610f5857610f58611eeb565b63ffffffff9092166020928302919091019091015260001901610f00565b5050600101610e88565b50600860038816026001600160401b038116600003610f9d575060205b600719016000805b8351811015611047575b6020836001600160401b0316101561103b57826001600160401b0316848281518110610fdd57610fdd611eeb565b602002602001015163ffffffff16901c60f81b85838151811061100257611002611eeb565b60200101906001600160f81b031916908160001a90535060019091019060086001600160401b0384161061103b57600883039250610faf565b60189250600101610fa5565b50875b84518110156110a557600060f81b85828151811061106a5761106a611eeb565b01602001516001600160f81b031916111561109d5761108c858a8303846111ad565b9d9c50505050505050505050505050565b60010161104a565b506110b2846000836111ad565b9c9b505050505050505050505050565b600080602083019050610c9b81845161125e565b60006000196110e5848461126a565b14159392505050565b606082611103576110fe82611375565b610c9b565b815115801561111a57506001600160a01b0384163b155b1561114357604051639996b31560e01b81526001600160a01b038516600482015260240161075e565b5092915050565b60008060005b845181101561119d57836001600160f81b03191685828151811061117657611176611eeb565b01602001516001600160f81b03191603611195579150600190506111a6565b600101611150565b50600080915091505b9250929050565b606060008383036001600160401b038111156111cb576111cb6116b8565b6040519080825280601f01601f1916602001820160405280156111f5576020820181803683370190505b50905060005b84840381101561125557858582018151811061121957611219611eeb565b602001015160f81c60f81b82828151811061123657611236611eeb565b60200101906001600160f81b031916908160001a9053506001016111fb565b50949350505050565b6000610c9b838361139e565b60006001600160801b0383811690831680830361128c57600092505050610c7e565b81158061129857508181115b156112a95760001992505050610c7e565b60006112b58660801c90565b905060006112c38660801c90565b905060006112d2825160001a90565b90505b60006112e28487846113aa565b905060001981036112fd576000199650505050505050610c7e565b9485900394928301928585111561131e576000199650505050505050610c7e565b8483208585200361134a576113338960801c90565b61133d9085611f01565b9650505050505050610c7e565b85600103611362576000199650505050505050610c7e565b60001990950194600190930192506112d5565b8051156113855780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610c9b8383611483565b6000602083116113c6576113bf8484846114e9565b9050610c9b565b83601f8416808503820160ff85167f0101010101010101010101010101010101010101010101010101010101010101025b81881015611439578751811861140c8161161e565b1561142d578489036114208a60208a6114e9565b0195505050505050610c9b565b602089019850506113f7565b8260000361144f57600019945050505050610c9b565b61145a8284886114e9565b9450600019850361147357600019945050505050610c9b565b8382038501945050505050610c9b565b60006001600160801b038311156114ad5760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b038211156114d557604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b82516000908160208511156114fd57602094505b601285106115995760ff84167f010101010101010101010101010101010101010101010101010101010101010102821861153f6001600160801b03821761161e565b6000036115755760109150601a8610611570576115646001600160401b03821761161e565b60000361157057601891505b611593565b6115876001600160c01b03821761161e565b60000361159357600891505b506115e9565b600a85106115e95760ff84167f01010101010101010101010101010101010101010101010101010101010101010282186115db6001600160c01b03821761161e565b6000036115e757600891505b505b848110156116115781811a60ff8516810361160857509150610c9b9050565b506001016115e9565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b80356001600160a01b038116811461168057600080fd5b919050565b6000806040838503121561169857600080fd5b6116a183611669565b91506116af60208401611669565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156116e8576116e86116b8565b604051601f8501601f19908116603f01168101908282118183101715611710576117106116b8565b8160405280935085815286868601111561172957600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561175657600080fd5b61175f83611669565b915060208301356001600160401b0381111561177a57600080fd5b8301601f8101851361178b57600080fd5b61179a858235602084016116ce565b9150509250929050565b60008083601f8401126117b657600080fd5b5081356001600160401b038111156117cd57600080fd5b6020830191508360208285010111156111a657600080fd5b600080600080600080608087890312156117fe57600080fd5b61180787611669565b955060208701356001600160401b038082111561182357600080fd5b61182f8a838b016117a4565b909750955060408901359450606089013591508082111561184f57600080fd5b5061185c89828a016117a4565b979a9699509497509295939492505050565b803560ff8116811461168057600080fd5b60008060008060008060008060008060e08b8d03121561189e57600080fd5b6118a78b611669565b99506118b560208c0161186e565b985060408b0135975060608b0135965060808b01356001600160401b03808211156118df57600080fd5b6118eb8e838f016117a4565b909850965060a08d013591508082111561190457600080fd5b6119108e838f016117a4565b909650945060c08d013591508082111561192957600080fd5b506119368d828e016117a4565b915080935050809150509295989b9194979a5092959850565b60006020828403121561196157600080fd5b81356001600160401b0381111561197757600080fd5b8201601f8101841361198857600080fd5b611997848235602084016116ce565b949350505050565b60005b838110156119ba5781810151838201526020016119a2565b50506000910152565b600081518084526119db81602086016020860161199f565b601f01601f19169290920160200192915050565b602081526000610c9b60208301846119c3565b600080600080600080600080600060e08a8c031215611a2057600080fd5b611a298a611669565b9850611a3760208b0161186e565b975060408a0135965060608a0135955060808a01356001600160401b0380821115611a6157600080fd5b611a6d8d838e016117a4565b909750955060a08c0135945060c08c0135915080821115611a8d57600080fd5b50611a9a8c828d016117a4565b915080935050809150509295985092959850929598565b60008060008060008060006080888a031215611acc57600080fd5b611ad588611669565b965060208801356001600160401b0380821115611af157600080fd5b611afd8b838c016117a4565b909850965060408a0135915080821115611b1657600080fd5b611b228b838c016117a4565b909650945060608a0135915080821115611b3b57600080fd5b50611b488a828b016117a4565b989b979a50959850939692959293505050565b6001600160f81b03198b811682528a1660018201526bffffffffffffffffffffffff1960608a811b8216600284015289901b166016820152746372656174655265736f757263654d617070696e6760581b602a82015260008688603f840137868201603f81016000815286888237508581019050603f810160008152848682375060009301603f0192835250909a9950505050505050505050565b6001600160f81b03198a81168252891660018201526bffffffffffffffffffffffff19606089811b8216600284015288901b1660168201526f6372656174654469644d617070696e6760801b602a82015260008587603a84013785820185603a8201528385605a83013760009301605a0192835250909998505050505050505050565b600181811c90821680611c8d57607f821691505b602082108103611cad57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611cc557600080fd5b5051919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611997602083018486611cdc565b805160208201516001600160801b03198082169291906010831015611d485780818460100360031b1b83161693505b505050919050565b838152604060208201526000610d74604083018486611cdc565b604081526000611d7e604083018587611cdc565b905060018060a01b0383166020830152949350505050565b604081526000611daa604083018688611cdc565b8281036020840152611dbd818587611cdc565b979650505050505050565b601f8211156107a2576000816000526020600020601f850160051c81016020861015611df15750805b601f850160051c820191505b8181101561037357828155600101611dfd565b6001600160401b03831115611e2757611e276116b8565b611e3b83611e358354611c79565b83611dc8565b6000601f841160018114611e6f5760008515611e575750838201355b600019600387901b1c1916600186901b1783556106d9565b600083815260209020601f19861690835b82811015611ea05786850135825560209485019460019092019101611e80565b5086821015611ebd5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008251611ee181846020870161199f565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610c7e57634e487b7160e01b600052601160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc31323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa2646970667358221220783a3282ab91ab2aec18ef22164836f3395d6a63ae19c99582957411b0cb0eed64736f6c63430008170033" + "code": "0x6080604052600436106100915760003560e01c8063ad3cb1cc11610059578063ad3cb1cc1461016c578063ae3d4da7146101aa578063c0c53b8b146101ca578063c612ab58146101ea578063d924aedb1461020a57600080fd5b80634f1ef2861461009657806352d1902d146100ab57806363de77a2146100d35780637223460a146100f357806393a8c74214610113575b600080fd5b6100a96100a43660046117dc565b61022a565b005b3480156100b757600080fd5b506100c0610249565b6040519081526020015b60405180910390f35b3480156100df57600080fd5b506100a96100ee36600461187e565b610266565b3480156100ff57600080fd5b506100a961010e366004611918565b61027d565b34801561011f57600080fd5b5061015461012e3660046119e8565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b0390911681526020016100ca565b34801561017857600080fd5b5061019d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ca9190611a88565b3480156101b657600080fd5b506100a96101c5366004611a9b565b610337565b3480156101d657600080fd5b506100a96101e5366004611b4a565b6103ed565b3480156101f657600080fd5b5061019d6102053660046119e8565b610501565b34801561021657600080fd5b506100a9610225366004611b8d565b6105a6565b6102326105bf565b61023b82610666565b61024582826106cc565b5050565b6000610253610793565b50600080516020611fff83398151915290565b610275863387878787876107dc565b505050505050565b6040516000906102a790601960f81b90839030908f908c908c908c908c908c908c90602001611c37565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a9052915061032a908c9060019060a0016020604051602081039080840390855afa158015610315573d6000803e3d6000fd5b505050602060405103518989898989896109de565b5050505050505050505050565b60405160009061035f90601960f81b90839030908e908b908b908b908b908b90602001611cd2565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8c1691830191909152606082018a90526080820189905291506103e1908b9060019060a0016020604051602081039080840390855afa1580156103cd573d6000803e3d6000fd5b5050506020604051035188888888886107dc565b50505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff1680610436575080546001600160401b03808416911610155b156104545760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561047e85610c76565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b80516020818301810180516004825292820191909301209152805461052590611d55565b80601f016020809104026020016040519081016040528092919081815260200182805461055190611d55565b801561059e5780601f106105735761010080835404028352916020019161059e565b820191906000526020600020905b81548152906001019060200180831161058157829003601f168201915b505050505081565b6105b687338888888888886109de565b50505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061064657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661063a600080516020611fff833981519152546001600160a01b031690565b6001600160a01b031614155b156106645760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156106b157600080fd5b505afa1580156106c5573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610726575060408051601f3d908101601f1916820190925261072391810190611d8f565b60015b61075357604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020611fff833981519152811461078457604051632a87526960e21b81526004810182905260240161074a565b61078e8383610ca0565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106645760405163703e46dd60e11b815260040160405180910390fd5b8686806001600160a01b0316826001600160a01b031614610823576040516316343f1760e31b81526001600160a01b0380831660048301528316602482015260440161074a565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b15801561086657600080fd5b505afa15801561087a573d6000803e3d6000fd5b5050505060006001600160a01b03166003888860405161089b929190611da8565b908152604051908190036020019020546001600160a01b0316146108d6578686604051630ab7bdc760e21b815260040161074a929190611de1565b846001600160801b03191661092088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cf692505050565b61092990611df5565b6001600160801b0319161461095757848787604051630876c99d60e21b815260040161074a93929190611e2c565b886003888860405161096a929190611da8565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091557f701a83f8a2a9633e0e6442d096d21203cf8f4b735a8a7298e13cefc208e0f75a906109cb90899089908d90611e46565b60405180910390a1505050505050505050565b8787806001600160a01b0316826001600160a01b031614610a25576040516316343f1760e31b81526001600160a01b0380831660048301528316602482015260440161074a565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b158015610a6857600080fd5b505afa158015610a7c573d6000803e3d6000fd5b5050505060048686604051610a92929190611da8565b90815260200160405180910390208054610aab90611d55565b159050610acf5785856040516327ef3c3d60e01b815260040161074a929190611de1565b60038888604051610ae1929190611da8565b908152604051908190036020019020546001600160a01b038b8116911614610b51578960038989604051610b16929190611da8565b908152604051908190036020018120546316343f1760e31b82526001600160a01b03928316600483015291909116602482015260440161074a565b610bd8610b9389898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610d0792505050565b610bd288888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610d0792505050565b90610d12565b610bfd578585898960405163998f70a160e01b815260040161074a9493929190611e72565b838360048888604051610c11929190611da8565b90815260200160405180910390209182610c2c929190611eec565b507f87526cc0385862de920bf8b05560b5c9eb58f8af45be9f917801198166655f8886868686604051610c629493929190611e72565b60405180910390a150505050505050505050565b610c7e610d25565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ca982610d6e565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610cee5761078e8282610dd3565b610245610e49565b6060610d0182610e68565b92915050565b6000610d018261118e565b6000610d1e83836111a2565b9392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661066457604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b600003610da457604051634c9c8ce360e01b81526001600160a01b038216600482015260240161074a565b600080516020611fff83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610df09190611fab565b600060405180830381855af49150503d8060008114610e2b576040519150601f19603f3d011682016040523d82523d6000602084013e610e30565b606091505b5091509150610e408583836111ba565b95945050505050565b34156106645760405163b398979f60e01b815260040160405180910390fd5b80516060906031906000805b8281108015610e9b575083868281518110610e9157610e91611fc7565b016020015160f81c145b15610eac5760019182019101610e74565b5060008080806117e361209f8702046001016002026001600160401b03811115610ed857610ed8611751565b6040519080825280601f01601f191660200182016040528015610f02576020820181803683370190505b5090506000600460038801046001600160401b03811115610f2557610f25611751565b604051908082528060200260200182016040528015610f4e578160200160208202803683370190505b50905060005b8a5181101561104c5760008b8281518110610f7157610f71611fc7565b602001015160f81c60f81b9050610fa06040518060600160405280603a815260200161201f603a913982611216565b909650945084610fc5578b604051634cb9e47360e11b815260040161074a9190611a88565b8251600019015b600081126110425786848281518110610fe757610fe7611fc7565b602002602001015163ffffffff16603a026001600160401b0316019750602088901c96508763ffffffff1684828151811061102457611024611fc7565b63ffffffff9092166020928302919091019091015260001901610fcc565b5050600101610f54565b50600860038816026001600160401b038116600003611069575060205b600719016000805b8351811015611113575b6020836001600160401b0316101561110757826001600160401b03168482815181106110a9576110a9611fc7565b602002602001015163ffffffff16901c60f81b8583815181106110ce576110ce611fc7565b60200101906001600160f81b031916908160001a90535060019091019060086001600160401b038416106111075760088303925061107b565b60189250600101611071565b50875b845181101561117157600060f81b85828151811061113657611136611fc7565b01602001516001600160f81b031916111561116957611158858a830384611279565b9d9c50505050505050505050505050565b600101611116565b5061117e84600083611279565b9c9b505050505050505050505050565b600080602083019050610d1e81845161132a565b60006000196111b18484611336565b14159392505050565b6060826111cf576111ca82611441565b610d1e565b81511580156111e657506001600160a01b0384163b155b1561120f57604051639996b31560e01b81526001600160a01b038516600482015260240161074a565b5092915050565b60008060005b845181101561126957836001600160f81b03191685828151811061124257611242611fc7565b01602001516001600160f81b0319160361126157915060019050611272565b60010161121c565b50600080915091505b9250929050565b606060008383036001600160401b0381111561129757611297611751565b6040519080825280601f01601f1916602001820160405280156112c1576020820181803683370190505b50905060005b8484038110156113215785858201815181106112e5576112e5611fc7565b602001015160f81c60f81b82828151811061130257611302611fc7565b60200101906001600160f81b031916908160001a9053506001016112c7565b50949350505050565b6000610d1e838361146a565b60006001600160801b0383811690831680830361135857600092505050610d01565b81158061136457508181115b156113755760001992505050610d01565b60006113818660801c90565b9050600061138f8660801c90565b9050600061139e825160001a90565b90505b60006113ae848784611476565b905060001981036113c9576000199650505050505050610d01565b948590039492830192858511156113ea576000199650505050505050610d01565b84832085852003611416576113ff8960801c90565b6114099085611fdd565b9650505050505050610d01565b8560010361142e576000199650505050505050610d01565b60001990950194600190930192506113a1565b8051156114515780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000610d1e838361154f565b6000602083116114925761148b8484846115b5565b9050610d1e565b83601f8416808503820160ff85167f0101010101010101010101010101010101010101010101010101010101010101025b8188101561150557875181186114d8816116ea565b156114f9578489036114ec8a60208a6115b5565b0195505050505050610d1e565b602089019850506114c3565b8260000361151b57600019945050505050610d1e565b6115268284886115b5565b9450600019850361153f57600019945050505050610d1e565b8382038501945050505050610d1e565b60006001600160801b038311156115795760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b038211156115a157604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b82516000908160208511156115c957602094505b601285106116655760ff84167f010101010101010101010101010101010101010101010101010101010101010102821861160b6001600160801b0382176116ea565b6000036116415760109150601a861061163c576116306001600160401b0382176116ea565b60000361163c57601891505b61165f565b6116536001600160c01b0382176116ea565b60000361165f57600891505b506116b5565b600a85106116b55760ff84167f01010101010101010101010101010101010101010101010101010101010101010282186116a76001600160c01b0382176116ea565b6000036116b357600891505b505b848110156116dd5781811a60ff851681036116d457509150610d1e9050565b506001016116b5565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b80356001600160a01b038116811461174c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561178157611781611751565b604051601f8501601f19908116603f011681019082821181831017156117a9576117a9611751565b816040528093508581528686860111156117c257600080fd5b858560208301376000602087830101525050509392505050565b600080604083850312156117ef57600080fd5b6117f883611735565b915060208301356001600160401b0381111561181357600080fd5b8301601f8101851361182457600080fd5b61183385823560208401611767565b9150509250929050565b60008083601f84011261184f57600080fd5b5081356001600160401b0381111561186657600080fd5b60208301915083602082850101111561127257600080fd5b6000806000806000806080878903121561189757600080fd5b6118a087611735565b955060208701356001600160401b03808211156118bc57600080fd5b6118c88a838b0161183d565b90975095506040890135945060608901359150808211156118e857600080fd5b506118f589828a0161183d565b979a9699509497509295939492505050565b803560ff8116811461174c57600080fd5b60008060008060008060008060008060e08b8d03121561193757600080fd5b6119408b611735565b995061194e60208c01611907565b985060408b0135975060608b0135965060808b01356001600160401b038082111561197857600080fd5b6119848e838f0161183d565b909850965060a08d013591508082111561199d57600080fd5b6119a98e838f0161183d565b909650945060c08d01359150808211156119c257600080fd5b506119cf8d828e0161183d565b915080935050809150509295989b9194979a5092959850565b6000602082840312156119fa57600080fd5b81356001600160401b03811115611a1057600080fd5b8201601f81018413611a2157600080fd5b611a3084823560208401611767565b949350505050565b60005b83811015611a53578181015183820152602001611a3b565b50506000910152565b60008151808452611a74816020860160208601611a38565b601f01601f19169290920160200192915050565b602081526000610d1e6020830184611a5c565b600080600080600080600080600060e08a8c031215611ab957600080fd5b611ac28a611735565b9850611ad060208b01611907565b975060408a0135965060608a0135955060808a01356001600160401b0380821115611afa57600080fd5b611b068d838e0161183d565b909750955060a08c0135945060c08c0135915080821115611b2657600080fd5b50611b338c828d0161183d565b915080935050809150509295985092959850929598565b600080600060608486031215611b5f57600080fd5b611b6884611735565b9250611b7660208501611735565b9150611b8460408501611735565b90509250925092565b60008060008060008060006080888a031215611ba857600080fd5b611bb188611735565b965060208801356001600160401b0380821115611bcd57600080fd5b611bd98b838c0161183d565b909850965060408a0135915080821115611bf257600080fd5b611bfe8b838c0161183d565b909650945060608a0135915080821115611c1757600080fd5b50611c248a828b0161183d565b989b979a50959850939692959293505050565b6001600160f81b03198b811682528a1660018201526bffffffffffffffffffffffff1960608a811b8216600284015289901b166016820152746372656174655265736f757263654d617070696e6760581b602a82015260008688603f840137868201603f81016000815286888237508581019050603f810160008152848682375060009301603f0192835250909a9950505050505050505050565b6001600160f81b03198a81168252891660018201526bffffffffffffffffffffffff19606089811b8216600284015288901b1660168201526f6372656174654469644d617070696e6760801b602a82015260008587603a84013785820185603a8201528385605a83013760009301605a0192835250909998505050505050505050565b600181811c90821680611d6957607f821691505b602082108103611d8957634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611da157600080fd5b5051919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611a30602083018486611db8565b805160208201516001600160801b03198082169291906010831015611e245780818460100360031b1b83161693505b505050919050565b838152604060208201526000610e40604083018486611db8565b604081526000611e5a604083018587611db8565b905060018060a01b0383166020830152949350505050565b604081526000611e86604083018688611db8565b8281036020840152611e99818587611db8565b979650505050505050565b601f82111561078e576000816000526020600020601f850160051c81016020861015611ecd5750805b601f850160051c820191505b8181101561027557828155600101611ed9565b6001600160401b03831115611f0357611f03611751565b611f1783611f118354611d55565b83611ea4565b6000601f841160018114611f4b5760008515611f335750838201355b600019600387901b1c1916600186901b1783556106c5565b600083815260209020601f19861690835b82811015611f7c5786850135825560209485019460019092019101611f5c565b5086821015611f995760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008251611fbd818460208701611a38565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610d0157634e487b7160e01b600052601160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc31323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa26469706673582212201f9b024622facac87b68923576f9ca7116bd58b452b35e6f8388f61ba7e3865f64736f6c63430008170033" } } } diff --git a/network/config/nodes/validator5/key b/network/config/nodes/validator5/key index b175e983..b7ccede2 100644 --- a/network/config/nodes/validator5/key +++ b/network/config/nodes/validator5/key @@ -1 +1 @@ -0x540b580b3d27767d2c70378e4bd313829140664cfc000ce7ff09ed92d56056bd \ No newline at end of file +0x67fdb909cebec14cc296fa0e254c7bd1953943c17304f505612c7587d85af84a \ No newline at end of file diff --git a/smart_contracts/contracts/auth/AccountControl.sol b/smart_contracts/contracts/auth/AccountControl.sol index 0df9a25d..b477c9fd 100644 --- a/smart_contracts/contracts/auth/AccountControl.sol +++ b/smart_contracts/contracts/auth/AccountControl.sol @@ -32,11 +32,6 @@ contract AccountControl is AccountControlInterface, ControlledUpgradeable { return false; } - // Validate ensure that only senders with not-empty roles can write transactions - if (_roleControl.hasRole(RoleControlInterface.ROLES.EMPTY, sender)) { - return false; - } - return true; } /* solhint-enable no-unused-vars */ diff --git a/smart_contracts/contracts/auth/AccountControlInterface.sol b/smart_contracts/contracts/auth/AccountControlInterface.sol index 7772c3c7..c89a11a1 100644 --- a/smart_contracts/contracts/auth/AccountControlInterface.sol +++ b/smart_contracts/contracts/auth/AccountControlInterface.sol @@ -9,8 +9,7 @@ interface AccountControlInterface { * @dev Determine whether to accept a transaction received from a given account. * * This function enforces the following restrictions: - * - Only senders with the Trustee role are permitted to deploy transactions. - * - Senders with not-empty roles (Trustee, Steward and Endorser) can invoke state modifying contract methods. + * - Only senders with the Trustee role are permitted to deploy new smart contracts. * * Note: This function does not impose any restrictions to reading state values * diff --git a/smart_contracts/contracts/auth/RoleControl.sol b/smart_contracts/contracts/auth/RoleControl.sol index 5ffaa1f9..0d9bd607 100644 --- a/smart_contracts/contracts/auth/RoleControl.sol +++ b/smart_contracts/contracts/auth/RoleControl.sol @@ -89,6 +89,33 @@ contract RoleControl is RoleControlInterface, ControlledUpgradeable { return _roleCounts[role]; } + /// @inheritdoc RoleControlInterface + function isTrustee(address identity) public view virtual { + if (_roles[identity] != ROLES.TRUSTEE) revert Unauthorized(identity); + } + + /// @inheritdoc RoleControlInterface + function isEndorser(address identity) public view virtual { + if (_roles[identity] != ROLES.ENDORSER) revert Unauthorized(identity); + } + + /// @inheritdoc RoleControlInterface + function isSteward(address identity) public view virtual { + if (_roles[identity] != ROLES.STEWARD) revert Unauthorized(identity); + } + + /// @inheritdoc RoleControlInterface + function isTrusteeOrEndorser(address identity) public view virtual { + ROLES role = _roles[identity]; + if (role != ROLES.ENDORSER && role != ROLES.TRUSTEE) revert Unauthorized(identity); + } + + /// @inheritdoc RoleControlInterface + function isTrusteeOrEndorserOrSteward(address identity) public view virtual { + ROLES role = _roles[identity]; + if (role != ROLES.ENDORSER && role != ROLES.TRUSTEE && role != ROLES.STEWARD) revert Unauthorized(identity); + } + /** * @dev Function to set initial owners for roles. */ diff --git a/smart_contracts/contracts/auth/RoleControlInterface.sol b/smart_contracts/contracts/auth/RoleControlInterface.sol index bca1beb3..72747167 100644 --- a/smart_contracts/contracts/auth/RoleControlInterface.sol +++ b/smart_contracts/contracts/auth/RoleControlInterface.sol @@ -71,4 +71,29 @@ interface RoleControlInterface { * @return The count of accounts that have been assigned the specified role. */ function getRoleCount(ROLES role) external view returns (uint32); + + /** + * @dev Function to check that identity has TRUSTEE role. + */ + function isTrustee(address identity) external view; + + /** + * @dev Function to check that identity has ENDORSER role. + */ + function isEndorser(address identity) external view; + + /** + * @dev Function to check that identity has STEWARD role. + */ + function isSteward(address identity) external view; + + /** + * @dev Function to check that identity has either TRUSTEE or ENDORSER role. + */ + function isTrusteeOrEndorser(address identity) external view; + + /** + * @dev Function to check that identity has either TRUSTEE or ENDORSER or STEWARD role. + */ + function isTrusteeOrEndorserOrSteward(address identity) external view; } diff --git a/smart_contracts/contracts/cl/CLRegistry.sol b/smart_contracts/contracts/cl/CLRegistry.sol index 1ec09f5b..e95d2152 100644 --- a/smart_contracts/contracts/cl/CLRegistry.sol +++ b/smart_contracts/contracts/cl/CLRegistry.sol @@ -6,6 +6,7 @@ import { DidMetadata } from "../did/DidTypes.sol"; import { UniversalDidResolverInterface } from "../did/UniversalDidResolverInterface.sol"; import { Errors } from "../utils/Errors.sol"; import { InvalidIssuerId, IssuerHasBeenDeactivated, IssuerNotFound } from "./ClErrors.sol"; +import { RoleControlInterface } from "../auth/RoleControl.sol"; contract CLRegistry { /** @@ -13,6 +14,27 @@ contract CLRegistry { */ UniversalDidResolverInterface internal _didResolver; + /** + * @dev Reference to the contract that controls account roles + */ + RoleControlInterface internal _roleControl; + + /** + * Checks that method was called either by Trustee or Endorser or Steward + */ + modifier _senderIsTrusteeOrEndorserOrSteward() { + _roleControl.isTrusteeOrEndorserOrSteward(msg.sender); + _; + } + + /** + * Checks that actor matches to the identity + */ + modifier _identityOwner(address identity, address actor) { + if (identity != actor) revert NotIdentityOwner(actor, identity); + _; + } + /** * @dev Check that the Issuer DID exist, authorized for actor, and active. * @param did The Issuer's Account. diff --git a/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol b/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol index 0c9307f8..861e96dc 100644 --- a/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol +++ b/smart_contracts/contracts/cl/CredentialDefinitionRegistry.sol @@ -8,6 +8,7 @@ import { CredentialDefinitionRecord } from "./CredentialDefinitionTypes.sol"; import { CredentialDefinitionRegistryInterface } from "./CredentialDefinitionRegistryInterface.sol"; import { CredentialDefinitionAlreadyExist, CredentialDefinitionNotFound } from "./ClErrors.sol"; import { SchemaRegistryInterface } from "./SchemaRegistryInterface.sol"; +import { RoleControlInterface } from "../auth/RoleControl.sol"; import { CLRegistry } from "./CLRegistry.sol"; contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface, ControlledUpgradeable, CLRegistry { @@ -48,11 +49,13 @@ contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface, function initialize( address upgradeControlAddress, address didResolverAddress, - address schemaRegistryAddress + address schemaRegistryAddress, + address roleControlContractAddress ) public reinitializer(1) { _initializeUpgradeControl(upgradeControlAddress); _didResolver = UniversalDidResolverInterface(didResolverAddress); _schemaRegistry = SchemaRegistryInterface(schemaRegistryAddress); + _roleControl = RoleControlInterface(roleControlContractAddress); } /// @inheritdoc CredentialDefinitionRegistryInterface @@ -107,7 +110,13 @@ contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface, string calldata issuerId, bytes32 schemaId, bytes calldata credDef - ) internal _uniqueCredDefId(id) _validIssuer(issuerId, identity, actor) _schemaExist(schemaId) { + ) + internal + _senderIsTrusteeOrEndorserOrSteward + _uniqueCredDefId(id) + _validIssuer(issuerId, identity, actor) + _schemaExist(schemaId) + { _credDefs[id].credDef = credDef; _credDefs[id].metadata.created = block.timestamp; diff --git a/smart_contracts/contracts/cl/CredentialDefinitionRegistryInterface.sol b/smart_contracts/contracts/cl/CredentialDefinitionRegistryInterface.sol index 4d8c901e..e14cb00d 100644 --- a/smart_contracts/contracts/cl/CredentialDefinitionRegistryInterface.sol +++ b/smart_contracts/contracts/cl/CredentialDefinitionRegistryInterface.sol @@ -18,6 +18,9 @@ interface CredentialDefinitionRegistryInterface { * Once the Credential Definition is created, this function emits a `CredentialDefinitionCreated` event * with the new Credential Definition's ID and issuer address. * + * Restrictions: + * - Only senders with either TRUSTEE or ENDORSER or STEWARD role are permitted to create new object; + * * This function can revert with following errors: * - `CredentialDefinitionAlreadyExist`: Raised if Credential Definition with provided ID already exist. * - `SchemaNotFound`: Raised if the associated schema doesn't exist. @@ -46,6 +49,9 @@ interface CredentialDefinitionRegistryInterface { * Once the Credential Definition is created, this function emits a `CredentialDefinitionCreated` event * with the new Credential Definition's ID and issuer address. * + * Restrictions: + * - Only senders with either TRUSTEE or ENDORSER or STEWARD role are permitted to create new object; + * * This function can revert with following errors: * - `CredentialDefinitionAlreadyExist`: Raised if Credential Definition with provided ID already exist. * - `SchemaNotFound`: Raised if the associated schema doesn't exist. diff --git a/smart_contracts/contracts/cl/SchemaRegistry.sol b/smart_contracts/contracts/cl/SchemaRegistry.sol index 252b67a8..2ee02691 100644 --- a/smart_contracts/contracts/cl/SchemaRegistry.sol +++ b/smart_contracts/contracts/cl/SchemaRegistry.sol @@ -8,6 +8,7 @@ import { SchemaAlreadyExist, SchemaNotFound } from "./ClErrors.sol"; import { SchemaRegistryInterface } from "./SchemaRegistryInterface.sol"; import { SchemaRecord } from "./SchemaTypes.sol"; import { CLRegistry } from "./CLRegistry.sol"; +import { RoleControlInterface } from "../auth/RoleControl.sol"; contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable, CLRegistry { /** @@ -31,9 +32,14 @@ contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable, CLReg _; } - function initialize(address upgradeControlAddress, address didResolverAddress) public reinitializer(1) { + function initialize( + address upgradeControlAddress, + address didResolverAddress, + address roleControlContractAddress + ) public reinitializer(1) { _initializeUpgradeControl(upgradeControlAddress); _didResolver = UniversalDidResolverInterface(didResolverAddress); + _roleControl = RoleControlInterface(roleControlContractAddress); } /// @inheritdoc SchemaRegistryInterface @@ -73,7 +79,7 @@ contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable, CLReg bytes32 id, string calldata issuerId, bytes calldata schema - ) internal _uniqueSchemaId(id) _validIssuer(issuerId, identity, actor) { + ) internal _senderIsTrusteeOrEndorserOrSteward _uniqueSchemaId(id) _validIssuer(issuerId, identity, actor) { _schemas[id].schema = schema; _schemas[id].metadata.created = block.timestamp; diff --git a/smart_contracts/contracts/cl/SchemaRegistryInterface.sol b/smart_contracts/contracts/cl/SchemaRegistryInterface.sol index 0a310079..1a9a480a 100644 --- a/smart_contracts/contracts/cl/SchemaRegistryInterface.sol +++ b/smart_contracts/contracts/cl/SchemaRegistryInterface.sol @@ -38,6 +38,9 @@ interface SchemaRegistryInterface { * Once the Schema is created, this function emits a `SchemaCreated` event * with the new Schema ID and issuer address. * + * Restrictions: + * - Only senders with either TRUSTEE or ENDORSER or STEWARD role are permitted to create new object; + * * This function can revert with following errors: * - `SchemaAlreadyExist`: Raised if Schema with provided ID already exist. * - `IssuerNotFound`: Raised if the associated issuer doesn't exist. diff --git a/smart_contracts/contracts/did/DidErrors.sol b/smart_contracts/contracts/did/DidErrors.sol index 92e84968..61cebd43 100644 --- a/smart_contracts/contracts/did/DidErrors.sol +++ b/smart_contracts/contracts/did/DidErrors.sol @@ -16,11 +16,6 @@ error DidAlreadyExist(address identity); */ error DidHasBeenDeactivated(address identity); -/** - * @dev Error that occurs when message sender address is nether DID owner or original creator. - */ -error UnauthorizedSender(address sender); - /** * @dev Error that occurs when the specified DID is incorrect. */ diff --git a/smart_contracts/contracts/did/DidTypes.sol b/smart_contracts/contracts/did/DidTypes.sol index 7f0a3e4c..baefdcde 100644 --- a/smart_contracts/contracts/did/DidTypes.sol +++ b/smart_contracts/contracts/did/DidTypes.sol @@ -14,7 +14,6 @@ struct DidRecord { */ struct DidMetadata { address owner; - address sender; uint256 created; uint256 updated; uint256 versionId; diff --git a/smart_contracts/contracts/did/IndyDidRegistry.sol b/smart_contracts/contracts/did/IndyDidRegistry.sol index aadcb6c1..87d502a6 100644 --- a/smart_contracts/contracts/did/IndyDidRegistry.sol +++ b/smart_contracts/contracts/did/IndyDidRegistry.sol @@ -3,13 +3,16 @@ pragma solidity ^0.8.20; import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; -import { DidAlreadyExist, DidHasBeenDeactivated, DidNotFound, UnauthorizedSender, NotIdentityOwner } from "./DidErrors.sol"; +import { DidAlreadyExist, DidHasBeenDeactivated, DidNotFound, NotIdentityOwner } from "./DidErrors.sol"; import { DidRecord } from "./DidTypes.sol"; import { IndyDidRegistryInterface } from "./IndyDidRegistryInterface.sol"; +import { RoleControlInterface } from "../auth/RoleControl.sol"; contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { // TODO: add nonce for endorsing transactions + RoleControlInterface internal _roleControl; + /** * @dev Mapping DID to its corresponding DidRecord (Document/Metadata). */ @@ -40,15 +43,25 @@ contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { } /** - * Checks that method was called either by did owner or sender + * Checks that method was called either by Trustee or Endorser or Steward */ - modifier _senderIsAuthorized(address identity) { - // FIXME: once we add strict role and endorsement, the check here should be either owner or Trustee - if (msg.sender != identity && msg.sender != _dids[identity].metadata.sender) - revert UnauthorizedSender(msg.sender); + modifier _senderIsTrusteeOrEndorserOrSteward() { + _roleControl.isTrusteeOrEndorserOrSteward(msg.sender); _; } + /** + * Checks that method was called either by Identity owner or Trustee or Endorser or Steward + */ + modifier _senderIsIdentityOwnerOrTrustee(address identity) { + if (msg.sender == identity) { + _; + } else { + _roleControl.isTrustee(msg.sender); + _; + } + } + /** * Checks that actor matches to the identity */ @@ -57,8 +70,9 @@ contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { _; } - function initialize(address upgradeControlAddress) public reinitializer(1) { + function initialize(address upgradeControlAddress, address roleControlContractAddress) public reinitializer(1) { _initializeUpgradeControl(upgradeControlAddress); + _roleControl = RoleControlInterface(roleControlContractAddress); } /// @inheritdoc IndyDidRegistryInterface @@ -105,12 +119,11 @@ contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { function _createDid( address identity, - address actor, + address actor, // actor is either message sender in case of `createDid` or signer in case of `createDidSigner` bytes calldata document - ) internal _didNotExist(identity) _identityOwner(identity, actor) { + ) internal _didNotExist(identity) _identityOwner(identity, actor) _senderIsTrusteeOrEndorserOrSteward { _dids[identity].document = document; _dids[identity].metadata.owner = identity; - _dids[identity].metadata.sender = msg.sender; _dids[identity].metadata.created = block.timestamp; _dids[identity].metadata.updated = block.timestamp; _dids[identity].metadata.versionId = block.number; @@ -120,14 +133,14 @@ contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { function _updateDid( address identity, - address actor, + address actor, // actor is either message sender in case of `updateDid` or signer in case of `updateDidSigner` bytes calldata document ) internal _didExist(identity) _didIsActive(identity) _identityOwner(identity, actor) - _senderIsAuthorized(identity) + _senderIsIdentityOwnerOrTrustee(identity) { _dids[identity].document = document; _dids[identity].metadata.updated = block.timestamp; @@ -138,13 +151,13 @@ contract IndyDidRegistry is IndyDidRegistryInterface, ControlledUpgradeable { function _deactivateDid( address identity, - address actor + address actor // actor is either message sender in case of `deactivateDid` or signer in case of `deactivateDidSigner` ) internal _didExist(identity) _didIsActive(identity) _identityOwner(identity, actor) - _senderIsAuthorized(identity) + _senderIsIdentityOwnerOrTrustee(identity) { _dids[identity].metadata.deactivated = true; _dids[identity].metadata.versionId = block.number; diff --git a/smart_contracts/contracts/did/IndyDidRegistryInterface.sol b/smart_contracts/contracts/did/IndyDidRegistryInterface.sol index a634431d..746a50da 100644 --- a/smart_contracts/contracts/did/IndyDidRegistryInterface.sol +++ b/smart_contracts/contracts/did/IndyDidRegistryInterface.sol @@ -31,6 +31,11 @@ interface IndyDidRegistryInterface { /** * @dev Creates a new DID record. * + * Restrictions: + * - DID must not already exist; otherwise, will revert with a `DidAlreadyExist` error. + * - Sender address must has either TRUSTEE or ENDORSER or STEWARD role; otherwise, will revert with a `Unauthorized` error. + * - Sender address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. + * * @param identity Address of DID identity owner. * @param document DID Document JSON as bytes. */ @@ -39,6 +44,11 @@ interface IndyDidRegistryInterface { /** * @dev Endorses a new DID record (off-chain author signature). * + * Restrictions: + * - DID must not already exist; otherwise, will revert with a `DidAlreadyExist` error. + * - Sender address must has either TRUSTEE or ENDORSER or STEWARD role; otherwise, will revert with a `Unauthorized` error. + * - Signer address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. + * * @param identity Address of DID identity owner. * @param sigV Part of EcDSA signature. * @param sigR Part of EcDSA signature. @@ -60,7 +70,7 @@ interface IndyDidRegistryInterface { * * - DID must already exist; otherwise, will revert with a `DidNotFound` error. * - DID must be active; otherwise, will revert with a `DidHasBeenDeactivated` error. - * - Sender address must be equal either to DID owner or creator; otherwise, will revert with a `UnauthorizedSender` error. + * - Sender address must be equal either to DID owner or has TRUSTEE role; otherwise, will revert with a `Unauthorized` error. * - Sender address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. * * Events: @@ -75,10 +85,9 @@ interface IndyDidRegistryInterface { * @dev Endorses an updated DID document for an existing DID record (off-chain author signature). * * Restrictions: - * * - DID must already exist; otherwise, will revert with a `DidNotFound` error. * - DID must be active; otherwise, will revert with a `DidHasBeenDeactivated` error. - * - Sender address must be equal either to DID owner or creator; otherwise, will revert with a `UnauthorizedSender` error. + * - Sender address must be equal either to DID owner or has TRUSTEE role; otherwise, will revert with a `Unauthorized` error. * - Signer address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. * * Events: @@ -104,7 +113,7 @@ interface IndyDidRegistryInterface { * Restrictions: * - DID must be active; otherwise, will revert with a `DidHasBeenDeactivated` error. * - DID must exist; otherwise, will revert with a `DidNotFound` error. - * - Sender address must be equal either to DID owner or creator; otherwise, will revert with a `UnauthorizedSender` error. + * - Sender address must be equal either to DID owner or has TRUSTEE role; otherwise, will revert with a `Unauthorized` error. * - Sender address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. * * Events: @@ -120,7 +129,7 @@ interface IndyDidRegistryInterface { * Restrictions: * - DID must be active; otherwise, will revert with a `DidHasBeenDeactivated` error. * - DID must exist; otherwise, will revert with a `DidNotFound` error. - * - Sender address must be equal either to DID owner or creator; otherwise, will revert with a `UnauthorizedSender` error. + * - Sender address must be equal either to DID owner or has TRUSTEE role; otherwise, will revert with a `Unauthorized` error. * - Signer address must be equal to passed identity address; otherwise, will revert with a `NotIdentityOwner` error. * * Events: diff --git a/smart_contracts/contracts/did/UniversalDidResolver.sol b/smart_contracts/contracts/did/UniversalDidResolver.sol index d3bbc8e4..7778bd31 100644 --- a/smart_contracts/contracts/did/UniversalDidResolver.sol +++ b/smart_contracts/contracts/did/UniversalDidResolver.sol @@ -49,7 +49,7 @@ contract UniversalDidResolver is UniversalDidResolverInterface, ControlledUpgrad if (DidUtils.isEthereumMethod(parsedDid.method)) { address identityOwner = _ethereumDIDRegistry.identityOwner(identity); - return DidMetadata(identityOwner, address(0), 0, 0, 0, false); + return DidMetadata(identityOwner, 0, 0, 0, false); } else if (DidUtils.isIndyMethod(parsedDid.method)) { return _indyDidRegistry.resolveDid(identity).metadata; } else { diff --git a/smart_contracts/contracts/migration/LegacyMappingRegistry.sol b/smart_contracts/contracts/migration/LegacyMappingRegistry.sol index ea70a347..c5fd1ec5 100644 --- a/smart_contracts/contracts/migration/LegacyMappingRegistry.sol +++ b/smart_contracts/contracts/migration/LegacyMappingRegistry.sol @@ -6,6 +6,7 @@ import { DidMappingAlreadyExist, ResourceMappingAlreadyExist, InvalidEd25519Key, import { NotIdentityOwner } from "../did/DidErrors.sol"; import { UniversalDidResolverInterface } from "../did/UniversalDidResolverInterface.sol"; import { LegacyMappingRegistryInterface } from "./LegacyMappingRegistryInterface.sol"; +import { RoleControlInterface } from "../auth/RoleControl.sol"; import { Base58 } from "../utils/Base58.sol"; import { toSlice } from "@dk1a/solidity-stringutils/src/StrSlice.sol"; @@ -18,6 +19,9 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr */ UniversalDidResolverInterface internal _didResolver; + RoleControlInterface internal _roleControl; + + // FIXME: Now, since we have `indybesu` and `ethr` DID methods having account as identifier we need to change value of `didMapping` /* * Mapping storing indy/sov DID identifiers to the corresponding account address */ @@ -36,9 +40,22 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr _; } - function initialize(address upgradeControlAddress, address didResolverAddress) public reinitializer(1) { + /** + * Checks that method was called either by Trustee or Endorser or Steward + */ + modifier _senderIsTrusteeOrEndorserOrSteward() { + _roleControl.isTrusteeOrEndorserOrSteward(msg.sender); + _; + } + + function initialize( + address upgradeControlAddress, + address didResolverAddress, + address roleControlContractAddress + ) public reinitializer(1) { _initializeUpgradeControl(upgradeControlAddress); _didResolver = UniversalDidResolverInterface(didResolverAddress); + _roleControl = RoleControlInterface(roleControlContractAddress); } /// @inheritdoc LegacyMappingRegistryInterface @@ -123,7 +140,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr string calldata identifier, bytes32 ed25519Key, bytes calldata ed25518Signature - ) internal _identityOwner(identity, actor) { + ) internal _identityOwner(identity, actor) _senderIsTrusteeOrEndorserOrSteward { // Checks the uniqueness of the DID mapping if (didMapping[identifier] != address(0x00)) revert DidMappingAlreadyExist(identifier); @@ -142,7 +159,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr string calldata legacyIssuerIdentifier, string calldata legacyIdentifier, string calldata newIdentifier - ) internal _identityOwner(identity, actor) { + ) internal _identityOwner(identity, actor) _senderIsTrusteeOrEndorserOrSteward { // Checks the uniqueness of the Resource mapping if (bytes(resourceMapping[legacyIdentifier]).length != 0) revert ResourceMappingAlreadyExist(legacyIdentifier); diff --git a/smart_contracts/contracts/migration/LegacyMappingRegistryInterface.sol b/smart_contracts/contracts/migration/LegacyMappingRegistryInterface.sol index 663b97f9..89398534 100644 --- a/smart_contracts/contracts/migration/LegacyMappingRegistryInterface.sol +++ b/smart_contracts/contracts/migration/LegacyMappingRegistryInterface.sol @@ -27,7 +27,8 @@ interface LegacyMappingRegistryInterface { * This function can revert with following errors: * - `MappingAlreadyExist`: Raised if DID mapping with provided identifier already exist. * - `InvalidEd25519Key`: Raised if provided ED25519 verification key does not match to the DID identifier. - * - `NotIdentityOwner`: Raised if sender account is not owner of the provided identity + * - `NotIdentityOwner`: Raised if sender account is not owner of the provided identity. + * - `Unauthorized`: Raised if sender account does not have non of the roles assigned: TRUSTEE, ENDORSER, STEWARD. * * @param identity Account address of the DID's owner. * @param identifier legacy DID identifier. @@ -51,6 +52,7 @@ interface LegacyMappingRegistryInterface { * - `MappingAlreadyExist`: Raised if DID mapping with provided identifier already exist. * - `InvalidEd25519Key`: Raised if provided ED25519 verification key does not match to the DID identifier. * - `NotIdentityOwner`: Raised if signer account is not owner of the provided identity + * - `Unauthorized`: Raised if sender account does not have non of the roles assigned: TRUSTEE, ENDORSER, STEWARD. * * @param identity Account address of the DID's owner. * @param sigV Part of EcDSA signature. @@ -80,6 +82,7 @@ interface LegacyMappingRegistryInterface { * - `MappingAlreadyExist`: Raised if resource mapping with provided identifier already exist. * - `NotIdentityOwner`: Raised if identity account is not owner of the legacy Issuer DID * - `NotIdentityOwner`: Raised if sender account is not owner of provided identity + * - `Unauthorized`: Raised if sender account does not have non of the roles assigned: TRUSTEE, ENDORSER, STEWARD. * * @param identity Account address of the issuer. * @param legacyIssuerIdentifier Legacy issuer identifier. @@ -103,6 +106,7 @@ interface LegacyMappingRegistryInterface { * - `MappingAlreadyExist`: Raised if resource mapping with provided identifier already exist. * - `NotIdentityOwner`: Raised if identity account is not owner of the legacy Issuer DID * - `NotIdentityOwner`: Raised if signer account is not owner of the provided identity + * - `Unauthorized`: Raised if sender account does not have non of the roles assigned: TRUSTEE, ENDORSER, STEWARD. * * @param identity Account address of the issuer. * @param sigV Part of EcDSA signature. diff --git a/smart_contracts/contracts/network/ValidatorControl.sol b/smart_contracts/contracts/network/ValidatorControl.sol index 4baa4896..1dabc13b 100644 --- a/smart_contracts/contracts/network/ValidatorControl.sol +++ b/smart_contracts/contracts/network/ValidatorControl.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import { Unauthorized } from "../auth/AuthErrors.sol"; import { InitialValidatorsRequired, InvalidValidatorAddress, InvalidValidatorAccountAddress, ExceedsValidatorLimit, ValidatorAlreadyExists, SenderHasActiveValidator, CannotDeactivateLastValidator, ValidatorNotFound } from "./ValidatorErrors.sol"; import { RoleControlInterface } from "../auth/RoleControl.sol"; import { ControlledUpgradeable } from "../upgrade/ControlledUpgradeable.sol"; @@ -49,7 +48,7 @@ contract ValidatorControl is ValidatorControlInterface, ControlledUpgradeable { * @dev Modifier that checks that the sender account has Steward role assigned. */ modifier _senderIsSteward() { - if (!_roleControl.hasRole(RoleControlInterface.ROLES.STEWARD, msg.sender)) revert Unauthorized(msg.sender); + _roleControl.isSteward(msg.sender); _; } @@ -102,18 +101,6 @@ contract ValidatorControl is ValidatorControlInterface, ControlledUpgradeable { } /// @inheritdoc ValidatorControlInterface - /** - * @dev Remove an existing validator from the list. - * - * Restrictions: - * - Only accounts with the steward role are permitted to call this method; otherwise, will revert with an `Unauthorized` error. - * - The validator address must be non-zero; otherwise, will revert with an `InvalidValidatorAddress` error. - * - The validator must not be last one; otherwise, will revert with an `CannotDeactivateLastValidator` error. - * - The validator must exist; otherwise, will revert with an `ValidatorNotFound` error. - * - * Events: - * - On successful validator removal, will emit a `ValidatorRemoved` event. - */ function removeValidator(address validator) public _senderIsSteward _nonZeroValidatorAddress(validator) { if (_validators.length == 1) revert CannotDeactivateLastValidator(); diff --git a/smart_contracts/contracts/upgrade/UpgradeControl.sol b/smart_contracts/contracts/upgrade/UpgradeControl.sol index 7585e88e..18a365d8 100644 --- a/smart_contracts/contracts/upgrade/UpgradeControl.sol +++ b/smart_contracts/contracts/upgrade/UpgradeControl.sol @@ -6,7 +6,6 @@ import { ERC1967Utils } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; -import { Unauthorized } from "../auth/AuthErrors.sol"; import { RoleControlInterface } from "../auth/RoleControlInterface.sol"; import { UpgradeControlInterface } from "./UpgradeControlInterface.sol"; @@ -42,7 +41,7 @@ contract UpgradeControl is UpgradeControlInterface, UUPSUpgradeable, Initializab * @dev Modifier that checks that the sender account has a trustee role */ modifier _onlyTrustee() { - if (!_roleControl.hasRole(RoleControlInterface.ROLES.TRUSTEE, msg.sender)) revert Unauthorized(msg.sender); + _roleControl.isTrustee(msg.sender); _; } diff --git a/smart_contracts/demos/flow-with-did-ethr.ts b/smart_contracts/demos/flow-with-did-ethr.ts index 978ed562..20664aa8 100644 --- a/smart_contracts/demos/flow-with-did-ethr.ts +++ b/smart_contracts/demos/flow-with-did-ethr.ts @@ -2,7 +2,6 @@ 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 @@ -16,21 +15,7 @@ async function demo() { 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, - 'did/svc/did-communication', - 'https://example.com', - 86400, - ), - (err) => { - console.log(JSON.stringify(err)) - return true - }, - ) - - console.log('3. Faber sets service attribute to DID document (Optional)') + console.log('2. Faber sets service attribute to DID document (Optional)') receipt = await faber.ethereumDIDRegistry.setAttribute( faber.address, 'did/svc/did-communication', @@ -39,16 +24,16 @@ async function demo() { ) 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") + console.log("3. Faber creates a Test Schema using the 'did:ethr' DID as the issuer") const { id: schemaId, schema } = createSchemaObject({ issuerId: faber.didEthr }) receipt = await faber.schemaRegistry.createSchema(faber.address, schemaId, faber.didEthr, schema) console.log(`Schema created for id ${schemaId}. Receipt: ${JSON.stringify(receipt)}`) - console.log('5. Faber resolves Test Schema to ensure its written') + console.log('4. Faber resolves Test Schema to ensure its written') const resolvedSchema = await faber.schemaRegistry.resolveSchema(schemaId) console.log(`Schema resolved for ${schemaId}. Schema: ${resolvedSchema.schema}`) - console.log("6. Faber create a Test Credential Definition using the 'did:ethr' DID as the issuer") + console.log("5. Faber create a Test Credential Definition using the 'did:ethr' DID as the issuer") const { id: credentialDefinitionId, credDef: credentialDefinition } = createCredentialDefinitionObject({ issuerId: faber.didEthr, schemaId: schemaId, @@ -62,7 +47,7 @@ async function demo() { ) console.log(`Credential Definition created for id ${credentialDefinitionId}. Receipt: ${JSON.stringify(receipt)}`) - console.log('7. Faber resolves Test Credential Definition to ensure its written') + console.log('6. Faber resolves Test Credential Definition to ensure its written') const resolvedCredentialDefinition = await faber.credentialDefinitionRegistry.resolveCredentialDefinition( credentialDefinitionId, ) @@ -70,11 +55,11 @@ async function demo() { `Credential Definition resolved for ${credentialDefinitionId}. Credential Definition: ${resolvedCredentialDefinition.credDef}`, ) - console.log('8. Alice resolves Test Schema') + console.log('7. Alice resolves Test Schema') const testSchema = await alice.schemaRegistry.resolveSchema(schemaId) console.log(`Schema resolved for ${schemaId}. Schema: ${testSchema.schema}`) - console.log('9. Alice resolves Test Credential Definition') + console.log('8. Alice resolves Test Credential Definition') const testCredentialDefinition = await alice.credentialDefinitionRegistry.resolveCredentialDefinition( credentialDefinitionId, ) diff --git a/smart_contracts/scripts/genesis/config.ts b/smart_contracts/scripts/genesis/config.ts index 722986f2..80ab7b38 100644 --- a/smart_contracts/scripts/genesis/config.ts +++ b/smart_contracts/scripts/genesis/config.ts @@ -59,6 +59,7 @@ export const config: Config = { universalDidResolverAddress: contractsAddresses.universalDidResolver, schemaRegistryAddress: contractsAddresses.schemas, upgradeControlAddress: contractsAddresses.upgradeControl, + roleControlContractAddress: contractsAddresses.roles, }, }, indybesuDidRegistry: { @@ -67,6 +68,7 @@ export const config: Config = { description: 'Smart contract to manage DIDs', data: { upgradeControlAddress: contractsAddresses.upgradeControl, + roleControlContractAddress: contractsAddresses.roles, }, }, ethereumDidRegistry: { @@ -119,6 +121,7 @@ export const config: Config = { data: { universalDidResolverAddress: contractsAddresses.universalDidResolver, upgradeControlAddress: contractsAddresses.upgradeControl, + roleControlContractAddress: contractsAddresses.roles, }, }, universalDidResolver: { @@ -173,6 +176,7 @@ export const config: Config = { data: { universalDidResolver: contractsAddresses.universalDidResolver, upgradeControlAddress: contractsAddresses.upgradeControl, + roleControlContractAddress: contractsAddresses.roles, }, }, } diff --git a/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts b/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts index 71f31e51..c629a370 100644 --- a/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts +++ b/smart_contracts/scripts/genesis/contracts/credentialDefinitionRegistry.ts @@ -8,6 +8,7 @@ export interface CredentialDefinitionsConfig extends ContractConfig { universalDidResolverAddress: string schemaRegistryAddress: string upgradeControlAddress: string + roleControlContractAddress: string } } @@ -19,7 +20,9 @@ export function credentialDefinitionRegistry() { storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) // address of DID registry contact stored in slot 1 storage[slots['1']] = padLeft(data.universalDidResolverAddress, 64) + // address of Role control contact stored in slot 3 + storage[slots['2']] = padLeft(data.roleControlContractAddress, 64) // address of schema registry contact stored in slot 2 - storage[slots['2']] = padLeft(data.schemaRegistryAddress, 64) + storage[slots['3']] = padLeft(data.schemaRegistryAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts b/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts index c856b6ab..6ee70ac2 100644 --- a/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts +++ b/smart_contracts/scripts/genesis/contracts/indyDidRegistry.ts @@ -6,6 +6,7 @@ import { buildProxySection, slots } from '../helpers' export interface IndybesuDidRegistryConfig extends ContractConfig { data: { upgradeControlAddress: string + roleControlContractAddress: string } } @@ -14,5 +15,7 @@ export function indyDidRegistry() { const storage: any = {} storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) + // address of Role control contact stored in slot 1 + storage[slots['1']] = padLeft(data.roleControlContractAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/smart_contracts/scripts/genesis/contracts/legacyMappingRegistry.ts b/smart_contracts/scripts/genesis/contracts/legacyMappingRegistry.ts index 5b87454b..18ac43ec 100644 --- a/smart_contracts/scripts/genesis/contracts/legacyMappingRegistry.ts +++ b/smart_contracts/scripts/genesis/contracts/legacyMappingRegistry.ts @@ -7,6 +7,7 @@ export interface LegacyMappingRegistryConfig extends ContractConfig { data: { universalDidResolver: string upgradeControlAddress: string + roleControlContractAddress: string } } @@ -18,5 +19,7 @@ export function legacyMappingRegistry() { storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) // address of DID resolver contact stored in slot 1 storage[slots['1']] = padLeft(data.universalDidResolver, 64) + // address of DID resolver contact stored in slot 2 + storage[slots['2']] = padLeft(data.roleControlContractAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts b/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts index 7446547b..2150094e 100644 --- a/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts +++ b/smart_contracts/scripts/genesis/contracts/schemaRegistry.ts @@ -7,6 +7,7 @@ export interface SchemasConfig extends ContractConfig { data: { universalDidResolverAddress: string upgradeControlAddress: string + roleControlContractAddress: string } } @@ -18,5 +19,7 @@ export function schemaRegistry() { storage[slots['0']] = padLeft(data.upgradeControlAddress, 64) // address of DID resolver contact stored in slot 1 storage[slots['1']] = padLeft(data.universalDidResolverAddress, 64) + // address of Role control contact stored in slot 2 + storage[slots['2']] = padLeft(data.roleControlContractAddress, 64) return buildProxySection(name, address, description, storage) } diff --git a/smart_contracts/test/auth/AccountControl.spec.ts b/smart_contracts/test/auth/AccountControl.spec.ts index 7fbc0b09..dd7ea7a2 100644 --- a/smart_contracts/test/auth/AccountControl.spec.ts +++ b/smart_contracts/test/auth/AccountControl.spec.ts @@ -68,14 +68,14 @@ describe('AccountControl', function () { expect(await accountControl.transactionAllowed(transaction)).to.be.false }) - it('Should not allow write any transaction to sender without role', async function () { + it('Should allow write any transaction to sender without role', async function () { const { accountControl, testAccounts } = await loadFixture(deployAccountControlFixture) const deployTransaction = createContractDeployTransaction(testAccounts.noRole.account.address) const writeTransaction = createWriteTransaction(testAccounts.noRole.account.address) expect(await accountControl.transactionAllowed(deployTransaction)).to.be.false - expect(await accountControl.transactionAllowed(writeTransaction)).to.be.false + expect(await accountControl.transactionAllowed(writeTransaction)).to.be.true }) }) }) diff --git a/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts b/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts index 7cda2610..5b0b0f86 100644 --- a/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts +++ b/smart_contracts/test/cl/CredentialDefinitionRegistry.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai' import { keccak256, toUtf8Bytes } from 'ethers' import { IndyDidRegistry } from '../../contracts-ts' -import { createCredentialDefinitionObject } from '../../utils' +import { createCredentialDefinitionObject, createSchemaObject } from '../../utils' import { createDid, createDidSigned, @@ -9,17 +9,19 @@ import { createSchemaSigned, deployCredentialDefinitionRegistry, TestableCredentialDefinitionRegistry, + TestableRoleControl, TestableSchemaRegistry, testActorAddress, testActorPrivateKey, } from '../utils/contract-helpers' -import { ClErrors, DidErrors } from '../utils/errors' +import { AuthErrors, ClErrors, DidErrors } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('CredentialDefinitionRegistry', function () { let didRegistry: IndyDidRegistry let schemaRegistry: TestableSchemaRegistry let credentialDefinitionRegistry: TestableCredentialDefinitionRegistry + let roleControl: TestableRoleControl let testAccounts: TestAccounts let schemaId: string let issuerAddress: string @@ -30,6 +32,7 @@ describe('CredentialDefinitionRegistry', function () { indyDidRegistry: didRegistryInit, schemaRegistry: schemaRegistryInit, credentialDefinitionRegistry: credentialDefinitionRegistryInit, + roleControl: roleControlInit, testAccounts: testAccountsInit, } = await deployCredentialDefinitionRegistry() @@ -46,6 +49,7 @@ describe('CredentialDefinitionRegistry', function () { testAccounts = testAccountsInit schemaRegistry = schemaRegistryInit credentialDefinitionRegistry = credentialDefinitionRegistryInit + roleControl = roleControlInit schemaId = id }) @@ -86,16 +90,8 @@ describe('CredentialDefinitionRegistry', function () { const unknownIssuerId = `did:indybesu:mainnet:${testAccounts.noRole.account.address}` const { id, credDef } = createCredentialDefinitionObject({ issuerId: unknownIssuerId, schemaId }) - credentialDefinitionRegistry.connect(testAccounts.noRole.account) - await expect( - credentialDefinitionRegistry.createCredentialDefinition( - testAccounts.noRole.account.address, - id, - unknownIssuerId, - schemaId, - credDef, - ), + credentialDefinitionRegistry.createCredentialDefinition(issuerAddress, id, unknownIssuerId, schemaId, credDef), ) .to.be.revertedWithCustomError(credentialDefinitionRegistry.baseInstance, ClErrors.IssuerNotFound) .withArgs(unknownIssuerId) @@ -142,6 +138,16 @@ describe('CredentialDefinitionRegistry', function () { ), ).to.be.revertedWithCustomError(credentialDefinitionRegistry.baseInstance, DidErrors.NotIdentityOwner) }) + + it('Should fail if the Credential Definition being created by identity without required role', async function () { + const { id, credDef } = createCredentialDefinitionObject({ issuerId, schemaId }) + + credentialDefinitionRegistry.connect(testAccounts.noRole.account) + + await expect( + credentialDefinitionRegistry.createCredentialDefinition(issuerAddress, id, issuerId, schemaId, credDef), + ).to.be.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) + }) }) describe('Add/Resolve Credential Definition with did:ethr Issuer', function () { diff --git a/smart_contracts/test/cl/SchemaRegistry.spec.ts b/smart_contracts/test/cl/SchemaRegistry.spec.ts index 6f97f7e0..00925b25 100644 --- a/smart_contracts/test/cl/SchemaRegistry.spec.ts +++ b/smart_contracts/test/cl/SchemaRegistry.spec.ts @@ -6,16 +6,18 @@ import { createDid, createDidSigned, deploySchemaRegistry, + TestableRoleControl, TestableSchemaRegistry, testActorAddress, testActorPrivateKey, } from '../utils/contract-helpers' -import { ClErrors, DidErrors } from '../utils/errors' +import { AuthErrors, ClErrors, DidErrors } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('SchemaRegistry', function () { let didRegistry: IndyDidRegistry let schemaRegistry: TestableSchemaRegistry + let roleControl: TestableRoleControl let testAccounts: TestAccounts let issuerAddress: string let issuerId: string @@ -23,6 +25,7 @@ describe('SchemaRegistry', function () { beforeEach(async function () { const { indyDidRegistry: didRegistryInit, + roleControl: roleControlInit, schemaRegistry: schemaRegistryInit, testAccounts: testAccountsInit, } = await deploySchemaRegistry() @@ -37,6 +40,7 @@ describe('SchemaRegistry', function () { didRegistry = didRegistryInit testAccounts = testAccountsInit schemaRegistry = schemaRegistryInit + roleControl = roleControlInit }) describe('Add/Resolve Schema', function () { @@ -72,9 +76,7 @@ describe('SchemaRegistry', function () { const unknownIssuerId = `did:indybesu:mainnet:${identity}` const { id, schema } = createSchemaObject({ issuerId: unknownIssuerId }) - schemaRegistry.connect(testAccounts.noRole.account) - - await expect(schemaRegistry.createSchema(identity, id, unknownIssuerId, schema)) + await expect(schemaRegistry.createSchema(issuerAddress, id, unknownIssuerId, schema)) .to.be.revertedWithCustomError(schemaRegistry.baseInstance, ClErrors.IssuerNotFound) .withArgs(unknownIssuerId) }) @@ -101,6 +103,17 @@ describe('SchemaRegistry', function () { schemaRegistry.createSchema(testAccounts.trustee2.account.address, id, issuerId, schema), ).to.be.revertedWithCustomError(schemaRegistry.baseInstance, DidErrors.NotIdentityOwner) }) + + it('Should fail if the Schema being created by identity without required role', async function () { + const { id, schema } = createSchemaObject({ issuerId }) + + schemaRegistry.connect(testAccounts.noRole.account) + + await expect(schemaRegistry.createSchema(issuerAddress, id, issuerId, schema)).to.be.revertedWithCustomError( + roleControl.baseInstance, + AuthErrors.Unauthorized, + ) + }) }) describe('Add/Resolve Schema with did:ethr Issuer', function () { diff --git a/smart_contracts/test/did/DidRegistry.spec.ts b/smart_contracts/test/did/DidRegistry.spec.ts index f38f68f8..59759283 100644 --- a/smart_contracts/test/did/DidRegistry.spec.ts +++ b/smart_contracts/test/did/DidRegistry.spec.ts @@ -1,25 +1,34 @@ import { expect } from 'chai' +import { ROLES } from '../../contracts-ts' import { createBaseDidDocument } from '../../utils/entity-factories' import { + createDidSigned, deployIndyDidRegistry, TestableIndyDidRegistry, + TestableRoleControl, testActorAddress, testActorPrivateKey, } from '../utils/contract-helpers' -import { DidErrors } from '../utils/errors' +import { AuthErrors, DidErrors } from '../utils/errors' import { TestAccounts } from '../utils/test-entities' describe('IndyDidRegistry', function () { let didRegistry: TestableIndyDidRegistry + let roleControl: TestableRoleControl let testAccounts: TestAccounts let identity: string let did: string let didDocument: string beforeEach(async function () { - const { indyDidRegistry: didRegistryInit, testAccounts: testAccountsInit } = await deployIndyDidRegistry() + const { + roleControl: roleControlInit, + indyDidRegistry: didRegistryInit, + testAccounts: testAccountsInit, + } = await deployIndyDidRegistry() didRegistry = didRegistryInit + roleControl = roleControlInit testAccounts = testAccountsInit identity = testAccounts.trustee.account.address @@ -51,6 +60,43 @@ describe('IndyDidRegistry', function () { .to.be.revertedWithCustomError(didRegistry.baseInstance, DidErrors.DidAlreadyExist) .withArgs(identity) }) + + it('Should fail if the DID being created by identity without required role', async function () { + didRegistry.connect(testAccounts.noRole.account) + + await expect( + didRegistry.createDid(testAccounts.noRole.account.address, didDocument), + ).to.be.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) + }) + + it('Should update and deactivate DID by identity owner', async function () { + // create DID document by trustee3 + didRegistry.connect(testAccounts.trustee3.account) + await didRegistry.createDid(testAccounts.trustee3.account.address, didDocument) + + // remove role from trustee3 + didRegistry.connect(testAccounts.trustee.account) + await roleControl.revokeRole(ROLES.TRUSTEE, testAccounts.trustee3.account.address) + + // update DID document and deactivate DID by trustee3 + didRegistry.connect(testAccounts.trustee3.account) + + const authorDid = `did:indybesu:${testActorAddress}` + const updatedDidDocument = createBaseDidDocument(authorDid, { + id: 'kid', + type: 'Ed25519VerificationKey2018', + controller: authorDid, + publicKeyMultibase: 'key', + }) + await didRegistry.updateDid(testAccounts.trustee3.account.address, updatedDidDocument) + + let didRecord = await didRegistry.resolveDid(testAccounts.trustee3.account.address) + expect(didRecord.document).to.be.deep.equal(updatedDidDocument) + + await didRegistry.deactivateDid(testAccounts.trustee3.account.address) + didRecord = await didRegistry.resolveDid(testAccounts.trustee3.account.address) + expect(didRecord.metadata.deactivated).to.be.deep.equal(true) + }) }) describe('Update DID', function () { @@ -131,11 +177,20 @@ describe('IndyDidRegistry', function () { const authorDid = `did:indybesu:testnet:${testActorAddress}` const authorDidDocument = createBaseDidDocument(authorDid) - let sig = await didRegistry.signCreateDidEndorsementData(testActorAddress, testActorPrivateKey, authorDidDocument) + const sig = await didRegistry.signCreateDidEndorsementData( + testActorAddress, + testActorPrivateKey, + authorDidDocument, + ) await didRegistry.createDidSigned(testActorAddress, authorDidDocument, sig) - let didRecord = await didRegistry.resolveDid(testActorAddress) + const didRecord = await didRegistry.resolveDid(testActorAddress) expect(didRecord.document).to.be.deep.equal(authorDidDocument) + }) + + it('Should endorse DID update', async function () { + const authorDid = `did:indybesu:${testActorAddress}` + await createDidSigned(didRegistry, testActorAddress, authorDid) const updatedDidDocument = createBaseDidDocument(authorDid, { id: 'kid', @@ -144,10 +199,14 @@ describe('IndyDidRegistry', function () { publicKeyMultibase: 'key', }) - sig = await didRegistry.signUpdateDidEndorsementData(testActorAddress, testActorPrivateKey, updatedDidDocument) + const sig = await didRegistry.signUpdateDidEndorsementData( + testActorAddress, + testActorPrivateKey, + updatedDidDocument, + ) await didRegistry.updateDidSigned(testActorAddress, updatedDidDocument, sig) - didRecord = await didRegistry.resolveDid(testActorAddress) + const didRecord = await didRegistry.resolveDid(testActorAddress) expect(didRecord.document).to.be.deep.equal(updatedDidDocument) }) }) diff --git a/smart_contracts/test/network/ValidatorControl.spec.ts b/smart_contracts/test/network/ValidatorControl.spec.ts index b44b4170..bf6721ad 100644 --- a/smart_contracts/test/network/ValidatorControl.spec.ts +++ b/smart_contracts/test/network/ValidatorControl.spec.ts @@ -1,8 +1,7 @@ import { loadFixture } from '@nomicfoundation/hardhat-network-helpers' import chai from 'chai' -import { RoleControl } from '../../contracts-ts' import { Account } from '../../utils' -import { TestableValidatorControl } from '../utils/contract-helpers' +import { TestableRoleControl, TestableValidatorControl } from '../utils/contract-helpers' import { AuthErrors, ValidatorControlErrors } from '../utils/errors' import { getTestAccounts, ZERO_ADDRESS } from '../utils/test-entities' @@ -14,7 +13,7 @@ describe('ValidatorControl', function () { const initialValidators: Array = [validator1, validator2] async function deployValidatorControlFixture() { - const roleControl = await new RoleControl().deployProxy({ params: [ZERO_ADDRESS] }) + const roleControl = await new TestableRoleControl().deployProxy({ params: [ZERO_ADDRESS] }) const testAccounts = await getTestAccounts(roleControl) const initialValidatorsData = [ @@ -60,10 +59,11 @@ describe('ValidatorControl', function () { }) it('should fail when adding a new validator by an account without Steward role', async function () { - const { validatorControl, testAccounts } = await loadFixture(deployValidatorControlFixture) + const { validatorControl, roleControl, testAccounts } = await loadFixture(deployValidatorControlFixture) - await expect(validatorControl.connect(testAccounts.noRole.account).addValidator(newValidator.address)) - .to.revertedWithCustomError(validatorControl.baseInstance, AuthErrors.Unauthorized) + validatorControl.connect(testAccounts.noRole.account) + await expect(validatorControl.addValidator(newValidator.address)) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.noRole.account.address) }) diff --git a/smart_contracts/test/upgrade/UpgradeControl.spec.ts b/smart_contracts/test/upgrade/UpgradeControl.spec.ts index 19bae76a..4f2fea62 100644 --- a/smart_contracts/test/upgrade/UpgradeControl.spec.ts +++ b/smart_contracts/test/upgrade/UpgradeControl.spec.ts @@ -1,7 +1,7 @@ import { loadFixture } from '@nomicfoundation/hardhat-network-helpers' import chai from 'chai' import { RoleControl } from '../../contracts-ts' -import { TestableUpgradeControl, UpgradablePrototype } from '../utils/contract-helpers' +import { TestableRoleControl, TestableUpgradeControl, UpgradablePrototype } from '../utils/contract-helpers' import { AuthErrors, ProxyError, UpgradeControlErrors } from '../utils/errors' import { ProxyEvents, UpgradeControlEvents } from '../utils/events' import { getTestAccounts, ZERO_ADDRESS } from '../utils/test-entities' @@ -10,7 +10,7 @@ const { expect } = chai describe('UpgradableControl', function () { async function deployUpgradableContractFixture() { - const roleControl = await new RoleControl().deployProxy({ params: [ZERO_ADDRESS] }) + const roleControl = await new TestableRoleControl().deployProxy({ params: [ZERO_ADDRESS] }) const testAccounts = await getTestAccounts(roleControl) @@ -22,7 +22,7 @@ describe('UpgradableControl', function () { const upgradablePrototypeV2 = await new UpgradablePrototype('UpgradablePrototypeV2').deploy() - return { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts } + return { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts, roleControl } } describe('Propose and approve contract', function () { @@ -88,26 +88,25 @@ describe('UpgradableControl', function () { describe('Propose negative cases', function () { it('Should fail when propose sends from a non-trustee account', async function () { - const { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts } = await loadFixture( - deployUpgradableContractFixture, - ) + const { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts, roleControl } = + await loadFixture(deployUpgradableContractFixture) // Propose by endorser upgradeControl.connect(testAccounts.endorser.account) await expect(upgradeControl.propose(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.endorser.account.address) // Propose by steward upgradeControl.connect(testAccounts.steward.account) await expect(upgradeControl.propose(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.steward.account.address) // Propose by account without role upgradeControl.connect(testAccounts.noRole.account) await expect(upgradeControl.propose(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.noRole.account.address) }) @@ -163,9 +162,8 @@ describe('UpgradableControl', function () { }) it('Should fail when approval sends from a non-trustee account', async function () { - const { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts } = await loadFixture( - deployUpgradableContractFixture, - ) + const { upgradeControl, upgradablePrototype, upgradablePrototypeV2, testAccounts, roleControl } = + await loadFixture(deployUpgradableContractFixture) // Propose by trustee upgradeControl.connect(testAccounts.trustee.account) @@ -176,19 +174,19 @@ describe('UpgradableControl', function () { // Approve by endorser upgradeControl.connect(testAccounts.endorser.account) await expect(upgradeControl.approve(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.endorser.account.address) // Approve by steward upgradeControl.connect(testAccounts.steward.account) await expect(upgradeControl.approve(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.steward.account.address) // Approve by account without role upgradeControl.connect(testAccounts.noRole.account) await expect(upgradeControl.approve(upgradablePrototype.address!, upgradablePrototypeV2.address!)) - .to.revertedWithCustomError(upgradeControl.baseInstance, AuthErrors.Unauthorized) + .to.revertedWithCustomError(roleControl.baseInstance, AuthErrors.Unauthorized) .withArgs(testAccounts.noRole.account.address) }) diff --git a/smart_contracts/test/utils/contract-helpers.ts b/smart_contracts/test/utils/contract-helpers.ts index 9479d338..6af8ad3a 100644 --- a/smart_contracts/test/utils/contract-helpers.ts +++ b/smart_contracts/test/utils/contract-helpers.ts @@ -43,67 +43,67 @@ export class TestableUniversalDidResolver extends testableContractMixin(Universa export class TestableLegacyMappingRegistry extends testableContractMixin(LegacyMappingRegistry) {} -function testableContractMixin Contract>(Base: T) { - return class extends Base { - public get baseInstance() { - return this.instance - } - } -} - export async function deployRoleControl() { - const roleControl = await new RoleControl().deployProxy({ params: [ZERO_ADDRESS] }) + const roleControl = await new TestableRoleControl().deployProxy({ params: [ZERO_ADDRESS] }) const testAccounts = await getTestAccounts(roleControl) return { roleControl, testAccounts } } export async function deployIndyDidRegistry() { - const { testAccounts } = await deployRoleControl() + const { roleControl, testAccounts } = await deployRoleControl() const indyDidRegistry = await new TestableIndyDidRegistry().deployProxy({ - params: [ZERO_ADDRESS], + params: [ZERO_ADDRESS, roleControl.address], }) - return { indyDidRegistry, testAccounts } + return { roleControl, indyDidRegistry, testAccounts } } export async function deployUniversalDidResolver() { - const { indyDidRegistry, testAccounts } = await deployIndyDidRegistry() + const { roleControl, indyDidRegistry, testAccounts } = await deployIndyDidRegistry() const ethereumDIDRegistry = await new EthereumDIDRegistry().deploy() const universalDidResolver = await new TestableUniversalDidResolver().deployProxy({ params: [ZERO_ADDRESS, indyDidRegistry.address, ethereumDIDRegistry.address], }) - return { universalDidResolver, ethereumDIDRegistry, indyDidRegistry, testAccounts } + return { roleControl, universalDidResolver, ethereumDIDRegistry, indyDidRegistry, testAccounts } } export async function deploySchemaRegistry() { - const { universalDidResolver, indyDidRegistry, testAccounts } = await deployUniversalDidResolver() + const { roleControl, universalDidResolver, indyDidRegistry, testAccounts } = await deployUniversalDidResolver() const schemaRegistry = await new TestableSchemaRegistry().deployProxy({ - params: [ZERO_ADDRESS, universalDidResolver.address], + params: [ZERO_ADDRESS, universalDidResolver.address, roleControl.address], }) - return { universalDidResolver, indyDidRegistry, schemaRegistry, testAccounts } + return { roleControl, universalDidResolver, indyDidRegistry, schemaRegistry, testAccounts } } export async function deployCredentialDefinitionRegistry() { - const { universalDidResolver, indyDidRegistry, schemaRegistry, testAccounts } = await deploySchemaRegistry() + const { roleControl, universalDidResolver, indyDidRegistry, schemaRegistry, testAccounts } = + await deploySchemaRegistry() const credentialDefinitionRegistry = await new TestableCredentialDefinitionRegistry().deployProxy({ - params: [ZERO_ADDRESS, universalDidResolver.address, schemaRegistry.address], + params: [ZERO_ADDRESS, universalDidResolver.address, schemaRegistry.address, roleControl.address], }) - return { credentialDefinitionRegistry, universalDidResolver, indyDidRegistry, schemaRegistry, testAccounts } + return { + roleControl, + credentialDefinitionRegistry, + universalDidResolver, + indyDidRegistry, + schemaRegistry, + testAccounts, + } } export async function deployLegacyMappingRegistry() { - const { universalDidResolver, indyDidRegistry, testAccounts } = await deployUniversalDidResolver() + const { roleControl, universalDidResolver, indyDidRegistry, testAccounts } = await deployUniversalDidResolver() const legacyMappingRegistry = await new TestableLegacyMappingRegistry().deployProxy({ - params: [ZERO_ADDRESS, universalDidResolver.address], + params: [ZERO_ADDRESS, universalDidResolver.address, roleControl.address], }) - return { universalDidResolver, indyDidRegistry, legacyMappingRegistry, testAccounts } + return { roleControl, universalDidResolver, indyDidRegistry, legacyMappingRegistry, testAccounts } } export async function createDid(didRegistry: IndyDidRegistry, identity: string, did: string) { @@ -136,3 +136,11 @@ export async function createSchemaSigned(schemaRegistry: SchemaRegistry, identit await schemaRegistry.createSchemaSigned(identity, id, issuerId, schema, signature) return { id, schema } } + +function testableContractMixin Contract>(Base: T) { + return class extends Base { + public get baseInstance() { + return this.instance + } + } +} diff --git a/smart_contracts/test/utils/errors.ts b/smart_contracts/test/utils/errors.ts index e6c1b008..2dc742a1 100644 --- a/smart_contracts/test/utils/errors.ts +++ b/smart_contracts/test/utils/errors.ts @@ -20,7 +20,6 @@ export namespace DidErrors { export const DidNotFound = 'DidNotFound' export const DidAlreadyExist = 'DidAlreadyExist' export const DidHasBeenDeactivated = 'DidHasBeenDeactivated' - export const UnauthorizedSender = 'UnauthorizedSender' export const IncorrectDid = 'IncorrectDid' export const NotIdentityOwner = 'NotIdentityOwner' } diff --git a/vdr/src/contracts/did/did_indy_registry.rs b/vdr/src/contracts/did/did_indy_registry.rs index fff7930d..ed1b4cbe 100644 --- a/vdr/src/contracts/did/did_indy_registry.rs +++ b/vdr/src/contracts/did/did_indy_registry.rs @@ -448,41 +448,40 @@ pub mod test { let data = vec![ 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, 32, 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, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 226, 219, - 108, 141, 198, 198, 129, 187, 93, 106, 209, 33, 161, 7, 243, 0, 233, 178, 181, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 226, 219, 108, 141, 198, 198, 129, 187, 93, - 106, 209, 33, 161, 7, 243, 0, 233, 178, 181, 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, 101, 203, 135, 39, 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, 101, 203, 135, - 39, 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, 1, 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, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 160, 65, 210, + 31, 10, 202, 228, 139, 73, 181, 120, 177, 49, 18, 63, 155, 48, 194, 28, 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, 101, 207, + 153, 152, 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, 101, 207, 153, 152, 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, 5, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 210, 123, 34, 64, 99, 111, 110, 116, 101, - 120, 116, 34, 58, 91, 34, 104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, - 119, 51, 46, 111, 114, 103, 47, 110, 115, 47, 100, 105, 100, 47, 118, 49, 34, 93, - 44, 34, 105, 100, 34, 58, 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 210, 123, 34, 64, + 99, 111, 110, 116, 101, 120, 116, 34, 58, 91, 34, 104, 116, 116, 112, 115, 58, 47, + 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 110, 115, 47, 100, 105, 100, + 47, 118, 49, 34, 93, 44, 34, 105, 100, 34, 58, 34, 100, 105, 100, 58, 105, 110, + 100, 121, 98, 101, 115, 117, 58, 48, 120, 102, 48, 101, 50, 100, 98, 54, 99, 56, + 100, 99, 54, 99, 54, 56, 49, 98, 98, 53, 100, 54, 97, 100, 49, 50, 49, 97, 49, 48, + 55, 102, 51, 48, 48, 101, 57, 98, 50, 98, 53, 34, 44, 34, 118, 101, 114, 105, 102, + 105, 99, 97, 116, 105, 111, 110, 77, 101, 116, 104, 111, 100, 34, 58, 91, 123, 34, + 105, 100, 34, 58, 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, + 48, 120, 102, 48, 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, + 98, 53, 100, 54, 97, 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, 57, 98, + 50, 98, 53, 35, 75, 69, 89, 45, 49, 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 69, + 100, 50, 53, 53, 49, 57, 86, 101, 114, 105, 102, 105, 99, 97, 116, 105, 111, 110, + 75, 101, 121, 50, 48, 49, 56, 34, 44, 34, 99, 111, 110, 116, 114, 111, 108, 108, + 101, 114, 34, 58, 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, + 48, 120, 102, 48, 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, + 98, 53, 100, 54, 97, 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, 57, 98, + 50, 98, 53, 35, 75, 69, 89, 45, 49, 34, 44, 34, 112, 117, 98, 108, 105, 99, 75, + 101, 121, 77, 117, 108, 116, 105, 98, 97, 115, 101, 34, 58, 34, 122, 65, 75, 74, + 80, 51, 102, 55, 66, 68, 54, 87, 52, 105, 87, 69, 81, 57, 106, 119, 110, 100, 86, + 84, 67, 66, 113, 56, 117, 97, 50, 85, 116, 116, 56, 69, 69, 106, 74, 54, 86, 120, + 115, 102, 34, 125, 93, 44, 34, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, + 105, 111, 110, 34, 58, 91, 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, 48, 120, 102, 48, 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, 98, 53, 100, 54, 97, 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, - 57, 98, 50, 98, 53, 34, 44, 34, 118, 101, 114, 105, 102, 105, 99, 97, 116, 105, - 111, 110, 77, 101, 116, 104, 111, 100, 34, 58, 91, 123, 34, 105, 100, 34, 58, 34, - 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, 48, 120, 102, 48, - 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, 98, 53, 100, 54, 97, - 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, 57, 98, 50, 98, 53, 35, 75, - 69, 89, 45, 49, 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 69, 100, 50, 53, 53, - 49, 57, 86, 101, 114, 105, 102, 105, 99, 97, 116, 105, 111, 110, 75, 101, 121, 50, - 48, 49, 56, 34, 44, 34, 99, 111, 110, 116, 114, 111, 108, 108, 101, 114, 34, 58, - 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, 48, 120, 102, 48, - 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, 98, 53, 100, 54, 97, - 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, 57, 98, 50, 98, 53, 35, 75, - 69, 89, 45, 49, 34, 44, 34, 112, 117, 98, 108, 105, 99, 75, 101, 121, 77, 117, 108, - 116, 105, 98, 97, 115, 101, 34, 58, 34, 122, 65, 75, 74, 80, 51, 102, 55, 66, 68, - 54, 87, 52, 105, 87, 69, 81, 57, 106, 119, 110, 100, 86, 84, 67, 66, 113, 56, 117, - 97, 50, 85, 116, 116, 56, 69, 69, 106, 74, 54, 86, 120, 115, 102, 34, 125, 93, 44, - 34, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 105, 111, 110, 34, 58, 91, - 34, 100, 105, 100, 58, 105, 110, 100, 121, 98, 101, 115, 117, 58, 48, 120, 102, 48, - 101, 50, 100, 98, 54, 99, 56, 100, 99, 54, 99, 54, 56, 49, 98, 98, 53, 100, 54, 97, - 100, 49, 50, 49, 97, 49, 48, 55, 102, 51, 48, 48, 101, 57, 98, 50, 98, 53, 35, 75, - 69, 89, 45, 49, 34, 93, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 57, 98, 50, 98, 53, 35, 75, 69, 89, 45, 49, 34, 93, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, ]; let parsed_did_doc = parse_resolve_did_result(&client, &data).unwrap(); assert_eq!(did_doc(TEST_ACCOUNT.as_ref()), parsed_did_doc.document); diff --git a/vdr/src/contracts/did/did_resolver.rs b/vdr/src/contracts/did/did_resolver.rs index ce1aaca0..2132fb9c 100644 --- a/vdr/src/contracts/did/did_resolver.rs +++ b/vdr/src/contracts/did/did_resolver.rs @@ -432,6 +432,7 @@ mod ethr { }; Ok(DidMetadata { + owner: None, created: None, deactivated: Some(deactivated), updated, diff --git a/vdr/src/contracts/did/types/did_doc.rs b/vdr/src/contracts/did/types/did_doc.rs index ea56f72d..57ea9fc1 100644 --- a/vdr/src/contracts/did/types/did_doc.rs +++ b/vdr/src/contracts/did/types/did_doc.rs @@ -1,7 +1,7 @@ use crate::{ error::VdrError, types::{ContractOutput, ContractParam}, - Block, + Address, Block, }; use crate::contracts::did::types::did::DID; @@ -78,6 +78,8 @@ pub struct DidRecord { #[derive(Debug, Default, Clone, PartialEq, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DidMetadata { + #[serde(skip_serializing_if = "Option::is_none")] + pub owner: Option
, #[serde(skip_serializing_if = "Option::is_none")] pub created: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -256,13 +258,13 @@ impl TryFrom for DidMetadata { type Error = VdrError; fn try_from(value: ContractOutput) -> Result { - let _owner = value.get_address(0)?; - let _sender = value.get_address(1)?; - let created = value.get_u128(2)? as u64; - let updated = value.get_u128(3)? as u64; - let version_id = value.get_u128(4)? as u64; - let deactivated = value.get_bool(5)?; + let owner = value.get_address(0)?; + let created = value.get_u128(1)? as u64; + let updated = value.get_u128(2)? as u64; + let version_id = value.get_u128(3)? as u64; + let deactivated = value.get_bool(4)?; let did_metadata = DidMetadata { + owner: Some(owner), deactivated: Some(deactivated), created: Some(created), version_id: Some(version_id),