From 59635518088e7bc4812735f7b3c5d613fdbd35f6 Mon Sep 17 00:00:00 2001 From: "artem.ivanov" Date: Wed, 28 Feb 2024 09:12:31 +0300 Subject: [PATCH] Processed review comments Signed-off-by: artem.ivanov --- docs/design/legacy-identifiers-support.md | 2 +- docs/migration/migration.md | 4 ++-- network/config/besu/genesis.json | 6 +++--- .../contracts/migration/LegacyMappingRegistry.sol | 8 ++++---- .../test/migration/LegacyMappingRegistry.spec.ts | 2 +- vdr/src/contracts/migration/types/did.rs | 2 +- vdr/src/contracts/migration/types/ed25519_signature.rs | 2 +- vdr/src/types/endorsing_data.rs | 2 +- vdr/src/types/transaction.rs | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/design/legacy-identifiers-support.md b/docs/design/legacy-identifiers-support.md index 5b51ede1..3b1c578e 100644 --- a/docs/design/legacy-identifiers-support.md +++ b/docs/design/legacy-identifiers-support.md @@ -31,7 +31,7 @@ So that legacy DID can be associated with a new `did:ethr` and we can only use ` bytes32 sigS, string calldata identifier, bytes32 ed25519Key, - bytes calldata ed25518Signature + bytes calldata ed25519Signature ) // check signatures didMapping[identifier] = identity; diff --git a/docs/migration/migration.md b/docs/migration/migration.md index 3bb7d53a..293b9635 100644 --- a/docs/migration/migration.md +++ b/docs/migration/migration.md @@ -105,11 +105,11 @@ Issuer need to run migration tool manually (on the machine containing Indy Walle * `contracts` - specifications for contracts deployed on the network * `signer` - transactions signer 2. DID ownership moving to Besu Ledger: - 1. Issuer create Ed25518 key (with seed) in the Besu wallet + 1. Issuer create Ed25519 key (with seed) in the Besu wallet 2. Issuer create a new Secp256k1 keypair in Besu wallet 3. Issuer publish Secp256k1 key to Indy ledger using ATTRIB transaction: `{ "besu": { "key": secp256k1_key } }` * Now Besu Secp256k1 key is associated with the Issuer DID which is published on the Indy Ledger. - * ATTRIB transaction is signed with Ed25518 key. No signature request for `secp256k1_key`. + * ATTRIB transaction is signed with Ed25519 key. No signature request for `secp256k1_key`. 3. Issuer build DID Document which will include: * DID - fully qualified form should be used: `did:besu:network:` of DID which was published as NYM transaction to Indy Ledger * Two Verification Methods must be included: diff --git a/network/config/besu/genesis.json b/network/config/besu/genesis.json index e1da75ff..b0c5d961 100644 --- a/network/config/besu/genesis.json +++ b/network/config/besu/genesis.json @@ -226,12 +226,12 @@ "0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000019999", "0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000006666", "f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00": "0x0000000000000000000000000000000000000000000000000000000000000001", - "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000a6d35f8e0f5f9790c4ca1cd875a3c323258336cb" + "360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000e7088f06ea5b03450396bfa213a34bc6f6dc1b8c" } }, - "0xa6d35f8e0f5f9790c4ca1cd875a3c323258336cb": { + "0xe7088f06ea5b03450396bfa213a34bc6f6dc1b8c": { "comment": "Implementation: Smart contract to store mapping of legacy identifiers to new one", - "code": "0x6080604052600436106100915760003560e01c80639a3265d9116100595780639a3265d914610140578063ad3cb1cc14610160578063c0c53b8b14610191578063c612ab58146101b1578063d924aedb146101d157600080fd5b80634f1ef2861461009657806352d1902d146100ab57806353aac465146100d35780637223460a146100f357806393a8c74214610113575b600080fd5b6100a96100a4366004612326565b6101f1565b005b3480156100b757600080fd5b506100c0610210565b6040519081526020015b60405180910390f35b3480156100df57600080fd5b506100a96100ee3660046123d9565b61022d565b3480156100ff57600080fd5b506100a961010e3660046124b7565b6102ee565b34801561011f57600080fd5b5061013361012e366004612587565b6103a8565b6040516100ca919061261f565b34801561014c57600080fd5b506100a961015b366004612632565b61044d565b34801561016c57600080fd5b50610133604051806040016040528060058152602001640352e302e360dc1b81525081565b34801561019d57600080fd5b506100a96101ac3660046126e5565b610468565b3480156101bd57600080fd5b506101336101cc366004612587565b61057c565b3480156101dd57600080fd5b506100a96101ec366004612728565b6105a0565b6101f96105b9565b61020282610660565b61020c82826106c6565b5050565b600061021a61078d565b50600080516020612c4f83398151915290565b6000601960f81b600060f81b308e8b8b8b8b8b8b8b60405160200161025c9b9a999897969594939291906127d2565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8e1691830191909152606082018c9052608082018b905291506102e0908d9060019060a0016020604051602081039080840390855afa1580156102ca573d6000803e3d6000fd5b505050602060405103518a8a8a8a8a8a8a6107d6565b505050505050505050505050565b60405160009061031890601960f81b90839030908f908c908c908c908c908c908c90602001612864565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a9052915061039b908c9060019060a0016020604051602081039080840390855afa158015610386573d6000803e3d6000fd5b50505060206040510351898989898989610ad5565b5050505050505050505050565b8051602081830181018051600382529282019190930120915280546103cc906128fa565b80601f01602080910402602001604051908101604052809291908181526020018280546103f8906128fa565b80156104455780601f1061041a57610100808354040283529160200191610445565b820191906000526020600020905b81548152906001019060200180831161042857829003601f168201915b505050505081565b61045e8833898989898989896107d6565b5050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104b1575080546001600160401b03808416911610155b156104cf5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556104f985610e0e565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b8051602081830181018051600482529282019190930120915280546103cc906128fa565b6105b08733888888888888610ad5565b50505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061064057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610634600080516020612c4f833981519152546001600160a01b031690565b6001600160a01b031614155b1561065e5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156106ab57600080fd5b505afa1580156106bf573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610720575060408051601f3d908101601f1916820190925261071d9181019061292e565b60015b61074d57604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020612c4f833981519152811461077e57604051632a87526960e21b815260048101829052602401610744565b6107888383610e38565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461065e5760405163703e46dd60e11b815260040160405180910390fd5b8888806001600160a01b0316826001600160a01b03161461081d576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610744565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b15801561086057600080fd5b505afa158015610874573d6000803e3d6000fd5b5050505061093961092c60038b8b604051610890929190612947565b908152602001604051809103902080546108a9906128fa565b80601f01602080910402602001604051908101604052809291908181526020018280546108d5906128fa565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b5050505050610e8e565b6001600160801b03161590565b61095a578888604051630ab7bdc760e21b8152600401610744929190612980565b846001600160801b0319166109a48a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e9f92505050565b6109ad90612994565b6001600160801b031916146109db57848989604051630876c99d60e21b8152600401610744939291906129cb565b610a26610a1d88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610eaa92505050565b60200151610ff5565b6001600160a01b03168b6001600160a01b031614610a5b578686604051631859e3bb60e11b8152600401610744929190612980565b868660038b8b604051610a6f929190612947565b90815260200160405180910390209182610a8a929190612a35565b507ff214be33ffacf63cd5f2d1636bef433e47c400b94d565c786049bfa836c20e1989898989604051610ac09493929190612af4565b60405180910390a15050505050505050505050565b8787806001600160a01b0316826001600160a01b031614610b1c576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610744565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b158015610b5f57600080fd5b505afa158015610b73573d6000803e3d6000fd5b5050505060048686604051610b89929190612947565b90815260200160405180910390208054610ba2906128fa565b159050610bc65785856040516327ef3c3d60e01b8152600401610744929190612980565b610bde61092c60038a8a604051610890929190612947565b15610c0057858560405163a54e9cfb60e01b8152600401610744929190612980565b6000610cb6610a1d60038b8b604051610c1a929190612947565b90815260200160405180910390208054610c33906128fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5f906128fa565b8015610cac5780601f10610c8157610100808354040283529160200191610cac565b820191906000526020600020905b815481529060010190602001808311610c8f57829003601f168201915b5050505050610eaa565b9050806001600160a01b03168b6001600160a01b031614610cfd576040516316343f1760e31b81526001600160a01b03808d16600483015282166024820152604401610744565b610d84610d3f8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e8e92505050565b610d7e89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e8e92505050565b9061102e565b610da95786868a8a60405163998f70a160e01b81526004016107449493929190612af4565b848460048989604051610dbd929190612947565b90815260200160405180910390209182610dd8929190612a35565b507f87526cc0385862de920bf8b05560b5c9eb58f8af45be9f917801198166655f8887878787604051610ac09493929190612af4565b610e16611041565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610e418261108a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e865761078882826110ef565b61020c611165565b6000610e9982611184565b92915050565b6060610e9982611198565b60408051808201909152606080825260208201526000610ec983610e8e565b90506000610eef604051806040016040528060018152602001601d60f91b815250610e8e565b9050600080610efe84846114be565b955092509050801580610f3c5750610f3a610f3360405180604001604052806003815260200162191a5960ea1b815250610e8e565b839061150c565b155b15610f5c5785604051631859e3bb60e11b8152600401610744919061261f565b610f6684846114be565b95509250905080610f8c5785604051631859e3bb60e11b8152600401610744919061261f565b6040805180820190915260608082526020820152610fa983611518565b81526040805180820190915260018152601d60f91b6020820152610fd790610fd090610e8e565b8690611523565b9450610fe69150849050611518565b60208201529695505050505050565b60006016611001835190565b0361100e57506000919050565b60006110198361154d565b905061102481612b26565b60601c9392505050565b600061103a838361173f565b9392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661065e57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b6000036110c057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610744565b600080516020612c4f83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161110c9190612b59565b600060405180830381855af49150503d8060008114611147576040519150601f19603f3d011682016040523d82523d6000602084013e61114c565b606091505b509150915061115c858383611757565b95945050505050565b341561065e5760405163b398979f60e01b815260040160405180910390fd5b60008060208301905061103a8184516117b3565b80516060906031906000805b82811080156111cb5750838682815181106111c1576111c1612b75565b016020015160f81c145b156111dc57600191820191016111a4565b5060008080806117e361209f8702046001016002026001600160401b038111156112085761120861229b565b6040519080825280601f01601f191660200182016040528015611232576020820181803683370190505b5090506000600460038801046001600160401b038111156112555761125561229b565b60405190808252806020026020018201604052801561127e578160200160208202803683370190505b50905060005b8a5181101561137c5760008b82815181106112a1576112a1612b75565b602001015160f81c60f81b90506112d06040518060600160405280603a8152602001612c8f603a9139826117bf565b9096509450846112f5578b604051634cb9e47360e11b8152600401610744919061261f565b8251600019015b60008112611372578684828151811061131757611317612b75565b602002602001015163ffffffff16603a026001600160401b0316019750602088901c96508763ffffffff1684828151811061135457611354612b75565b63ffffffff90921660209283029190910190910152600019016112fc565b5050600101611284565b50600860038816026001600160401b038116600003611399575060205b600719016000805b8351811015611443575b6020836001600160401b0316101561143757826001600160401b03168482815181106113d9576113d9612b75565b602002602001015163ffffffff16901c60f81b8583815181106113fe576113fe612b75565b60200101906001600160f81b031916908160001a90535060019091019060086001600160401b03841610611437576008830392506113ab565b601892506001016113a1565b50875b84518110156114a157600060f81b85828151811061146657611466612b75565b01602001516001600160f81b031916111561149957611488858a830384611822565b9d9c50505050505050505050505050565b600101611446565b506114ae84600083611822565b9c9b505050505050505050505050565b60008080806114cd86866118d3565b905060001981036114e957600086600093509350935050611505565b6114fd86826001600160801b0388166119de565b935093509350505b9250925092565b600061103a8383611a4b565b6060610e9982611a95565b60008080806115328686611b0c565b905060001981036114e9576000808793509350935050611505565b6060600061155a83610e8e565b9050600061158160405180604001604052806002815260200161060f60f31b815250610e8e565b90506115b06115a960405180604001604052806002815260200161060f60f31b815250610e8e565b8390611bfe565b6115cb57505060408051602081019091526000815292915050565b6115dd6115d88383611c0a565b611518565b935060008490506000600282516115f49190612ba1565b6001600160401b0381111561160b5761160b61229b565b6040519080825280601f01601f191660200182016040528015611635576020820181803683370190505b50905060005b81518110156117355760008061167a85611656856002612bc3565b8151811061166657611666612b75565b01602001516001600160f81b031916611c16565b915091508061169f575050604080516020810190915260008152979650505050505050565b6000806116bc876116b1876002612bc3565b611656906001612bda565b91509150806116e35750506040805160208101909152600081529998505050505050505050565b816116ef856010612bed565b6116f99190612c09565b60f81b86868151811061170e5761170e612b75565b60200101906001600160f81b031916908160001a905350506001909301925061163b915050565b5095945050505050565b600060001961174e84846118d3565b14159392505050565b60608261176c5761176782611cfc565b61103a565b815115801561178357506001600160a01b0384163b155b156117ac57604051639996b31560e01b81526001600160a01b0385166004820152602401610744565b5092915050565b600061103a8383611d25565b60008060005b845181101561181257836001600160f81b0319168582815181106117eb576117eb612b75565b01602001516001600160f81b0319160361180a5791506001905061181b565b6001016117c5565b50600080915091505b9250929050565b606060008383036001600160401b038111156118405761184061229b565b6040519080825280601f01601f19166020018201604052801561186a576020820181803683370190505b50905060005b8484038110156118ca57858582018151811061188e5761188e612b75565b602001015160f81c60f81b8282815181106118ab576118ab612b75565b60200101906001600160f81b031916908160001a905350600101611870565b50949350505050565b60006001600160801b038381169083168083036118f557600092505050610e99565b81158061190157508181115b156119125760001992505050610e99565b600061191e8660801c90565b9050600061192c8660801c90565b9050600061193b825160001a90565b90505b600061194b848784611d31565b90506000198103611966576000199650505050505050610e99565b94859003949283019285851115611987576000199650505050505050610e99565b848320858520036119b35761199c8960801c90565b6119a69085612c22565b9650505050505050610e99565b856001036119cb576000199650505050505050610e99565b600019909501946001909301925061193e565b6000806000806119ee8760801c90565b90506001600160801b03871685870181811115611a1e576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b038381169083168114611a6b576000915050610e99565b611a8d611a788560801c90565b611a828560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b03811115611ab857611ab861229b565b6040519080825280601f01601f191660200182016040528015611ae2576020820181803683370190505b50905060208101611b0681611af78560801c90565b6001600160801b038616611df8565b50919050565b60006001600160801b03838116908316808303611b2e57600092505050610e99565b811580611b3a57508181115b15611b4b5760001992505050610e99565b6000611b578660801c90565b90506000611b658660801c90565b90506000611b7287611e06565b905060001984015b6000611b87858885611e4b565b90506000198103611ba357600019975050505050505050610e99565b80821115611bbc57600019975050505050505050610e99565b858420828203868101889020909103611bde579750610e999650505050505050565b8115611bec57509550611b7a565b60001998505050505050505050610e99565b600061103a8383611eff565b600061103a8383611f4c565b600080600360fc1b6001600160f81b0319841610801590611c455750603960f81b6001600160f81b0319841611155b15611c6357611c59603060f885901c612c35565b9360019350915050565b604160f81b6001600160f81b0319841610801590611c8f5750602360f91b6001600160f81b0319841611155b15611caf576041611ca560f885901c600a612c09565b611c599190612c35565b606160f81b6001600160f81b0319841610801590611cdb5750603360f91b6001600160f81b0319841611155b15611cf1576061611ca560f885901c600a612c09565b506000928392509050565b805115611d0c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600061103a8383611fa6565b600060208311611d4d57611d4684848461200c565b905061103a565b83601f8416808503820160ff8516600080516020612c6f833981519152025b81881015611dae5787518118611d818161211d565b15611da257848903611d958a60208a61200c565b019550505050505061103a565b60208901985050611d6c565b82600003611dc45760001994505050505061103a565b611dcf82848861200c565b94506000198503611de85760001994505050505061103a565b838203850194505050505061103a565b8083828460045afa50505050565b60006001600160801b038216808203611e32576040516365f4e9df60e01b815260040160405180910390fd5b61103a60018203611e438560801c90565b015160001a90565b600060208311611e6057611d46848484612168565b601f83168484018115611e98578190036000611e7d828487612168565b90506000198114611e96579086900301915061103a9050565b505b60ff8416600080516020612c6f833981519152025b86821115611ef157601f1990910180519091908118611ecb8161211d565b15611eeb57878303611edf84602089612168565b0194505050505061103a565b50611ead565b506000199695505050505050565b60006001600160801b0383811690831680821015611f2257600092505050610e99565b8481831115611f3857611f3586836121b1565b90505b611f428186611a4b565b9695505050505050565b60006001600160801b0383811690831681811115611f6e578492505050610e99565b600080611f7b87846121fc565b9092509050611f8a8287611a4b565b15611f9a579350610e9992505050565b86945050505050610e99565b60006001600160801b03831115611fd05760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b03821115611ff857604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b825160009081602085111561202057602094505b601285106120aa5760ff8416600080516020612c6f8339815191520282186120506001600160801b03821761211d565b6000036120865760109150601a8610612081576120756001600160401b03821761211d565b60000361208157601891505b6120a4565b6120986001600160c01b03821761211d565b6000036120a457600891505b506120e8565b600a85106120e85760ff8416600080516020612c6f8339815191520282186120da6001600160c01b03821761211d565b6000036120e657600891505b505b848110156121105781811a60ff851681036121075750915061103a9050565b506001016120e8565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b6000602083111561217857602092505b83515b83156121a5576000199093019280841a60ff8416810361219f57849250505061103a565b5061217b565b50600019949350505050565b60006001600160801b038316808311156121de576040516365f4e9df60e01b815260040160405180910390fd5b611a8d6121eb8560801c90565b60801b6001600160801b0385161790565b600080600061220b8560801c90565b90506001600160801b03851680851115612238576040516365f4e9df60e01b815260040160405180910390fd5b608082901b6001600160801b038616176122726122558785612bda565b61225f8885612c22565b6001600160801b031660809190911b1790565b9350935050509250929050565b80356001600160a01b038116811461229657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156122cb576122cb61229b565b604051601f8501601f19908116603f011681019082821181831017156122f3576122f361229b565b8160405280935085815286868601111561230c57600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561233957600080fd5b6123428361227f565b915060208301356001600160401b0381111561235d57600080fd5b8301601f8101851361236e57600080fd5b61237d858235602084016122b1565b9150509250929050565b803560ff8116811461229657600080fd5b60008083601f8401126123aa57600080fd5b5081356001600160401b038111156123c157600080fd5b60208301915083602082850101111561181b57600080fd5b60008060008060008060008060008060006101008c8e0312156123fb57600080fd5b6124048c61227f565b9a5061241260208d01612387565b995060408c0135985060608c013597506001600160401b038060808e0135111561243b57600080fd5b61244b8e60808f01358f01612398565b909850965060a08d013581101561246157600080fd5b6124718e60a08f01358f01612398565b909650945060c08d0135935060e08d013581101561248e57600080fd5b5061249f8d60e08e01358e01612398565b81935080925050509295989b509295989b9093969950565b60008060008060008060008060008060e08b8d0312156124d657600080fd5b6124df8b61227f565b99506124ed60208c01612387565b985060408b0135975060608b0135965060808b01356001600160401b038082111561251757600080fd5b6125238e838f01612398565b909850965060a08d013591508082111561253c57600080fd5b6125488e838f01612398565b909650945060c08d013591508082111561256157600080fd5b5061256e8d828e01612398565b915080935050809150509295989b9194979a5092959850565b60006020828403121561259957600080fd5b81356001600160401b038111156125af57600080fd5b8201601f810184136125c057600080fd5b611a8d848235602084016122b1565b60005b838110156125ea5781810151838201526020016125d2565b50506000910152565b6000815180845261260b8160208601602086016125cf565b601f01601f19169290920160200192915050565b60208152600061103a60208301846125f3565b60008060008060008060008060a0898b03121561264e57600080fd5b6126578961227f565b975060208901356001600160401b038082111561267357600080fd5b61267f8c838d01612398565b909950975060408b013591508082111561269857600080fd5b6126a48c838d01612398565b909750955060608b0135945060808b01359150808211156126c457600080fd5b506126d18b828c01612398565b999c989b5096995094979396929594505050565b6000806000606084860312156126fa57600080fd5b6127038461227f565b92506127116020850161227f565b915061271f6040850161227f565b90509250925092565b60008060008060008060006080888a03121561274357600080fd5b61274c8861227f565b965060208801356001600160401b038082111561276857600080fd5b6127748b838c01612398565b909850965060408a013591508082111561278d57600080fd5b6127998b838c01612398565b909650945060608a01359150808211156127b257600080fd5b506127bf8a828b01612398565b989b979a50959850939692959293505050565b6001600160f81b03198c811682528b1660018201526001600160601b031960608b811b821660028401528a901b1660168201526f6372656174654469644d617070696e6760801b602a82015260008789603a840137878201603a8101600081528789823750868101905085603a8201528385605a83013760009301605a0192835250909b9a5050505050505050505050565b6001600160f81b03198b811682528a1660018201526001600160601b031960608a811b8216600284015289901b166016820152746372656174655265736f757263654d617070696e6760581b602a82015260008688603f840137868201603f81016000815286888237508581019050603f810160008152848682375060009301603f0192835250909a9950505050505050505050565b600181811c9082168061290e57607f821691505b602082108103611b0657634e487b7160e01b600052602260045260246000fd5b60006020828403121561294057600080fd5b5051919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611a8d602083018486612957565b805160208201516001600160801b031980821692919060108310156129c35780818460100360031b1b83161693505b505050919050565b83815260406020820152600061115c604083018486612957565b601f821115610788576000816000526020600020601f850160051c81016020861015612a0e5750805b601f850160051c820191505b81811015612a2d57828155600101612a1a565b505050505050565b6001600160401b03831115612a4c57612a4c61229b565b612a6083612a5a83546128fa565b836129e5565b6000601f841160018114612a945760008515612a7c5750838201355b600019600387901b1c1916600186901b1783556106bf565b600083815260209020601f19861690835b82811015612ac55786850135825560209485019460019092019101612aa5565b5086821015612ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b604081526000612b08604083018688612957565b8281036020840152612b1b818587612957565b979650505050505050565b805160208201516001600160601b031980821692919060148310156129c35760149290920360031b82901b161692915050565b60008251612b6b8184602087016125cf565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082612bbe57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610e9957610e99612b8b565b80820180821115610e9957610e99612b8b565b60ff81811683821602908116908181146117ac576117ac612b8b565b60ff8181168382160190811115610e9957610e99612b8b565b81810381811115610e9957610e99612b8b565b60ff8281168282160390811115610e9957610e99612b8b56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc010101010101010101010101010101010101010101010101010101010101010131323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa2646970667358221220e0b0a714b99821bba1e735cf2e20df77e61b4386b92ed0ea676e426b33fbe2be64736f6c63430008170033" + "code": "0x6080604052600436106100915760003560e01c80639a3265d9116100595780639a3265d914610140578063ad3cb1cc14610160578063c0c53b8b14610191578063c612ab58146101b1578063d924aedb146101d157600080fd5b80634f1ef2861461009657806352d1902d146100ab57806353aac465146100d35780637223460a146100f357806393a8c74214610113575b600080fd5b6100a96100a4366004612326565b6101f1565b005b3480156100b757600080fd5b506100c0610210565b6040519081526020015b60405180910390f35b3480156100df57600080fd5b506100a96100ee3660046123d9565b61022d565b3480156100ff57600080fd5b506100a961010e3660046124b7565b6102ee565b34801561011f57600080fd5b5061013361012e366004612587565b6103a8565b6040516100ca919061261f565b34801561014c57600080fd5b506100a961015b366004612632565b61044d565b34801561016c57600080fd5b50610133604051806040016040528060058152602001640352e302e360dc1b81525081565b34801561019d57600080fd5b506100a96101ac3660046126e5565b610468565b3480156101bd57600080fd5b506101336101cc366004612587565b61057c565b3480156101dd57600080fd5b506100a96101ec366004612728565b6105a0565b6101f96105b9565b61020282610660565b61020c82826106c6565b5050565b600061021a61078d565b50600080516020612c4f83398151915290565b6000601960f81b600060f81b308e8b8b8b8b8b8b8b60405160200161025c9b9a999897969594939291906127d2565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8e1691830191909152606082018c9052608082018b905291506102e0908d9060019060a0016020604051602081039080840390855afa1580156102ca573d6000803e3d6000fd5b505050602060405103518a8a8a8a8a8a8a6107d6565b505050505050505050505050565b60405160009061031890601960f81b90839030908f908c908c908c908c908c908c90602001612864565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8d1691830191909152606082018b9052608082018a9052915061039b908c9060019060a0016020604051602081039080840390855afa158015610386573d6000803e3d6000fd5b50505060206040510351898989898989610ad5565b5050505050505050505050565b8051602081830181018051600382529282019190930120915280546103cc906128fa565b80601f01602080910402602001604051908101604052809291908181526020018280546103f8906128fa565b80156104455780601f1061041a57610100808354040283529160200191610445565b820191906000526020600020905b81548152906001019060200180831161042857829003601f168201915b505050505081565b61045e8833898989898989896107d6565b5050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460019190600160401b900460ff16806104b1575080546001600160401b03808416911610155b156104cf5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556104f985610e0e565b600180546001600160a01b038681166001600160a01b0319928316179092556002805492861692909116919091179055805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b8051602081830181018051600482529282019190930120915280546103cc906128fa565b6105b08733888888888888610ad5565b50505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061064057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610634600080516020612c4f833981519152546001600160a01b031690565b6001600160a01b031614155b1561065e5760405163703e46dd60e11b815260040160405180910390fd5b565b60005460405163574a81d760e01b81523060048201526001600160a01b0383811660248301529091169063574a81d79060440160006040518083038186803b1580156106ab57600080fd5b505afa1580156106bf573d6000803e3d6000fd5b5050505050565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610720575060408051601f3d908101601f1916820190925261071d9181019061292e565b60015b61074d57604051634c9c8ce360e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020612c4f833981519152811461077e57604051632a87526960e21b815260048101829052602401610744565b6107888383610e38565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461065e5760405163703e46dd60e11b815260040160405180910390fd5b8888806001600160a01b0316826001600160a01b03161461081d576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610744565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b15801561086057600080fd5b505afa158015610874573d6000803e3d6000fd5b5050505061093961092c60038b8b604051610890929190612947565b908152602001604051809103902080546108a9906128fa565b80601f01602080910402602001604051908101604052809291908181526020018280546108d5906128fa565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b5050505050610e8e565b6001600160801b03161590565b61095a578888604051630ab7bdc760e21b8152600401610744929190612980565b846001600160801b0319166109a48a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e9f92505050565b6109ad90612994565b6001600160801b031916146109db57848989604051630876c99d60e21b8152600401610744939291906129cb565b610a26610a1d88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610eaa92505050565b60200151610ff5565b6001600160a01b03168b6001600160a01b031614610a5b578686604051631859e3bb60e11b8152600401610744929190612980565b868660038b8b604051610a6f929190612947565b90815260200160405180910390209182610a8a929190612a35565b507ff214be33ffacf63cd5f2d1636bef433e47c400b94d565c786049bfa836c20e1989898989604051610ac09493929190612af4565b60405180910390a15050505050505050505050565b8787806001600160a01b0316826001600160a01b031614610b1c576040516316343f1760e31b81526001600160a01b03808316600483015283166024820152604401610744565b6002546040516301daf29b60e21b81523360048201526001600160a01b039091169063076bca6c9060240160006040518083038186803b158015610b5f57600080fd5b505afa158015610b73573d6000803e3d6000fd5b5050505060048686604051610b89929190612947565b90815260200160405180910390208054610ba2906128fa565b159050610bc65785856040516327ef3c3d60e01b8152600401610744929190612980565b610bde61092c60038a8a604051610890929190612947565b15610c0057858560405163a54e9cfb60e01b8152600401610744929190612980565b6000610cb6610a1d60038b8b604051610c1a929190612947565b90815260200160405180910390208054610c33906128fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5f906128fa565b8015610cac5780601f10610c8157610100808354040283529160200191610cac565b820191906000526020600020905b815481529060010190602001808311610c8f57829003601f168201915b5050505050610eaa565b9050806001600160a01b03168b6001600160a01b031614610cfd576040516316343f1760e31b81526001600160a01b03808d16600483015282166024820152604401610744565b610d84610d3f8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e8e92505050565b610d7e89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e8e92505050565b9061102e565b610da95786868a8a60405163998f70a160e01b81526004016107449493929190612af4565b848460048989604051610dbd929190612947565b90815260200160405180910390209182610dd8929190612a35565b507f87526cc0385862de920bf8b05560b5c9eb58f8af45be9f917801198166655f8887878787604051610ac09493929190612af4565b610e16611041565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610e418261108a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e865761078882826110ef565b61020c611165565b6000610e9982611184565b92915050565b6060610e9982611198565b60408051808201909152606080825260208201526000610ec983610e8e565b90506000610eef604051806040016040528060018152602001601d60f91b815250610e8e565b9050600080610efe84846114be565b955092509050801580610f3c5750610f3a610f3360405180604001604052806003815260200162191a5960ea1b815250610e8e565b839061150c565b155b15610f5c5785604051631859e3bb60e11b8152600401610744919061261f565b610f6684846114be565b95509250905080610f8c5785604051631859e3bb60e11b8152600401610744919061261f565b6040805180820190915260608082526020820152610fa983611518565b81526040805180820190915260018152601d60f91b6020820152610fd790610fd090610e8e565b8690611523565b9450610fe69150849050611518565b60208201529695505050505050565b60006016611001835190565b0361100e57506000919050565b60006110198361154d565b905061102481612b26565b60601c9392505050565b600061103a838361173f565b9392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661065e57604051631afcd79f60e31b815260040160405180910390fd5b806001600160a01b03163b6000036110c057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610744565b600080516020612c4f83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161110c9190612b59565b600060405180830381855af49150503d8060008114611147576040519150601f19603f3d011682016040523d82523d6000602084013e61114c565b606091505b509150915061115c858383611757565b95945050505050565b341561065e5760405163b398979f60e01b815260040160405180910390fd5b60008060208301905061103a8184516117b3565b80516060906031906000805b82811080156111cb5750838682815181106111c1576111c1612b75565b016020015160f81c145b156111dc57600191820191016111a4565b5060008080806117e361209f8702046001016002026001600160401b038111156112085761120861229b565b6040519080825280601f01601f191660200182016040528015611232576020820181803683370190505b5090506000600460038801046001600160401b038111156112555761125561229b565b60405190808252806020026020018201604052801561127e578160200160208202803683370190505b50905060005b8a5181101561137c5760008b82815181106112a1576112a1612b75565b602001015160f81c60f81b90506112d06040518060600160405280603a8152602001612c8f603a9139826117bf565b9096509450846112f5578b604051634cb9e47360e11b8152600401610744919061261f565b8251600019015b60008112611372578684828151811061131757611317612b75565b602002602001015163ffffffff16603a026001600160401b0316019750602088901c96508763ffffffff1684828151811061135457611354612b75565b63ffffffff90921660209283029190910190910152600019016112fc565b5050600101611284565b50600860038816026001600160401b038116600003611399575060205b600719016000805b8351811015611443575b6020836001600160401b0316101561143757826001600160401b03168482815181106113d9576113d9612b75565b602002602001015163ffffffff16901c60f81b8583815181106113fe576113fe612b75565b60200101906001600160f81b031916908160001a90535060019091019060086001600160401b03841610611437576008830392506113ab565b601892506001016113a1565b50875b84518110156114a157600060f81b85828151811061146657611466612b75565b01602001516001600160f81b031916111561149957611488858a830384611822565b9d9c50505050505050505050505050565b600101611446565b506114ae84600083611822565b9c9b505050505050505050505050565b60008080806114cd86866118d3565b905060001981036114e957600086600093509350935050611505565b6114fd86826001600160801b0388166119de565b935093509350505b9250925092565b600061103a8383611a4b565b6060610e9982611a95565b60008080806115328686611b0c565b905060001981036114e9576000808793509350935050611505565b6060600061155a83610e8e565b9050600061158160405180604001604052806002815260200161060f60f31b815250610e8e565b90506115b06115a960405180604001604052806002815260200161060f60f31b815250610e8e565b8390611bfe565b6115cb57505060408051602081019091526000815292915050565b6115dd6115d88383611c0a565b611518565b935060008490506000600282516115f49190612ba1565b6001600160401b0381111561160b5761160b61229b565b6040519080825280601f01601f191660200182016040528015611635576020820181803683370190505b50905060005b81518110156117355760008061167a85611656856002612bc3565b8151811061166657611666612b75565b01602001516001600160f81b031916611c16565b915091508061169f575050604080516020810190915260008152979650505050505050565b6000806116bc876116b1876002612bc3565b611656906001612bda565b91509150806116e35750506040805160208101909152600081529998505050505050505050565b816116ef856010612bed565b6116f99190612c09565b60f81b86868151811061170e5761170e612b75565b60200101906001600160f81b031916908160001a905350506001909301925061163b915050565b5095945050505050565b600060001961174e84846118d3565b14159392505050565b60608261176c5761176782611cfc565b61103a565b815115801561178357506001600160a01b0384163b155b156117ac57604051639996b31560e01b81526001600160a01b0385166004820152602401610744565b5092915050565b600061103a8383611d25565b60008060005b845181101561181257836001600160f81b0319168582815181106117eb576117eb612b75565b01602001516001600160f81b0319160361180a5791506001905061181b565b6001016117c5565b50600080915091505b9250929050565b606060008383036001600160401b038111156118405761184061229b565b6040519080825280601f01601f19166020018201604052801561186a576020820181803683370190505b50905060005b8484038110156118ca57858582018151811061188e5761188e612b75565b602001015160f81c60f81b8282815181106118ab576118ab612b75565b60200101906001600160f81b031916908160001a905350600101611870565b50949350505050565b60006001600160801b038381169083168083036118f557600092505050610e99565b81158061190157508181115b156119125760001992505050610e99565b600061191e8660801c90565b9050600061192c8660801c90565b9050600061193b825160001a90565b90505b600061194b848784611d31565b90506000198103611966576000199650505050505050610e99565b94859003949283019285851115611987576000199650505050505050610e99565b848320858520036119b35761199c8960801c90565b6119a69085612c22565b9650505050505050610e99565b856001036119cb576000199650505050505050610e99565b600019909501946001909301925061193e565b6000806000806119ee8760801c90565b90506001600160801b03871685870181811115611a1e576040516365f4e9df60e01b815260040160405180910390fd5b6001996001600160801b03988916608085811b919091179a50928290039098169201901b17949350505050565b60006001600160801b038381169083168114611a6b576000915050610e99565b611a8d611a788560801c90565b611a828560801c90565b839081902091201490565b949350505050565b60606001600160801b0382166001600160401b03811115611ab857611ab861229b565b6040519080825280601f01601f191660200182016040528015611ae2576020820181803683370190505b50905060208101611b0681611af78560801c90565b6001600160801b038616611df8565b50919050565b60006001600160801b03838116908316808303611b2e57600092505050610e99565b811580611b3a57508181115b15611b4b5760001992505050610e99565b6000611b578660801c90565b90506000611b658660801c90565b90506000611b7287611e06565b905060001984015b6000611b87858885611e4b565b90506000198103611ba357600019975050505050505050610e99565b80821115611bbc57600019975050505050505050610e99565b858420828203868101889020909103611bde579750610e999650505050505050565b8115611bec57509550611b7a565b60001998505050505050505050610e99565b600061103a8383611eff565b600061103a8383611f4c565b600080600360fc1b6001600160f81b0319841610801590611c455750603960f81b6001600160f81b0319841611155b15611c6357611c59603060f885901c612c35565b9360019350915050565b604160f81b6001600160f81b0319841610801590611c8f5750602360f91b6001600160f81b0319841611155b15611caf576041611ca560f885901c600a612c09565b611c599190612c35565b606160f81b6001600160f81b0319841610801590611cdb5750603360f91b6001600160f81b0319841611155b15611cf1576061611ca560f885901c600a612c09565b506000928392509050565b805115611d0c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600061103a8383611fa6565b600060208311611d4d57611d4684848461200c565b905061103a565b83601f8416808503820160ff8516600080516020612c6f833981519152025b81881015611dae5787518118611d818161211d565b15611da257848903611d958a60208a61200c565b019550505050505061103a565b60208901985050611d6c565b82600003611dc45760001994505050505061103a565b611dcf82848861200c565b94506000198503611de85760001994505050505061103a565b838203850194505050505061103a565b8083828460045afa50505050565b60006001600160801b038216808203611e32576040516365f4e9df60e01b815260040160405180910390fd5b61103a60018203611e438560801c90565b015160001a90565b600060208311611e6057611d46848484612168565b601f83168484018115611e98578190036000611e7d828487612168565b90506000198114611e96579086900301915061103a9050565b505b60ff8416600080516020612c6f833981519152025b86821115611ef157601f1990910180519091908118611ecb8161211d565b15611eeb57878303611edf84602089612168565b0194505050505061103a565b50611ead565b506000199695505050505050565b60006001600160801b0383811690831680821015611f2257600092505050610e99565b8481831115611f3857611f3586836121b1565b90505b611f428186611a4b565b9695505050505050565b60006001600160801b0383811690831681811115611f6e578492505050610e99565b600080611f7b87846121fc565b9092509050611f8a8287611a4b565b15611f9a579350610e9992505050565b86945050505050610e99565b60006001600160801b03831115611fd05760405163fee7506f60e01b815260040160405180910390fd5b6001600160801b03821115611ff857604051633b6b098d60e01b815260040160405180910390fd5b506001600160801b031660809190911b1790565b825160009081602085111561202057602094505b601285106120aa5760ff8416600080516020612c6f8339815191520282186120506001600160801b03821761211d565b6000036120865760109150601a8610612081576120756001600160401b03821761211d565b60000361208157601891505b6120a4565b6120986001600160c01b03821761211d565b6000036120a457600891505b506120e8565b600a85106120e85760ff8416600080516020612c6f8339815191520282186120da6001600160c01b03821761211d565b6000036120e657600891505b505b848110156121105781811a60ff851681036121075750915061103a9050565b506001016120e8565b5060001995945050505050565b7ffefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefeff81019019167f80808080808080808080808080808080808080808080808080808080808080801690565b6000602083111561217857602092505b83515b83156121a5576000199093019280841a60ff8416810361219f57849250505061103a565b5061217b565b50600019949350505050565b60006001600160801b038316808311156121de576040516365f4e9df60e01b815260040160405180910390fd5b611a8d6121eb8560801c90565b60801b6001600160801b0385161790565b600080600061220b8560801c90565b90506001600160801b03851680851115612238576040516365f4e9df60e01b815260040160405180910390fd5b608082901b6001600160801b038616176122726122558785612bda565b61225f8885612c22565b6001600160801b031660809190911b1790565b9350935050509250929050565b80356001600160a01b038116811461229657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156122cb576122cb61229b565b604051601f8501601f19908116603f011681019082821181831017156122f3576122f361229b565b8160405280935085815286868601111561230c57600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561233957600080fd5b6123428361227f565b915060208301356001600160401b0381111561235d57600080fd5b8301601f8101851361236e57600080fd5b61237d858235602084016122b1565b9150509250929050565b803560ff8116811461229657600080fd5b60008083601f8401126123aa57600080fd5b5081356001600160401b038111156123c157600080fd5b60208301915083602082850101111561181b57600080fd5b60008060008060008060008060008060006101008c8e0312156123fb57600080fd5b6124048c61227f565b9a5061241260208d01612387565b995060408c0135985060608c013597506001600160401b038060808e0135111561243b57600080fd5b61244b8e60808f01358f01612398565b909850965060a08d013581101561246157600080fd5b6124718e60a08f01358f01612398565b909650945060c08d0135935060e08d013581101561248e57600080fd5b5061249f8d60e08e01358e01612398565b81935080925050509295989b509295989b9093969950565b60008060008060008060008060008060e08b8d0312156124d657600080fd5b6124df8b61227f565b99506124ed60208c01612387565b985060408b0135975060608b0135965060808b01356001600160401b038082111561251757600080fd5b6125238e838f01612398565b909850965060a08d013591508082111561253c57600080fd5b6125488e838f01612398565b909650945060c08d013591508082111561256157600080fd5b5061256e8d828e01612398565b915080935050809150509295989b9194979a5092959850565b60006020828403121561259957600080fd5b81356001600160401b038111156125af57600080fd5b8201601f810184136125c057600080fd5b611a8d848235602084016122b1565b60005b838110156125ea5781810151838201526020016125d2565b50506000910152565b6000815180845261260b8160208601602086016125cf565b601f01601f19169290920160200192915050565b60208152600061103a60208301846125f3565b60008060008060008060008060a0898b03121561264e57600080fd5b6126578961227f565b975060208901356001600160401b038082111561267357600080fd5b61267f8c838d01612398565b909950975060408b013591508082111561269857600080fd5b6126a48c838d01612398565b909750955060608b0135945060808b01359150808211156126c457600080fd5b506126d18b828c01612398565b999c989b5096995094979396929594505050565b6000806000606084860312156126fa57600080fd5b6127038461227f565b92506127116020850161227f565b915061271f6040850161227f565b90509250925092565b60008060008060008060006080888a03121561274357600080fd5b61274c8861227f565b965060208801356001600160401b038082111561276857600080fd5b6127748b838c01612398565b909850965060408a013591508082111561278d57600080fd5b6127998b838c01612398565b909650945060608a01359150808211156127b257600080fd5b506127bf8a828b01612398565b989b979a50959850939692959293505050565b6001600160f81b03198c811682528b1660018201526001600160601b031960608b811b821660028401528a901b1660168201526f6372656174654469644d617070696e6760801b602a82015260008789603a840137878201603a8101600081528789823750868101905085603a8201528385605a83013760009301605a0192835250909b9a5050505050505050505050565b6001600160f81b03198b811682528a1660018201526001600160601b031960608a811b8216600284015289901b166016820152746372656174655265736f757263654d617070696e6760581b602a82015260008688603f840137868201603f81016000815286888237508581019050603f810160008152848682375060009301603f0192835250909a9950505050505050505050565b600181811c9082168061290e57607f821691505b602082108103611b0657634e487b7160e01b600052602260045260246000fd5b60006020828403121561294057600080fd5b5051919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611a8d602083018486612957565b805160208201516001600160801b031980821692919060108310156129c35780818460100360031b1b83161693505b505050919050565b83815260406020820152600061115c604083018486612957565b601f821115610788576000816000526020600020601f850160051c81016020861015612a0e5750805b601f850160051c820191505b81811015612a2d57828155600101612a1a565b505050505050565b6001600160401b03831115612a4c57612a4c61229b565b612a6083612a5a83546128fa565b836129e5565b6000601f841160018114612a945760008515612a7c5750838201355b600019600387901b1c1916600186901b1783556106bf565b600083815260209020601f19861690835b82811015612ac55786850135825560209485019460019092019101612aa5565b5086821015612ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b604081526000612b08604083018688612957565b8281036020840152612b1b818587612957565b979650505050505050565b805160208201516001600160601b031980821692919060148310156129c35760149290920360031b82901b161692915050565b60008251612b6b8184602087016125cf565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082612bbe57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610e9957610e99612b8b565b80820180821115610e9957610e99612b8b565b60ff81811683821602908116908181146117ac576117ac612b8b565b60ff8181168382160190811115610e9957610e99612b8b565b81810381811115610e9957610e99612b8b565b60ff8281168282160390811115610e9957610e99612b8b56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc010101010101010101010101010101010101010101010101010101010101010131323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa2646970667358221220d082e1f6555e53a96f9a2a79f9d1524aa10ace94483d7a38bb4ec41bad6454d364736f6c63430008170033" } } } diff --git a/smart_contracts/contracts/migration/LegacyMappingRegistry.sol b/smart_contracts/contracts/migration/LegacyMappingRegistry.sol index a0a299fb..6a308adf 100644 --- a/smart_contracts/contracts/migration/LegacyMappingRegistry.sol +++ b/smart_contracts/contracts/migration/LegacyMappingRegistry.sol @@ -78,7 +78,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr string calldata legacyIdentifier, string calldata newDid, bytes32 ed25519Key, - bytes calldata ed25518Signature + bytes calldata ed25519Signature ) public virtual { bytes32 hash = keccak256( abi.encodePacked( @@ -90,7 +90,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr legacyIdentifier, newDid, ed25519Key, - ed25518Signature + ed25519Signature ) ); _createDidMapping( @@ -99,7 +99,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr legacyIdentifier, newDid, ed25519Key, - ed25518Signature + ed25519Signature ); } @@ -150,7 +150,7 @@ contract LegacyMappingRegistry is LegacyMappingRegistryInterface, ControlledUpgr string calldata legacyIdentifier, string calldata newDid, bytes32 ed25519Key, - bytes calldata ed25518Signature + bytes calldata ed25519Signature ) internal _identityOwner(identity, actor) _senderIsTrusteeOrEndorserOrSteward { // Checks the uniqueness of the DID mapping if (!isEmpty(didMapping[legacyIdentifier].toSlice())) revert DidMappingAlreadyExist(legacyIdentifier); diff --git a/smart_contracts/test/migration/LegacyMappingRegistry.spec.ts b/smart_contracts/test/migration/LegacyMappingRegistry.spec.ts index 0bdb8ca7..5b58a510 100644 --- a/smart_contracts/test/migration/LegacyMappingRegistry.spec.ts +++ b/smart_contracts/test/migration/LegacyMappingRegistry.spec.ts @@ -63,7 +63,7 @@ describe('LegacyMappingRegistry', function () { ).to.be.revertedWithCustomError(legacyMappingRegistry.baseInstance, MigrationErrors.DidMappingAlreadyExist) }) - it('Should fail if DID mapping is being created with not matching ed25518 key', async function () { + it('Should fail if DID mapping is being created with not matching ed25519 key', async function () { const ed25519Key = Uint8Array.from([ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 180, 23, 224, 175, 15, 188, 235, 170, 233, 240, 145, 111, 204, 153, 108, 117, 188, 145, diff --git a/vdr/src/contracts/migration/types/did.rs b/vdr/src/contracts/migration/types/did.rs index 0cbb3068..325f847f 100644 --- a/vdr/src/contracts/migration/types/did.rs +++ b/vdr/src/contracts/migration/types/did.rs @@ -31,7 +31,7 @@ impl TryFrom<&LegacyDid> for ContractParam { } } -/// Wrapper structure for legacy ED25518 verification key +/// Wrapper structure for legacy ED25519 verification key #[derive(Debug, Default, Clone, PartialEq, Deserialize, Serialize)] pub struct LegacyVerkey(String); diff --git a/vdr/src/contracts/migration/types/ed25519_signature.rs b/vdr/src/contracts/migration/types/ed25519_signature.rs index 7ea701a9..81794c5c 100644 --- a/vdr/src/contracts/migration/types/ed25519_signature.rs +++ b/vdr/src/contracts/migration/types/ed25519_signature.rs @@ -1,6 +1,6 @@ use crate::{types::ContractParam, VdrError}; -/// Wrapper structure for ED25518 signature +/// Wrapper structure for ED25519 signature #[derive(Debug, Default)] pub struct Ed25519Signature(Vec); diff --git a/vdr/src/types/endorsing_data.rs b/vdr/src/types/endorsing_data.rs index 6741a750..991b059a 100644 --- a/vdr/src/types/endorsing_data.rs +++ b/vdr/src/types/endorsing_data.rs @@ -74,7 +74,7 @@ impl TransactionEndorsingData { }) } - /// Deserialize transaction endorsement data from JSOn string + /// Deserialize transaction endorsement data from JSON string #[logfn(Trace)] #[logfn_inputs(Trace)] pub fn from_string(value: &str) -> VdrResult { diff --git a/vdr/src/types/transaction.rs b/vdr/src/types/transaction.rs index 2a9896be..b18c5b9d 100644 --- a/vdr/src/types/transaction.rs +++ b/vdr/src/types/transaction.rs @@ -128,7 +128,7 @@ impl Transaction { }) } - /// Deserialize transaction from JSOn string + /// Deserialize transaction from JSON string #[logfn(Trace)] #[logfn_inputs(Trace)] pub fn from_string(value: &str) -> VdrResult { @@ -170,7 +170,7 @@ impl Transaction { .clone(); let signature = EthTransactionSignature::new( - signature.v().0 + 35 + self.chain_id * 2, + signature.v().0 + 35 + self.chain_id * 2, // `v` is calculated according to EIP-155: https://eips.ethereum.org/EIPS/eip-155 H256::from_slice(&signature.r().0), H256::from_slice(&signature.s().0), )