diff --git a/package-lock.json b/package-lock.json index b35e5d0..7f9167c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "eip-712": "^1.0.0", "env-cmd": "^10.1.0", "ethers": "^6.6.2", - "fhevmjs": "^0.3.2", + "fhevmjs": "^0.4.0", "gatsby": "^5.13.3", "gatsby-plugin-emotion": "^8.13.1", "gatsby-plugin-postcss": "^6.13.1", @@ -8243,6 +8243,18 @@ "node": "*" } }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -8251,6 +8263,14 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8536,6 +8556,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { "type": "github", @@ -13050,18 +13071,18 @@ } }, "node_modules/fhevmjs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.3.2.tgz", - "integrity": "sha512-/6D8uqlU3UYQRxyQJWxr6F6qjwe5pLvqeIZlp3YRilLytiFEoBQT5bwSbXzQ7UtY7VuTr82BfIUpNlSBItD5ww==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0.tgz", + "integrity": "sha512-4FEU9B8SYKeikuOycRQzexcTsu2vK89tIzyepIGhQ/d1LzMu84TmfLg5H688CoRUPVbVkRcsaVN13OwzJBKX/w==", "dependencies": { + "bigint-buffer": "^1.1.5", "commander": "^11.0.0", "crypto-js": "^4.1.1", "ethers": "^6.6.4", "libsodium": "^0.7.11", "libsodium-wrappers": "^0.7.11", - "node-tfhe": "^0.4.1", - "sha3": "^2.1.4", - "tfhe": "^0.4.1" + "node-tfhe": "^0.5.1", + "tfhe": "^0.5.1" }, "bin": { "fhevm": "bin/fhevm.js" @@ -13143,6 +13164,11 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", @@ -17877,9 +17903,9 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/node-tfhe": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.4.2.tgz", - "integrity": "sha512-fFUBRcOfvD5I4HpR8dN4OfdzQkPRi+Blug0sFXRMetMkcTdlmv6sM5Jf3qsKFvaUSIg3DTspG75rDVyrgvOgZA==" + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.5.4.tgz", + "integrity": "sha512-xRsaXLnOunYGukABGePv6iiL8PB4UnPszRq9y97PBbbCSPw2AWVEci+XxHrPmD550f0HDMtC+AcCHBUmlCHwtA==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -21122,14 +21148,6 @@ "sha.js": "bin.js" } }, - "node_modules/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "dependencies": { - "buffer": "6.0.3" - } - }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -22377,9 +22395,9 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/tfhe": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.4.2.tgz", - "integrity": "sha512-mf6LqRcClIJB5D6thrnDR73Zrq82QwFsmRros9RuFLIEm1S836CjrVuXrKq6Nmsm07ekh0peznscxMfshPykwA==" + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.5.4.tgz", + "integrity": "sha512-hw+H4qVdFHHoJQhx203vC5jIOuYG4TeGRyrj0kW90sNeyo2FgKQiNVvvVd8VkMNj3PALt78gYClUWIwHh9dcKg==" }, "node_modules/throttleit": { "version": "1.0.1", @@ -29912,11 +29930,27 @@ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, + "bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "requires": { + "bindings": "^1.3.0" + } + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -30152,6 +30186,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -33591,18 +33626,18 @@ } }, "fhevmjs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.3.2.tgz", - "integrity": "sha512-/6D8uqlU3UYQRxyQJWxr6F6qjwe5pLvqeIZlp3YRilLytiFEoBQT5bwSbXzQ7UtY7VuTr82BfIUpNlSBItD5ww==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0.tgz", + "integrity": "sha512-4FEU9B8SYKeikuOycRQzexcTsu2vK89tIzyepIGhQ/d1LzMu84TmfLg5H688CoRUPVbVkRcsaVN13OwzJBKX/w==", "requires": { + "bigint-buffer": "^1.1.5", "commander": "^11.0.0", "crypto-js": "^4.1.1", "ethers": "^6.6.4", "libsodium": "^0.7.11", "libsodium-wrappers": "^0.7.11", - "node-tfhe": "^0.4.1", - "sha3": "^2.1.4", - "tfhe": "^0.4.1" + "node-tfhe": "^0.5.1", + "tfhe": "^0.5.1" }, "dependencies": { "commander": { @@ -33654,6 +33689,11 @@ "token-types": "^4.1.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", @@ -37144,9 +37184,9 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node-tfhe": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.4.2.tgz", - "integrity": "sha512-fFUBRcOfvD5I4HpR8dN4OfdzQkPRi+Blug0sFXRMetMkcTdlmv6sM5Jf3qsKFvaUSIg3DTspG75rDVyrgvOgZA==" + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.5.4.tgz", + "integrity": "sha512-xRsaXLnOunYGukABGePv6iiL8PB4UnPszRq9y97PBbbCSPw2AWVEci+XxHrPmD550f0HDMtC+AcCHBUmlCHwtA==" }, "normalize-path": { "version": "3.0.0", @@ -39484,14 +39524,6 @@ "safe-buffer": "^5.0.1" } }, - "sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "requires": { - "buffer": "6.0.3" - } - }, "shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -40432,9 +40464,9 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "tfhe": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.4.2.tgz", - "integrity": "sha512-mf6LqRcClIJB5D6thrnDR73Zrq82QwFsmRros9RuFLIEm1S836CjrVuXrKq6Nmsm07ekh0peznscxMfshPykwA==" + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.5.4.tgz", + "integrity": "sha512-hw+H4qVdFHHoJQhx203vC5jIOuYG4TeGRyrj0kW90sNeyo2FgKQiNVvvVd8VkMNj3PALt78gYClUWIwHh9dcKg==" }, "throttleit": { "version": "1.0.1", diff --git a/package.json b/package.json index f090856..e4c8655 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eip-712": "^1.0.0", "env-cmd": "^10.1.0", "ethers": "^6.6.2", - "fhevmjs": "^0.3.2", + "fhevmjs": "^0.4.0", "gatsby": "^5.13.3", "gatsby-plugin-emotion": "^8.13.1", "gatsby-plugin-postcss": "^6.13.1", diff --git a/src/components/Bid/Bid.tsx b/src/components/Bid/Bid.tsx index dc0d9b2..306d597 100644 --- a/src/components/Bid/Bid.tsx +++ b/src/components/Bid/Bid.tsx @@ -13,7 +13,7 @@ import { TextField, } from '@mui/material'; import { Loader } from '../Loader'; -import { getInstance, getTokenSignature } from '../../wallet'; +import { getInstance, getPublicKeySignature } from '../../wallet'; export const Bid: React.FC<{ abi: any; @@ -39,7 +39,7 @@ export const Bid: React.FC<{ const getCurrentBid = async () => { try { const contractAddress = await contract.getAddress(); - const { publicKey, signature } = await getTokenSignature(contractAddress, account); + const { publicKey, signature } = await getPublicKeySignature(contractAddress, account); const encryptedBid = await contract.getBid(publicKey, signature); const bid = getInstance().decrypt(contractAddress, encryptedBid); console.log('get', account, bid); @@ -89,7 +89,7 @@ export const Bid: React.FC<{ } setLoading('Decrypting do I have highest bid...'); const contractAddress = await contract.getAddress(); - const { publicKey, signature } = await getTokenSignature(contractAddress, account); + const { publicKey, signature } = await getPublicKeySignature(contractAddress, account); const ciphertext = await contract.doIHaveHighestBid(publicKey, signature); const hb = getInstance().decrypt(contractAddress, ciphertext); setHighestBid(Boolean(hb)); diff --git a/src/components/EIP712/EIP712.tsx b/src/components/EIP712/EIP712.tsx index 7278753..47e78c4 100644 --- a/src/components/EIP712/EIP712.tsx +++ b/src/components/EIP712/EIP712.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Contract, BrowserProvider, isAddress } from 'ethers'; import { Button, Card, CardActions, CardContent, CardHeader } from '@mui/material'; import { Loader } from '../Loader'; -import { getTokenSignature } from '../../wallet'; +import { getPublicKeySignature } from '../../wallet'; export const EIP712: React.FC<{ account: string; @@ -32,7 +32,7 @@ export const EIP712: React.FC<{ const verifyToken = async () => { setVerified(false); - const { publicKey, signature } = await getTokenSignature(contractAddress, account); + const { publicKey, signature } = await getPublicKeySignature(contractAddress, account); await contract.verify(publicKey, signature); setVerified(true); setLoading(''); diff --git a/src/components/TokenBalance/TokenBalance.tsx b/src/components/TokenBalance/TokenBalance.tsx index 09e1bf4..bfefb2d 100644 --- a/src/components/TokenBalance/TokenBalance.tsx +++ b/src/components/TokenBalance/TokenBalance.tsx @@ -12,7 +12,7 @@ import { ListItemText, } from '@mui/material'; import { Loader } from '../Loader'; -import { getInstance, getTokenSignature } from '../../wallet'; +import { getInstance, getPublicKeySignature } from '../../wallet'; export const TokenBalance: React.FC<{ abi: any; @@ -45,7 +45,7 @@ export const TokenBalance: React.FC<{ try { const contractAddress = await contract.getAddress(); setLoading('Decrypting your balance...'); - const { publicKey, signature } = await getTokenSignature(contractAddress, account); + const { publicKey, signature } = await getPublicKeySignature(contractAddress, account); const ciphertext = await contract.balanceOf(account, publicKey, signature); const balance = await getInstance().decrypt(contractAddress, ciphertext); setDecryptedBalance(balance); diff --git a/src/components/TokenInfo/TokenInfo.tsx b/src/components/TokenInfo/TokenInfo.tsx index 866b8c6..81adca8 100644 --- a/src/components/TokenInfo/TokenInfo.tsx +++ b/src/components/TokenInfo/TokenInfo.tsx @@ -12,7 +12,6 @@ import { ListItemText, } from '@mui/material'; import { Loader } from '../Loader'; -import { getInstance, getTokenSignature } from '../../wallet'; const NO_SUPPLY = 'NO_SUPPLY'; const toHexString = (bytes: Uint8Array) => { diff --git a/src/components/TokenTransfer/TokenTransfer.tsx b/src/components/TokenTransfer/TokenTransfer.tsx index f65fdcd..700c646 100644 --- a/src/components/TokenTransfer/TokenTransfer.tsx +++ b/src/components/TokenTransfer/TokenTransfer.tsx @@ -30,7 +30,7 @@ export const TokenTransfer: React.FC<{ return; } setLoading(`Encrypting "${Number(amount)}" and generating ZK proof...`); - const encryptedAmount = await getInstance().encrypt32(Number(amount)); + const encryptedAmount = await getInstance().encrypt64(Number(amount)); setLoading('Sending transaction...'); const transaction = await contract['transfer(address,bytes)'](address, encryptedAmount); setLoading('Waiting for transaction validation...'); diff --git a/src/contracts/EncryptedERC20.json b/src/contracts/EncryptedERC20.json index 68a3871..349e3bf 100644 --- a/src/contracts/EncryptedERC20.json +++ b/src/contracts/EncryptedERC20.json @@ -120,9 +120,9 @@ }, { "indexed": false, - "internalType": "uint32", + "internalType": "uint64", "name": "amount", - "type": "uint32" + "type": "uint64" } ], "name": "Mint", @@ -258,7 +258,7 @@ "type": "address" }, { - "internalType": "euint32", + "internalType": "euint64", "name": "amount", "type": "uint256" } @@ -362,9 +362,9 @@ { "inputs": [ { - "internalType": "uint32", + "internalType": "uint64", "name": "mintedAmount", - "type": "uint32" + "type": "uint64" } ], "name": "mint", @@ -436,9 +436,9 @@ "name": "totalSupply", "outputs": [ { - "internalType": "uint32", + "internalType": "uint64", "name": "", - "type": "uint32" + "type": "uint64" } ], "stateMutability": "view", @@ -476,7 +476,7 @@ "type": "address" }, { - "internalType": "euint32", + "internalType": "euint64", "name": "amount", "type": "uint256" } @@ -505,7 +505,7 @@ "type": "address" }, { - "internalType": "euint32", + "internalType": "euint64", "name": "amount", "type": "uint256" } @@ -564,8 +564,8 @@ "type": "function" } ], - "bytecode": "0x61016060405234801562000011575f80fd5b50604051620020f4380380620020f4833981016040819052620000349162000345565b604080518082018252601381527f417574686f72697a6174696f6e20746f6b656e00000000000000000000000000602080830191909152825180840190935260018352603160f81b9083015233916200008e825f62000196565b610120526200009f81600162000196565b61014052815160208084019190912060e052815190820120610100524660a0526200012c60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166200016457604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6200016f81620001ce565b5060046200017e838262000435565b5060056200018d828262000435565b50505062000559565b5f602083511015620001b557620001ad83620001ec565b9050620001c8565b81620001c2848262000435565b5060ff90505b92915050565b600380546001600160a01b0319169055620001e9816200022e565b50565b5f80829050601f8151111562000219578260405163305a27a960e01b81526004016200015b919062000501565b8051620002268262000535565b179392505050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b5f5b83811015620002af57818101518382015260200162000295565b50505f910152565b5f82601f830112620002c7575f80fd5b81516001600160401b0380821115620002e457620002e46200027f565b604051601f8301601f19908116603f011681019082821181831017156200030f576200030f6200027f565b8160405283815286602085880101111562000328575f80fd5b6200033b84602083016020890162000293565b9695505050505050565b5f806040838503121562000357575f80fd5b82516001600160401b03808211156200036e575f80fd5b6200037c86838701620002b7565b9350602085015191508082111562000392575f80fd5b50620003a185828601620002b7565b9150509250929050565b600181811c90821680620003c057607f821691505b602082108103620003df57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200043057805f5260205f20601f840160051c810160208510156200040c5750805b601f840160051c820191505b818110156200042d575f815560010162000418565b50505b505050565b81516001600160401b038111156200045157620004516200027f565b6200046981620004628454620003ab565b84620003e5565b602080601f8311600181146200049f575f8415620004875750858301515b5f19600386901b1c1916600185901b178555620004f9565b5f85815260208120601f198616915b82811015620004cf57888601518255948401946001909101908401620004ae565b5085821015620004ed57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f82518060208401526200052181604085016020870162000293565b601f01601f19169190910160400192915050565b80516020808301519190811015620003df575f1960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051611b49620005ab5f395f610cf601525f610cc501525f610f1801525f610ef001525f610e4b01525f610e7501525f610e9f0152611b495ff3fe608060405234801561000f575f80fd5b5060043610610149575f3560e01c80636934c747116100c757806395d89b411161007d578063a9059cbb11610063578063a9059cbb146102a7578063e30c3978146102ba578063f2fde38b146102cb575f80fd5b806395d89b411461028c578063a71bbebe14610294575f80fd5b806379ba5097116100ad57806379ba50971461024457806384b0196e1461024c5780638da5cb5b14610267575f80fd5b80636934c74714610227578063715018a61461023a575f80fd5b806323b872dd1161011c578063313ce56711610102578063313ce567146101e857806332cbfb07146102015780634997266314610214575f80fd5b806323b872dd146101c257806329723511146101d5575f80fd5b8063014647f41461014d57806306fdde0314610175578063095ea7b31461018a57806318160ddd1461019d575b5f80fd5b61016061015b3660046116e3565b6102de565b60405190151581526020015b60405180910390f35b61017d61032e565b60405161016c919061177f565b610160610198366004611791565b6103be565b600354600160a01b900463ffffffff1660405163ffffffff909116815260200161016c565b6101606101d03660046117b9565b61041b565b6101606101e33660046116e3565b610443565b6101ef5f81565b60405160ff909116815260200161016c565b61017d61020f3660046117f2565b610486565b61016061022236600461185c565b6105ed565b61017d6102353660046118b9565b610631565b610242610790565b005b6102426107a3565b6102546107e7565b60405161016c97969594939291906118f7565b6002546001600160a01b03165b6040516001600160a01b03909116815260200161016c565b61017d610829565b6102426102a236600461198e565b610838565b6101606102b5366004611791565b610945565b6003546001600160a01b0316610274565b6102426102d93660046119b1565b610979565b5f6103218461019885858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b50600190505b9392505050565b60606004805461033d906119ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610369906119ca565b80156103b45780601f1061038b576101008083540402835291602001916103b4565b820191905f5260205f20905b81548152906001019060200180831161039757829003601f168201915b5050505050905090565b335f8181526007602090815260408083206001600160a01b03871680855292528083208590555191929182907ff37f546c25e850257cc0c94f92bec94a17e2f0e884ddda268a25d8144b70eb6a908590a360019150505b92915050565b5f3381610429868386610a03565b905061043786868684610aa1565b50600195945050505050565b5f610321846102b585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce6020820152908101879052909350610513925060600190505b60405160208183030381529060405280519060200120610b67565b90505f6105208284610b93565b90506001600160a01b03811633146105a55760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b038a163314806105c457506001600160a01b03891633145b6105cc575f80fd5b6105df6105d98b8b610bbb565b89610c22565b9a9950505050505050505050565b5f61043785856101d086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce60208201529081018790529093506106a7925060600190506104f8565b90505f6106b48284610b93565b90506001600160a01b03811633146107345760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d61746368000000000000000000000000000000606482015260840161059c565b336001600160a01b038a160361076e576001600160a01b0389165f90815260066020526040812054610767918a90610c2e565b9450610784565b61078161077a5f610c5f565b895f610c2e565b94505b50505050949350505050565b610798610c6b565b6107a15f610c98565b565b60035433906001600160a01b031681146107db5760405163118cdaa760e01b81526001600160a01b038216600482015260240161059c565b6107e481610c98565b50565b5f6060805f805f60606107f8610cbe565b610800610cef565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606005805461033d906119ca565b610840610c6b565b61087e60065f6108586002546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020015f205482610d1c565b60065f6108936002546001600160a01b031690565b6001600160a01b0316815260208101919091526040015f20556003546108c7908290600160a01b900463ffffffff16611a16565b600380547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff93841602179055600254604080519284168352516001600160a01b03909116917f3e5818968bcdc7c820f0f44b24095a2e03c5411ad461dcb4f3528629389b0f8c919081900360200190a250565b335f908152600660205260408120548190610961908490610d40565b905061096f33858584610aa1565b5060019392505050565b610981610c6b565b600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556109bf6002546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f610415826002610d77565b5f80610a0f8585610bbb565b90505f610a1c8483610d40565b6001600160a01b0387165f9081526006602052604081205491925090610a43908690610d40565b90505f610a508284610e0a565b9050610a968888610a6b84610a65898c610e1d565b89610e28565b6001600160a01b039283165f9081526007602090815260408083209490951682529290925291902055565b979650505050505050565b6001600160a01b0383165f90815260066020526040812054610ad891610ad39084908690610ace90610c5f565b610e28565b610e34565b6001600160a01b038085165f9081526006602052604080822093909355908616815290812054610b1891610b139084908690610ace90610c5f565b610e1d565b6001600160a01b038086165f818152600660205260408082209490945592519186169290917f4853ae1b4d437c4255ac16cd3ceda3465975023f27cb141584cd9d44440fed829190a350505050565b5f610415610b73610e3f565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f80610ba18686610f68565b925092509250610bb18282610fb1565b5090949350505050565b6001600160a01b038281165f90815260076020908152604080832093851683529290529081205415610c1257506001600160a01b038083165f90815260076020908152604080832093851683529290522054610415565b610c1b5f610c5f565b9050610415565b6060610327838361106d565b60608315610c4757610c40848461106d565b9050610327565b610c40610c598363ffffffff16610c5f565b8461106d565b5f6104158260026110d8565b6002546001600160a01b031633146107a15760405163118cdaa760e01b815233600482015260240161059c565b6003805473ffffffffffffffffffffffffffffffffffffffff191690556107e48161114e565b6060610cea7f00000000000000000000000000000000000000000000000000000000000000005f6111ac565b905090565b6060610cea7f000000000000000000000000000000000000000000000000000000000000000060016111ac565b5f82610d2e57610d2b5f610c5f565b92505b610327838363ffffffff16600161124e565b5f82610d5257610d4f5f610c5f565b92505b81610d6357610d605f610c5f565b91505b610327610d7184845f6112e4565b5f611336565b5f80838360f81b604051602001610d8f929190611a46565b60408051601f1981840301815290829052630964a5d960e31b82529150605d90634b252ec890610dc390849060040161177f565b602060405180830381865afa158015610dde573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e029190611a74565b949350505050565b5f610327610e188484611371565b61139e565b5f61032783836113a9565b5f610e028484846113d7565b5f6103278383611422565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e9757507f000000000000000000000000000000000000000000000000000000000000000046145b15610ec157507f000000000000000000000000000000000000000000000000000000000000000090565b610cea604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f805f8351604103610f9f576020840151604085015160608601515f1a610f9188828585611450565b955095509550505050610faa565b505081515f91506002905b9250925092565b5f826003811115610fc457610fc4611a8b565b03610fcd575050565b6001826003811115610fe157610fe1611a8b565b03610fff5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561101357611013611a8b565b036110345760405163fce698f760e01b81526004810182905260240161059c565b600382600381111561104857611048611a8b565b03611069576040516335e2f38360e21b81526004810182905260240161059c565b5050565b60405163d6ad57cd60e01b81526004810183905260248101829052606090605d9063d6ad57cd906044015f60405180830381865afa1580156110b1573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103279190810190611a9f565b604051631ce2e8d760e31b8152600481018390526001600160f81b031960f883901b1660248201525f90605d9063e71746b8906044015b602060405180830381865afa15801561112a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103279190611a74565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606060ff83146111bf57610c1b83611518565b8180546111cb906119ca565b80601f01602080910402602001604051908101604052809291908181526020018280546111f7906119ca565b80156112425780601f1061121957610100808354040283529160200191611242565b820191905f5260205f20905b81548152906001019060200180831161122557829003601f168201915b50505050509050610415565b5f8082156112615750600160f81b611264565b505f5b60405163f953e42760e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063f953e427906064015b602060405180830381865afa1580156112b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112db9190611a74565b95945050505050565b5f8082156112f75750600160f81b6112fa565b505f5b6040516334a6d7b960e11b815260048101869052602481018590526001600160f81b031982166044820152605d9063694daf729060640161129c565b60405163025f346960e51b8152600481018390526001600160f81b031960f883901b1660248201525f90605d90634be68d209060440161110f565b5f82611383576113805f611555565b92505b81611394576113915f611555565b91505b6103278383611560565b5f610415825f611597565b5f826113bb576113b85f610c5f565b92505b816113cc576113c95f610c5f565b91505b61032783835f6115b8565b60405163cb3b940760e01b81526004810184905260248101839052604481018290525f90605d9063cb3b940790606401602060405180830381865afa158015610dde573d5f803e3d5ffd5b5f82611434576114315f610c5f565b92505b81611445576114425f610c5f565b91505b61032783835f61124e565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561148957505f9150600390508261150e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156114da573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661150557505f92506001915082905061150e565b92505f91508190505b9450945094915050565b60605f6115248361160a565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f610415825f6110d8565b604051630ccd46b160e31b815260048101839052602481018290525f60448201819052908190605d9063666a358890606401610dc3565b5f826115a9576115a65f611555565b92505b610327838360ff166001611631565b5f8082156115cb5750600160f81b6115ce565b505f5b604051638c14cc2160e01b815260048101869052602481018590526001600160f81b031982166044820152605d90638c14cc219060640161129c565b5f60ff8216601f81111561041557604051632cd44ac360e21b815260040160405180910390fd5b5f8082156116445750600160f81b611647565b505f5b604051631927108160e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063192710819060640161129c565b80356001600160a01b0381168114611699575f80fd5b919050565b5f8083601f8401126116ae575f80fd5b50813567ffffffffffffffff8111156116c5575f80fd5b6020830191508360208285010111156116dc575f80fd5b9250929050565b5f805f604084860312156116f5575f80fd5b6116fe84611683565b9250602084013567ffffffffffffffff811115611719575f80fd5b6117258682870161169e565b9497909650939450505050565b5f5b8381101561174c578181015183820152602001611734565b50505f910152565b5f815180845261176b816020860160208601611732565b601f01601f19169290920160200192915050565b602081525f6103276020830184611754565b5f80604083850312156117a2575f80fd5b6117ab83611683565b946020939093013593505050565b5f805f606084860312156117cb575f80fd5b6117d484611683565b92506117e260208501611683565b9150604084013590509250925092565b5f805f805f60808688031215611806575f80fd5b61180f86611683565b945061181d60208701611683565b935060408601359250606086013567ffffffffffffffff81111561183f575f80fd5b61184b8882890161169e565b969995985093965092949392505050565b5f805f806060858703121561186f575f80fd5b61187885611683565b935061188660208601611683565b9250604085013567ffffffffffffffff8111156118a1575f80fd5b6118ad8782880161169e565b95989497509550505050565b5f805f80606085870312156118cc575f80fd5b6118d585611683565b935060208501359250604085013567ffffffffffffffff8111156118a1575f80fd5b60ff60f81b881681525f602060e0602084015261191760e084018a611754565b8381036040850152611929818a611754565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b8181101561197c57835183529284019291840191600101611960565b50909c9b505050505050505050505050565b5f6020828403121561199e575f80fd5b813563ffffffff81168114610327575f80fd5b5f602082840312156119c1575f80fd5b61032782611683565b600181811c908216806119de57607f821691505b6020821081036119fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b63ffffffff818116838216019080821115611a3f57634e487b7160e01b5f52601160045260245ffd5b5092915050565b5f8351611a57818460208801611732565b6001600160f81b0319939093169190920190815260010192915050565b5f60208284031215611a84575f80fd5b5051919050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215611aaf575f80fd5b815167ffffffffffffffff80821115611ac6575f80fd5b818401915084601f830112611ad9575f80fd5b815181811115611aeb57611aeb611a02565b604051601f8201601f19908116603f01168101908382118183101715611b1357611b13611a02565b81604052828152876020848701011115611b2b575f80fd5b610a9683602083016020880161173256fea164736f6c6343000816000a", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610149575f3560e01c80636934c747116100c757806395d89b411161007d578063a9059cbb11610063578063a9059cbb146102a7578063e30c3978146102ba578063f2fde38b146102cb575f80fd5b806395d89b411461028c578063a71bbebe14610294575f80fd5b806379ba5097116100ad57806379ba50971461024457806384b0196e1461024c5780638da5cb5b14610267575f80fd5b80636934c74714610227578063715018a61461023a575f80fd5b806323b872dd1161011c578063313ce56711610102578063313ce567146101e857806332cbfb07146102015780634997266314610214575f80fd5b806323b872dd146101c257806329723511146101d5575f80fd5b8063014647f41461014d57806306fdde0314610175578063095ea7b31461018a57806318160ddd1461019d575b5f80fd5b61016061015b3660046116e3565b6102de565b60405190151581526020015b60405180910390f35b61017d61032e565b60405161016c919061177f565b610160610198366004611791565b6103be565b600354600160a01b900463ffffffff1660405163ffffffff909116815260200161016c565b6101606101d03660046117b9565b61041b565b6101606101e33660046116e3565b610443565b6101ef5f81565b60405160ff909116815260200161016c565b61017d61020f3660046117f2565b610486565b61016061022236600461185c565b6105ed565b61017d6102353660046118b9565b610631565b610242610790565b005b6102426107a3565b6102546107e7565b60405161016c97969594939291906118f7565b6002546001600160a01b03165b6040516001600160a01b03909116815260200161016c565b61017d610829565b6102426102a236600461198e565b610838565b6101606102b5366004611791565b610945565b6003546001600160a01b0316610274565b6102426102d93660046119b1565b610979565b5f6103218461019885858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b50600190505b9392505050565b60606004805461033d906119ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610369906119ca565b80156103b45780601f1061038b576101008083540402835291602001916103b4565b820191905f5260205f20905b81548152906001019060200180831161039757829003601f168201915b5050505050905090565b335f8181526007602090815260408083206001600160a01b03871680855292528083208590555191929182907ff37f546c25e850257cc0c94f92bec94a17e2f0e884ddda268a25d8144b70eb6a908590a360019150505b92915050565b5f3381610429868386610a03565b905061043786868684610aa1565b50600195945050505050565b5f610321846102b585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce6020820152908101879052909350610513925060600190505b60405160208183030381529060405280519060200120610b67565b90505f6105208284610b93565b90506001600160a01b03811633146105a55760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b038a163314806105c457506001600160a01b03891633145b6105cc575f80fd5b6105df6105d98b8b610bbb565b89610c22565b9a9950505050505050505050565b5f61043785856101d086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506109f792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce60208201529081018790529093506106a7925060600190506104f8565b90505f6106b48284610b93565b90506001600160a01b03811633146107345760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d61746368000000000000000000000000000000606482015260840161059c565b336001600160a01b038a160361076e576001600160a01b0389165f90815260066020526040812054610767918a90610c2e565b9450610784565b61078161077a5f610c5f565b895f610c2e565b94505b50505050949350505050565b610798610c6b565b6107a15f610c98565b565b60035433906001600160a01b031681146107db5760405163118cdaa760e01b81526001600160a01b038216600482015260240161059c565b6107e481610c98565b50565b5f6060805f805f60606107f8610cbe565b610800610cef565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606005805461033d906119ca565b610840610c6b565b61087e60065f6108586002546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020015f205482610d1c565b60065f6108936002546001600160a01b031690565b6001600160a01b0316815260208101919091526040015f20556003546108c7908290600160a01b900463ffffffff16611a16565b600380547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff93841602179055600254604080519284168352516001600160a01b03909116917f3e5818968bcdc7c820f0f44b24095a2e03c5411ad461dcb4f3528629389b0f8c919081900360200190a250565b335f908152600660205260408120548190610961908490610d40565b905061096f33858584610aa1565b5060019392505050565b610981610c6b565b600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556109bf6002546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f610415826002610d77565b5f80610a0f8585610bbb565b90505f610a1c8483610d40565b6001600160a01b0387165f9081526006602052604081205491925090610a43908690610d40565b90505f610a508284610e0a565b9050610a968888610a6b84610a65898c610e1d565b89610e28565b6001600160a01b039283165f9081526007602090815260408083209490951682529290925291902055565b979650505050505050565b6001600160a01b0383165f90815260066020526040812054610ad891610ad39084908690610ace90610c5f565b610e28565b610e34565b6001600160a01b038085165f9081526006602052604080822093909355908616815290812054610b1891610b139084908690610ace90610c5f565b610e1d565b6001600160a01b038086165f818152600660205260408082209490945592519186169290917f4853ae1b4d437c4255ac16cd3ceda3465975023f27cb141584cd9d44440fed829190a350505050565b5f610415610b73610e3f565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f80610ba18686610f68565b925092509250610bb18282610fb1565b5090949350505050565b6001600160a01b038281165f90815260076020908152604080832093851683529290529081205415610c1257506001600160a01b038083165f90815260076020908152604080832093851683529290522054610415565b610c1b5f610c5f565b9050610415565b6060610327838361106d565b60608315610c4757610c40848461106d565b9050610327565b610c40610c598363ffffffff16610c5f565b8461106d565b5f6104158260026110d8565b6002546001600160a01b031633146107a15760405163118cdaa760e01b815233600482015260240161059c565b6003805473ffffffffffffffffffffffffffffffffffffffff191690556107e48161114e565b6060610cea7f00000000000000000000000000000000000000000000000000000000000000005f6111ac565b905090565b6060610cea7f000000000000000000000000000000000000000000000000000000000000000060016111ac565b5f82610d2e57610d2b5f610c5f565b92505b610327838363ffffffff16600161124e565b5f82610d5257610d4f5f610c5f565b92505b81610d6357610d605f610c5f565b91505b610327610d7184845f6112e4565b5f611336565b5f80838360f81b604051602001610d8f929190611a46565b60408051601f1981840301815290829052630964a5d960e31b82529150605d90634b252ec890610dc390849060040161177f565b602060405180830381865afa158015610dde573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e029190611a74565b949350505050565b5f610327610e188484611371565b61139e565b5f61032783836113a9565b5f610e028484846113d7565b5f6103278383611422565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e9757507f000000000000000000000000000000000000000000000000000000000000000046145b15610ec157507f000000000000000000000000000000000000000000000000000000000000000090565b610cea604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f805f8351604103610f9f576020840151604085015160608601515f1a610f9188828585611450565b955095509550505050610faa565b505081515f91506002905b9250925092565b5f826003811115610fc457610fc4611a8b565b03610fcd575050565b6001826003811115610fe157610fe1611a8b565b03610fff5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561101357611013611a8b565b036110345760405163fce698f760e01b81526004810182905260240161059c565b600382600381111561104857611048611a8b565b03611069576040516335e2f38360e21b81526004810182905260240161059c565b5050565b60405163d6ad57cd60e01b81526004810183905260248101829052606090605d9063d6ad57cd906044015f60405180830381865afa1580156110b1573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103279190810190611a9f565b604051631ce2e8d760e31b8152600481018390526001600160f81b031960f883901b1660248201525f90605d9063e71746b8906044015b602060405180830381865afa15801561112a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103279190611a74565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606060ff83146111bf57610c1b83611518565b8180546111cb906119ca565b80601f01602080910402602001604051908101604052809291908181526020018280546111f7906119ca565b80156112425780601f1061121957610100808354040283529160200191611242565b820191905f5260205f20905b81548152906001019060200180831161122557829003601f168201915b50505050509050610415565b5f8082156112615750600160f81b611264565b505f5b60405163f953e42760e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063f953e427906064015b602060405180830381865afa1580156112b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112db9190611a74565b95945050505050565b5f8082156112f75750600160f81b6112fa565b505f5b6040516334a6d7b960e11b815260048101869052602481018590526001600160f81b031982166044820152605d9063694daf729060640161129c565b60405163025f346960e51b8152600481018390526001600160f81b031960f883901b1660248201525f90605d90634be68d209060440161110f565b5f82611383576113805f611555565b92505b81611394576113915f611555565b91505b6103278383611560565b5f610415825f611597565b5f826113bb576113b85f610c5f565b92505b816113cc576113c95f610c5f565b91505b61032783835f6115b8565b60405163cb3b940760e01b81526004810184905260248101839052604481018290525f90605d9063cb3b940790606401602060405180830381865afa158015610dde573d5f803e3d5ffd5b5f82611434576114315f610c5f565b92505b81611445576114425f610c5f565b91505b61032783835f61124e565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561148957505f9150600390508261150e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156114da573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661150557505f92506001915082905061150e565b92505f91508190505b9450945094915050565b60605f6115248361160a565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f610415825f6110d8565b604051630ccd46b160e31b815260048101839052602481018290525f60448201819052908190605d9063666a358890606401610dc3565b5f826115a9576115a65f611555565b92505b610327838360ff166001611631565b5f8082156115cb5750600160f81b6115ce565b505f5b604051638c14cc2160e01b815260048101869052602481018590526001600160f81b031982166044820152605d90638c14cc219060640161129c565b5f60ff8216601f81111561041557604051632cd44ac360e21b815260040160405180910390fd5b5f8082156116445750600160f81b611647565b505f5b604051631927108160e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063192710819060640161129c565b80356001600160a01b0381168114611699575f80fd5b919050565b5f8083601f8401126116ae575f80fd5b50813567ffffffffffffffff8111156116c5575f80fd5b6020830191508360208285010111156116dc575f80fd5b9250929050565b5f805f604084860312156116f5575f80fd5b6116fe84611683565b9250602084013567ffffffffffffffff811115611719575f80fd5b6117258682870161169e565b9497909650939450505050565b5f5b8381101561174c578181015183820152602001611734565b50505f910152565b5f815180845261176b816020860160208601611732565b601f01601f19169290920160200192915050565b602081525f6103276020830184611754565b5f80604083850312156117a2575f80fd5b6117ab83611683565b946020939093013593505050565b5f805f606084860312156117cb575f80fd5b6117d484611683565b92506117e260208501611683565b9150604084013590509250925092565b5f805f805f60808688031215611806575f80fd5b61180f86611683565b945061181d60208701611683565b935060408601359250606086013567ffffffffffffffff81111561183f575f80fd5b61184b8882890161169e565b969995985093965092949392505050565b5f805f806060858703121561186f575f80fd5b61187885611683565b935061188660208601611683565b9250604085013567ffffffffffffffff8111156118a1575f80fd5b6118ad8782880161169e565b95989497509550505050565b5f805f80606085870312156118cc575f80fd5b6118d585611683565b935060208501359250604085013567ffffffffffffffff8111156118a1575f80fd5b60ff60f81b881681525f602060e0602084015261191760e084018a611754565b8381036040850152611929818a611754565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b8181101561197c57835183529284019291840191600101611960565b50909c9b505050505050505050505050565b5f6020828403121561199e575f80fd5b813563ffffffff81168114610327575f80fd5b5f602082840312156119c1575f80fd5b61032782611683565b600181811c908216806119de57607f821691505b6020821081036119fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b63ffffffff818116838216019080821115611a3f57634e487b7160e01b5f52601160045260245ffd5b5092915050565b5f8351611a57818460208801611732565b6001600160f81b0319939093169190920190815260010192915050565b5f60208284031215611a84575f80fd5b5051919050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215611aaf575f80fd5b815167ffffffffffffffff80821115611ac6575f80fd5b818401915084601f830112611ad9575f80fd5b815181811115611aeb57611aeb611a02565b604051601f8201601f19908116603f01168101908382118183101715611b1357611b13611a02565b81604052828152876020848701011115611b2b575f80fd5b610a9683602083016020880161173256fea164736f6c6343000816000a", + "bytecode": "0x61016060405234801562000011575f80fd5b506040516200201138038062002011833981016040819052620000349162000345565b604080518082018252601381527f417574686f72697a6174696f6e20746f6b656e00000000000000000000000000602080830191909152825180840190935260018352603160f81b9083015233916200008e825f62000196565b610120526200009f81600162000196565b61014052815160208084019190912060e052815190820120610100524660a0526200012c60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166200016457604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6200016f81620001ce565b5060046200017e838262000435565b5060056200018d828262000435565b50505062000559565b5f602083511015620001b557620001ad83620001ec565b9050620001c8565b81620001c2848262000435565b5060ff90505b92915050565b600380546001600160a01b0319169055620001e9816200022e565b50565b5f80829050601f8151111562000219578260405163305a27a960e01b81526004016200015b919062000501565b8051620002268262000535565b179392505050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b5f5b83811015620002af57818101518382015260200162000295565b50505f910152565b5f82601f830112620002c7575f80fd5b81516001600160401b0380821115620002e457620002e46200027f565b604051601f8301601f19908116603f011681019082821181831017156200030f576200030f6200027f565b8160405283815286602085880101111562000328575f80fd5b6200033b84602083016020890162000293565b9695505050505050565b5f806040838503121562000357575f80fd5b82516001600160401b03808211156200036e575f80fd5b6200037c86838701620002b7565b9350602085015191508082111562000392575f80fd5b50620003a185828601620002b7565b9150509250929050565b600181811c90821680620003c057607f821691505b602082108103620003df57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200043057805f5260205f20601f840160051c810160208510156200040c5750805b601f840160051c820191505b818110156200042d575f815560010162000418565b50505b505050565b81516001600160401b038111156200045157620004516200027f565b6200046981620004628454620003ab565b84620003e5565b602080601f8311600181146200049f575f8415620004875750858301515b5f19600386901b1c1916600185901b178555620004f9565b5f85815260208120601f198616915b82811015620004cf57888601518255948401946001909101908401620004ae565b5085821015620004ed57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f82518060208401526200052181604085016020870162000293565b601f01601f19169190910160400192915050565b80516020808301519190811015620003df575f1960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051611a66620005ab5f395f610d0a01525f610cd901525f610f1f01525f610ef701525f610e5201525f610e7c01525f610ea60152611a665ff3fe608060405234801561000f575f80fd5b5060043610610149575f3560e01c80636934c747116100c757806395d89b411161007d578063e30c397811610063578063e30c3978146102af578063f2fde38b146102c0578063fb9d09c8146102d3575f80fd5b806395d89b4114610294578063a9059cbb1461029c575f80fd5b806379ba5097116100ad57806379ba50971461024c57806384b0196e146102545780638da5cb5b1461026f575f80fd5b80636934c7471461022f578063715018a614610242575f80fd5b806323b872dd1161011c578063313ce56711610102578063313ce567146101f057806332cbfb0714610209578063499726631461021c575f80fd5b806323b872dd146101ca57806329723511146101dd575f80fd5b8063014647f41461014d57806306fdde0314610175578063095ea7b31461018a57806318160ddd1461019d575b5f80fd5b61016061015b3660046115f8565b6102e6565b60405190151581526020015b60405180910390f35b61017d610336565b60405161016c9190611694565b6101606101983660046116a6565b6103c6565b600354600160a01b900467ffffffffffffffff1660405167ffffffffffffffff909116815260200161016c565b6101606101d83660046116ce565b610423565b6101606101eb3660046115f8565b61044b565b6101f75f81565b60405160ff909116815260200161016c565b61017d610217366004611707565b61048e565b61016061022a366004611771565b6105f5565b61017d61023d3660046117ce565b610639565b61024a610798565b005b61024a6107ab565b61025c6107ef565b60405161016c979695949392919061180c565b6002546001600160a01b03165b6040516001600160a01b03909116815260200161016c565b61017d610831565b6101606102aa3660046116a6565b610840565b6003546001600160a01b031661027c565b61024a6102ce3660046118a3565b610874565b61024a6102e13660046118bc565b6108f2565b5f6103298461019885858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b50600190505b9392505050565b606060048054610345906118e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610371906118e3565b80156103bc5780601f10610393576101008083540402835291602001916103bc565b820191905f5260205f20905b81548152906001019060200180831161039f57829003601f168201915b5050505050905090565b335f8181526007602090815260408083206001600160a01b03871680855292528083208590555191929182907ff37f546c25e850257cc0c94f92bec94a17e2f0e884ddda268a25d8144b70eb6a908590a360019150505b92915050565b5f3381610431868386610a13565b905061043f86868684610ab1565b50600195945050505050565b5f610329846102aa85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce602082015290810187905290935061051b925060600190505b60405160208183030381529060405280519060200120610b77565b90505f6105288284610ba3565b90506001600160a01b03811633146105ad5760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b038a163314806105cc57506001600160a01b03891633145b6105d4575f80fd5b6105e76105e18b8b610bcb565b89610c32565b9a9950505050505050505050565b5f61043f85856101d886868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce60208201529081018790529093506106af92506060019050610500565b90505f6106bc8284610ba3565b90506001600160a01b038116331461073c5760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084016105a4565b336001600160a01b038a1603610776576001600160a01b0389165f9081526006602052604081205461076f918a90610c3e565b945061078c565b6107896107825f610c73565b895f610c3e565b94505b50505050949350505050565b6107a0610c7f565b6107a95f610cac565b565b60035433906001600160a01b031681146107e35760405163118cdaa760e01b81526001600160a01b03821660048201526024016105a4565b6107ec81610cac565b50565b5f6060805f805f6060610800610cd2565b610808610d03565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b606060058054610345906118e3565b335f90815260066020526040812054819061085c908490610d30565b905061086a33858584610ab1565b5060019392505050565b61087c610c7f565b600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556108ba6002546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108fa610c7f565b61093860065f6109126002546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020015f205482610d5e565b60065f61094d6002546001600160a01b031690565b6001600160a01b0316815260208101919091526040015f2055600354610985908290600160a01b900467ffffffffffffffff1661192f565b600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff93841602179055600254604080519284168352516001600160a01b03909116917f9109de113672aaca72ede8bc906f7aafabee865311ac020fb15c71edf94a0a01919081900360200190a250565b5f61041d826005610d86565b5f80610a1f8585610bcb565b90505f610a2c8483610d30565b6001600160a01b0387165f9081526006602052604081205491925090610a53908690610d30565b90505f610a608284610e19565b9050610aa68888610a7b84610a75898c610e24565b89610e2f565b6001600160a01b039283165f9081526007602090815260408083209490951682529290925291902055565b979650505050505050565b6001600160a01b0383165f90815260066020526040812054610ae891610ae39084908690610ade90610c73565b610e2f565b610e3b565b6001600160a01b038085165f9081526006602052604080822093909355908616815290812054610b2891610b239084908690610ade90610c73565b610e24565b6001600160a01b038086165f818152600660205260408082209490945592519186169290917f4853ae1b4d437c4255ac16cd3ceda3465975023f27cb141584cd9d44440fed829190a350505050565b5f61041d610b83610e46565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f80610bb18686610f6f565b925092509250610bc18282610fb8565b5090949350505050565b6001600160a01b038281165f90815260076020908152604080832093851683529290529081205415610c2257506001600160a01b038083165f9081526007602090815260408083209385168352929052205461041d565b610c2b5f610c73565b905061041d565b606061032f8383611074565b60608315610c5757610c508484611074565b905061032f565b610c50610c6d8367ffffffffffffffff16610c73565b84611074565b5f61041d8260056110df565b6002546001600160a01b031633146107a95760405163118cdaa760e01b81523360048201526024016105a4565b6003805473ffffffffffffffffffffffffffffffffffffffff191690556107ec81611154565b6060610cfe7f00000000000000000000000000000000000000000000000000000000000000005f6111b2565b905090565b6060610cfe7f000000000000000000000000000000000000000000000000000000000000000060016111b2565b5f82610d4257610d3f5f610c73565b92505b81610d5357610d505f610c73565b91505b61032f83835f611254565b5f82610d7057610d6d5f610c73565b92505b61032f838367ffffffffffffffff1660016112ea565b5f80838360f81b604051602001610d9e929190611963565b60408051601f1981840301815290829052630964a5d960e31b82529150605d90634b252ec890610dd2908490600401611694565b602060405180830381865afa158015610ded573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e119190611991565b949350505050565b5f61032f838361133c565b5f61032f8383611373565b5f610e118484846113a1565b5f61032f83836113ec565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e9e57507f000000000000000000000000000000000000000000000000000000000000000046145b15610ec857507f000000000000000000000000000000000000000000000000000000000000000090565b610cfe604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f805f8351604103610fa6576020840151604085015160608601515f1a610f988882858561141a565b955095509550505050610fb1565b505081515f91506002905b9250925092565b5f826003811115610fcb57610fcb6119a8565b03610fd4575050565b6001826003811115610fe857610fe86119a8565b036110065760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561101a5761101a6119a8565b0361103b5760405163fce698f760e01b8152600481018290526024016105a4565b600382600381111561104f5761104f6119a8565b03611070576040516335e2f38360e21b8152600481018290526024016105a4565b5050565b60405163d6ad57cd60e01b81526004810183905260248101829052606090605d9063d6ad57cd906044015f60405180830381865afa1580156110b8573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261032f91908101906119bc565b604051631ce2e8d760e31b8152600481018390526001600160f81b031960f883901b1660248201525f90605d9063e71746b890604401602060405180830381865afa158015611130573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032f9190611991565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606060ff83146111c557610c2b836114e2565b8180546111d1906118e3565b80601f01602080910402602001604051908101604052809291908181526020018280546111fd906118e3565b80156112485780601f1061121f57610100808354040283529160200191611248565b820191905f5260205f20905b81548152906001019060200180831161122b57829003601f168201915b5050505050905061041d565b5f8082156112675750600160f81b61126a565b505f5b6040516334a6d7b960e11b815260048101869052602481018590526001600160f81b031982166044820152605d9063694daf72906064015b602060405180830381865afa1580156112bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e19190611991565b95945050505050565b5f8082156112fd5750600160f81b611300565b505f5b60405163f953e42760e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063f953e427906064016112a2565b604051630ccd46b160e31b815260048101839052602481018290525f60448201819052908190605d9063666a358890606401610dd2565b5f82611385576113825f610c73565b92505b81611396576113935f610c73565b91505b61032f83835f61151f565b60405163cb3b940760e01b81526004810184905260248101839052604481018290525f90605d9063cb3b940790606401602060405180830381865afa158015610ded573d5f803e3d5ffd5b5f826113fe576113fb5f610c73565b92505b8161140f5761140c5f610c73565b91505b61032f83835f6112ea565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561145357505f915060039050826114d8565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156114a4573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166114cf57505f9250600191508290506114d8565b92505f91508190505b9450945094915050565b60605f6114ee83611571565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f8082156115325750600160f81b611535565b505f5b604051638c14cc2160e01b815260048101869052602481018590526001600160f81b031982166044820152605d90638c14cc21906064016112a2565b5f60ff8216601f81111561041d57604051632cd44ac360e21b815260040160405180910390fd5b80356001600160a01b03811681146115ae575f80fd5b919050565b5f8083601f8401126115c3575f80fd5b50813567ffffffffffffffff8111156115da575f80fd5b6020830191508360208285010111156115f1575f80fd5b9250929050565b5f805f6040848603121561160a575f80fd5b61161384611598565b9250602084013567ffffffffffffffff81111561162e575f80fd5b61163a868287016115b3565b9497909650939450505050565b5f5b83811015611661578181015183820152602001611649565b50505f910152565b5f8151808452611680816020860160208601611647565b601f01601f19169290920160200192915050565b602081525f61032f6020830184611669565b5f80604083850312156116b7575f80fd5b6116c083611598565b946020939093013593505050565b5f805f606084860312156116e0575f80fd5b6116e984611598565b92506116f760208501611598565b9150604084013590509250925092565b5f805f805f6080868803121561171b575f80fd5b61172486611598565b945061173260208701611598565b935060408601359250606086013567ffffffffffffffff811115611754575f80fd5b611760888289016115b3565b969995985093965092949392505050565b5f805f8060608587031215611784575f80fd5b61178d85611598565b935061179b60208601611598565b9250604085013567ffffffffffffffff8111156117b6575f80fd5b6117c2878288016115b3565b95989497509550505050565b5f805f80606085870312156117e1575f80fd5b6117ea85611598565b935060208501359250604085013567ffffffffffffffff8111156117b6575f80fd5b60ff60f81b881681525f602060e0602084015261182c60e084018a611669565b838103604085015261183e818a611669565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b8181101561189157835183529284019291840191600101611875565b50909c9b505050505050505050505050565b5f602082840312156118b3575f80fd5b61032f82611598565b5f602082840312156118cc575f80fd5b813567ffffffffffffffff8116811461032f575f80fd5b600181811c908216806118f757607f821691505b60208210810361191557634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff81811683821601908082111561195c57634e487b7160e01b5f52601160045260245ffd5b5092915050565b5f8351611974818460208801611647565b6001600160f81b0319939093169190920190815260010192915050565b5f602082840312156119a1575f80fd5b5051919050565b634e487b7160e01b5f52602160045260245ffd5b5f602082840312156119cc575f80fd5b815167ffffffffffffffff808211156119e3575f80fd5b818401915084601f8301126119f6575f80fd5b815181811115611a0857611a0861191b565b604051601f8201601f19908116603f01168101908382118183101715611a3057611a3061191b565b81604052828152876020848701011115611a48575f80fd5b610aa683602083016020880161164756fea164736f6c6343000816000a", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610149575f3560e01c80636934c747116100c757806395d89b411161007d578063e30c397811610063578063e30c3978146102af578063f2fde38b146102c0578063fb9d09c8146102d3575f80fd5b806395d89b4114610294578063a9059cbb1461029c575f80fd5b806379ba5097116100ad57806379ba50971461024c57806384b0196e146102545780638da5cb5b1461026f575f80fd5b80636934c7471461022f578063715018a614610242575f80fd5b806323b872dd1161011c578063313ce56711610102578063313ce567146101f057806332cbfb0714610209578063499726631461021c575f80fd5b806323b872dd146101ca57806329723511146101dd575f80fd5b8063014647f41461014d57806306fdde0314610175578063095ea7b31461018a57806318160ddd1461019d575b5f80fd5b61016061015b3660046115f8565b6102e6565b60405190151581526020015b60405180910390f35b61017d610336565b60405161016c9190611694565b6101606101983660046116a6565b6103c6565b600354600160a01b900467ffffffffffffffff1660405167ffffffffffffffff909116815260200161016c565b6101606101d83660046116ce565b610423565b6101606101eb3660046115f8565b61044b565b6101f75f81565b60405160ff909116815260200161016c565b61017d610217366004611707565b61048e565b61016061022a366004611771565b6105f5565b61017d61023d3660046117ce565b610639565b61024a610798565b005b61024a6107ab565b61025c6107ef565b60405161016c979695949392919061180c565b6002546001600160a01b03165b6040516001600160a01b03909116815260200161016c565b61017d610831565b6101606102aa3660046116a6565b610840565b6003546001600160a01b031661027c565b61024a6102ce3660046118a3565b610874565b61024a6102e13660046118bc565b6108f2565b5f6103298461019885858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b50600190505b9392505050565b606060048054610345906118e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610371906118e3565b80156103bc5780601f10610393576101008083540402835291602001916103bc565b820191905f5260205f20905b81548152906001019060200180831161039f57829003601f168201915b5050505050905090565b335f8181526007602090815260408083206001600160a01b03871680855292528083208590555191929182907ff37f546c25e850257cc0c94f92bec94a17e2f0e884ddda268a25d8144b70eb6a908590a360019150505b92915050565b5f3381610431868386610a13565b905061043f86868684610ab1565b50600195945050505050565b5f610329846102aa85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce602082015290810187905290935061051b925060600190505b60405160208183030381529060405280519060200120610b77565b90505f6105288284610ba3565b90506001600160a01b03811633146105ad5760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b038a163314806105cc57506001600160a01b03891633145b6105d4575f80fd5b6105e76105e18b8b610bcb565b89610c32565b9a9950505050505050505050565b5f61043f85856101d886868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610a0792505050565b60608383838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250604080517f051d137ae0e1fae6e3b6559fed4442b35a85a9a39789838ad5c9ea05e7da2dce60208201529081018790529093506106af92506060019050610500565b90505f6106bc8284610ba3565b90506001600160a01b038116331461073c5760405162461bcd60e51b815260206004820152603160248201527f454950373132207369676e657220616e64207472616e73616374696f6e20736960448201527f676e657220646f206e6f74206d6174636800000000000000000000000000000060648201526084016105a4565b336001600160a01b038a1603610776576001600160a01b0389165f9081526006602052604081205461076f918a90610c3e565b945061078c565b6107896107825f610c73565b895f610c3e565b94505b50505050949350505050565b6107a0610c7f565b6107a95f610cac565b565b60035433906001600160a01b031681146107e35760405163118cdaa760e01b81526001600160a01b03821660048201526024016105a4565b6107ec81610cac565b50565b5f6060805f805f6060610800610cd2565b610808610d03565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b606060058054610345906118e3565b335f90815260066020526040812054819061085c908490610d30565b905061086a33858584610ab1565b5060019392505050565b61087c610c7f565b600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556108ba6002546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108fa610c7f565b61093860065f6109126002546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020015f205482610d5e565b60065f61094d6002546001600160a01b031690565b6001600160a01b0316815260208101919091526040015f2055600354610985908290600160a01b900467ffffffffffffffff1661192f565b600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff93841602179055600254604080519284168352516001600160a01b03909116917f9109de113672aaca72ede8bc906f7aafabee865311ac020fb15c71edf94a0a01919081900360200190a250565b5f61041d826005610d86565b5f80610a1f8585610bcb565b90505f610a2c8483610d30565b6001600160a01b0387165f9081526006602052604081205491925090610a53908690610d30565b90505f610a608284610e19565b9050610aa68888610a7b84610a75898c610e24565b89610e2f565b6001600160a01b039283165f9081526007602090815260408083209490951682529290925291902055565b979650505050505050565b6001600160a01b0383165f90815260066020526040812054610ae891610ae39084908690610ade90610c73565b610e2f565b610e3b565b6001600160a01b038085165f9081526006602052604080822093909355908616815290812054610b2891610b239084908690610ade90610c73565b610e24565b6001600160a01b038086165f818152600660205260408082209490945592519186169290917f4853ae1b4d437c4255ac16cd3ceda3465975023f27cb141584cd9d44440fed829190a350505050565b5f61041d610b83610e46565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f80610bb18686610f6f565b925092509250610bc18282610fb8565b5090949350505050565b6001600160a01b038281165f90815260076020908152604080832093851683529290529081205415610c2257506001600160a01b038083165f9081526007602090815260408083209385168352929052205461041d565b610c2b5f610c73565b905061041d565b606061032f8383611074565b60608315610c5757610c508484611074565b905061032f565b610c50610c6d8367ffffffffffffffff16610c73565b84611074565b5f61041d8260056110df565b6002546001600160a01b031633146107a95760405163118cdaa760e01b81523360048201526024016105a4565b6003805473ffffffffffffffffffffffffffffffffffffffff191690556107ec81611154565b6060610cfe7f00000000000000000000000000000000000000000000000000000000000000005f6111b2565b905090565b6060610cfe7f000000000000000000000000000000000000000000000000000000000000000060016111b2565b5f82610d4257610d3f5f610c73565b92505b81610d5357610d505f610c73565b91505b61032f83835f611254565b5f82610d7057610d6d5f610c73565b92505b61032f838367ffffffffffffffff1660016112ea565b5f80838360f81b604051602001610d9e929190611963565b60408051601f1981840301815290829052630964a5d960e31b82529150605d90634b252ec890610dd2908490600401611694565b602060405180830381865afa158015610ded573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e119190611991565b949350505050565b5f61032f838361133c565b5f61032f8383611373565b5f610e118484846113a1565b5f61032f83836113ec565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e9e57507f000000000000000000000000000000000000000000000000000000000000000046145b15610ec857507f000000000000000000000000000000000000000000000000000000000000000090565b610cfe604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f805f8351604103610fa6576020840151604085015160608601515f1a610f988882858561141a565b955095509550505050610fb1565b505081515f91506002905b9250925092565b5f826003811115610fcb57610fcb6119a8565b03610fd4575050565b6001826003811115610fe857610fe86119a8565b036110065760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561101a5761101a6119a8565b0361103b5760405163fce698f760e01b8152600481018290526024016105a4565b600382600381111561104f5761104f6119a8565b03611070576040516335e2f38360e21b8152600481018290526024016105a4565b5050565b60405163d6ad57cd60e01b81526004810183905260248101829052606090605d9063d6ad57cd906044015f60405180830381865afa1580156110b8573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261032f91908101906119bc565b604051631ce2e8d760e31b8152600481018390526001600160f81b031960f883901b1660248201525f90605d9063e71746b890604401602060405180830381865afa158015611130573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032f9190611991565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606060ff83146111c557610c2b836114e2565b8180546111d1906118e3565b80601f01602080910402602001604051908101604052809291908181526020018280546111fd906118e3565b80156112485780601f1061121f57610100808354040283529160200191611248565b820191905f5260205f20905b81548152906001019060200180831161122b57829003601f168201915b5050505050905061041d565b5f8082156112675750600160f81b61126a565b505f5b6040516334a6d7b960e11b815260048101869052602481018590526001600160f81b031982166044820152605d9063694daf72906064015b602060405180830381865afa1580156112bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e19190611991565b95945050505050565b5f8082156112fd5750600160f81b611300565b505f5b60405163f953e42760e01b815260048101869052602481018590526001600160f81b031982166044820152605d9063f953e427906064016112a2565b604051630ccd46b160e31b815260048101839052602481018290525f60448201819052908190605d9063666a358890606401610dd2565b5f82611385576113825f610c73565b92505b81611396576113935f610c73565b91505b61032f83835f61151f565b60405163cb3b940760e01b81526004810184905260248101839052604481018290525f90605d9063cb3b940790606401602060405180830381865afa158015610ded573d5f803e3d5ffd5b5f826113fe576113fb5f610c73565b92505b8161140f5761140c5f610c73565b91505b61032f83835f6112ea565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561145357505f915060039050826114d8565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156114a4573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166114cf57505f9250600191508290506114d8565b92505f91508190505b9450945094915050565b60605f6114ee83611571565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f8082156115325750600160f81b611535565b505f5b604051638c14cc2160e01b815260048101869052602481018590526001600160f81b031982166044820152605d90638c14cc21906064016112a2565b5f60ff8216601f81111561041d57604051632cd44ac360e21b815260040160405180910390fd5b80356001600160a01b03811681146115ae575f80fd5b919050565b5f8083601f8401126115c3575f80fd5b50813567ffffffffffffffff8111156115da575f80fd5b6020830191508360208285010111156115f1575f80fd5b9250929050565b5f805f6040848603121561160a575f80fd5b61161384611598565b9250602084013567ffffffffffffffff81111561162e575f80fd5b61163a868287016115b3565b9497909650939450505050565b5f5b83811015611661578181015183820152602001611649565b50505f910152565b5f8151808452611680816020860160208601611647565b601f01601f19169290920160200192915050565b602081525f61032f6020830184611669565b5f80604083850312156116b7575f80fd5b6116c083611598565b946020939093013593505050565b5f805f606084860312156116e0575f80fd5b6116e984611598565b92506116f760208501611598565b9150604084013590509250925092565b5f805f805f6080868803121561171b575f80fd5b61172486611598565b945061173260208701611598565b935060408601359250606086013567ffffffffffffffff811115611754575f80fd5b611760888289016115b3565b969995985093965092949392505050565b5f805f8060608587031215611784575f80fd5b61178d85611598565b935061179b60208601611598565b9250604085013567ffffffffffffffff8111156117b6575f80fd5b6117c2878288016115b3565b95989497509550505050565b5f805f80606085870312156117e1575f80fd5b6117ea85611598565b935060208501359250604085013567ffffffffffffffff8111156117b6575f80fd5b60ff60f81b881681525f602060e0602084015261182c60e084018a611669565b838103604085015261183e818a611669565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b8181101561189157835183529284019291840191600101611875565b50909c9b505050505050505050505050565b5f602082840312156118b3575f80fd5b61032f82611598565b5f602082840312156118cc575f80fd5b813567ffffffffffffffff8116811461032f575f80fd5b600181811c908216806118f757607f821691505b60208210810361191557634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff81811683821601908082111561195c57634e487b7160e01b5f52601160045260245ffd5b5092915050565b5f8351611974818460208801611647565b6001600160f81b0319939093169190920190815260010192915050565b5f602082840312156119a1575f80fd5b5051919050565b634e487b7160e01b5f52602160045260245ffd5b5f602082840312156119cc575f80fd5b815167ffffffffffffffff808211156119e3575f80fd5b818401915084601f8301126119f6575f80fd5b815181811115611a0857611a0861191b565b604051601f8201601f19908116603f01168101908382118183101715611a3057611a3061191b565b81604052828152876020848701011115611a48575f80fd5b610aa683602083016020880161164756fea164736f6c6343000816000a", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/src/modules/private-bet/components/BetAction/BetAction.tsx b/src/modules/private-bet/components/BetAction/BetAction.tsx index 224d890..ad61f4d 100644 --- a/src/modules/private-bet/components/BetAction/BetAction.tsx +++ b/src/modules/private-bet/components/BetAction/BetAction.tsx @@ -15,7 +15,7 @@ import { TextField, } from '@mui/material'; import { Loader } from '../../../../components/Loader'; -import { getInstance, getTokenSignature } from '../../../../wallet'; +import { getInstance, getPublicKeySignature } from '../../../../wallet'; import { Game } from '../../types'; import { GAME_STATE } from '../../constants'; @@ -93,7 +93,7 @@ export const BetAction: React.FC<{ const getCurrentBet = async () => { try { const contractAddress = await contract.getAddress(); - const { publicKey, signature } = await getTokenSignature(contractAddress, account); + const { publicKey, signature } = await getPublicKeySignature(contractAddress, account); const response = await contract.getBet(gameId, publicKey, signature); const bet = response.toObject(); const betAmount = getInstance().decrypt(contractAddress, bet.amount); diff --git a/src/wallet/index.ts b/src/wallet/index.ts index 8181f0d..6c13a5d 100644 --- a/src/wallet/index.ts +++ b/src/wallet/index.ts @@ -16,9 +16,9 @@ export const getInstance = () => { return instance; }; -export const getTokenSignature = async (contractAddress: string, userAddress: string) => { +export const getPublicKeySignature = async (contractAddress: string, userAddress: string) => { if (getInstance().hasKeypair(contractAddress)) { - return getInstance().getTokenSignature(contractAddress)!; + return getInstance().getPublicKey(contractAddress)!; } else { const { publicKey, eip712 } = getInstance().generatePublicKey({ verifyingContract: contractAddress }); const params = [userAddress, JSON.stringify(eip712)];