diff --git a/README.md b/README.md index 7fc1d91..9b7c0c0 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,6 @@ DATABASE_DEFAULT_DATABASE = "zk_test"(数据库名字) ``` python manage.py runserver 0.0.0.0:5002 #启动django服务(如果python命令默认是python2,请使用python3命令) - ``` \ No newline at end of file + ``` + +sudo yum install python3-devel \ No newline at end of file diff --git a/commands/poseidon_deploy.py b/commands/poseidon_deploy.py new file mode 100644 index 0000000..b159a41 --- /dev/null +++ b/commands/poseidon_deploy.py @@ -0,0 +1,45 @@ +# Copyright (c) 2015-2020 Clearmatics Technologies Ltd +# +# SPDX-License-Identifier: LGPL-3.0+ +''' +from commands.utils import \ + open_web3_from_ctx, get_erc20_instance_description, load_eth_address, \ + write_mixer_description, MixerDescription +from zeth.mixer_client import MixerClient +from zeth.utils import EtherValue +''' + +from ethsnarks.poseidon import poseidon + +from contract.Poseidon import Poseidon +from python_web3.client.bcosclient import BcosClient + + +def deployPoseidon() : + """ + Deploy the zeth contracts and record the instantiation details. + """ + print("***********************") + + client = BcosClient() + abi = [{'constant': True, 'inputs': [{'name': 'input', 'type': 'uint256[]'}], 'name': 'poseidon', + 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', + 'type': 'function'}] + bin = "0x6120f4808038036000396000f37c01000000000000000000000000000000000000000000000000000000006000350463c4420fb4146200002e57fe5b7f2a605eab3c12c29701b9a8944a16ff3d64c199efa7c857c65e4c0560ab3b0ca16020527f25a8fb283934520d61862db42ab5fbbf21a13613f7e99cae00232a61959d468f60e0527f29f93e7ee3e09f10c2b577ab2056fa0b2694d164866d49122ce17818e2277ec16101a0527f2a101efc715f13fe15729e91c076536903f8718ffac65a04a1fff47e51ed0d6d610260527f23d3d70151df81f917113a847d8e61f4929b7edcc6ba0dfe6bd0116713834d61610320527f2185e429a96435c62e21e7091f4262685769e43fa49c9d40f88c41016c588ada6103e0527f1f5b500f1c0f88bcca0d51538b1a787ccd014eeb3831cecc5752dbb1a5732e756040527f063052928cdf6319a5cb946c2becbe0e4ebc9cc6244c9903a123707e595ebcad610100527f1321691a1c7edf2cdabb0bd4558d82ff697277299f7fec56406566faefd20d246101c0527f141194b8fa596f801dcbd27cd0a1fa45aa8d7a1db367e8f495dc906962b60750610280527f125bcfe7de4c761bea5cc5f06d853f39840c8648e0e321d5ab7dc779252d32a6610340527f1d583a5b54b566e83a38a7667d0a979327e66a3bf403f589b5f24c617d6f1aee610400527f140c27dca8225f48f74d55391032c02a2677a34a51cf8f329b6b1a0076a186316060527f057ccb8d91f4a1fa9e5039cf4f457e364f940cf575259be35c614030535293c6610120527f022588e3bcf16d2f9583ff188e2455e4d77e570a01366b13c3b0e9d1cd3dea276101e0527f0a8bef1519e2b7cc844b0714b71fe093a73334505b6b8e71d731aa1a6a63e9b26102a0527f2cb31f422481e106c8cf448eaa6b61fe07544eff879951baefb03cb91dbc1e3e610360527f14d180bf4c3bb4c109918b8bed15f0f781bfec0e0d63bed877c5ba8d21d78184610420527f2435feebb56e56c96b4d8a90637235e4f769cca19ee5cc0e1c84b4f74490cee36080527f249e9f24440c84e77026b8e111f2e6ca6d124556505b4e5bd5215983b445cbec610140527f2ae7c8d8341fc04509d31c5c3caf7b182cbadd6e89bd80e2a8dd438740a1400c610200527f0980e6aa5e105658acd1eddde95a92ffa1556f142a596b401f48395d47dc5a516102c0527f03c96fb68f083dfafb98c5e09181baf2f94dce618fbc78264bcc6ac102cd6f55610380527f11c3c8fdf6c7cfa26046d59ad05834c854f7f4324fe53f4abfbc9437b3d13082610440527f1cabef035d32194e6327ccafed62049f16340bd6522d0e0cfc04c1f3eb6cb8a460a0527f17250b02a83957b0d036d216114793fe53ef92d12ce1b91666546ac818e40c74610160527f25b1e032d89662f0666956c34f323c344278f370e4ca56409d7acc9098797797610220527f0f4461f42060b27d3b34a34d8a0a2d3d6a3d812f3756dcb19e5b04c689a83a5b6102e0527f1cbe64ac49aebf693279d246b2c8e257e99612512afdb30635f5b99ce579f92e6103a0527f2fd9287af078462bc14f7f1da959e7df7e9a1598b833d3e98cc3552456f8e985610460527f0809febd6b71b85af68e97b3a334b8240e138d95bdec10f96757b1972c74c70360c0527f075c1923454f6b1f87f00b238dbda2323e5ed5885a07d6681c8148aacbc32df8610180527f0af9bf6e54a040be1910bcab732d2a5451e356c9b0e54f196bc962bfa37a5784610240527f0a9346be53c2fa9f7907c52cbf7204de8c1c5dc8b90e2a800c6c1d290ae62c00610300527f2375201a368412e3c2046d85fae310971047afe12b973a429b097e44843eef636103c0527f2ccb8565240997047bef4989cf92c3d2017eb0fa368b135d2d2941c13ddcd324610480527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160e43560c43560a4356084356064356044357f1fd4a35e68f0946f8f5dfd2ac9d7882ce2466ec1c9766f69b5a14c3f84a17be2878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990508682818082800980090991508683818082800980090992508684818082800980090993508685818082800980090994508686818082800980090995506200062960005262001f94565b7f170118300987f2aa8128c6893a7691621b7dd210af7f412385f8d6663782490887818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050868281808280098009099150868381808280098009099250868481808280098009099350868581808280098009099450868681808280098009099550620006c460005262001f94565b7f0b734ac64dd2198297d67aab5b9f2dd61ae0a5e169692c8802760c97c1b7b0ed878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990508682818082800980090991508683818082800980090992508684818082800980090993508685818082800980090994508686818082800980090995506200075f60005262001f94565b7f1430e42a7b4242b4586f06e9885a444ea4920fac92e2dfbc3cc16ebc2bc3416787818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050868281808280098009099150868381808280098009099250868481808280098009099350868581808280098009099450868681808280098009099550620007fa60005262001f94565b7f2d03cefd44927bbfa58fb8a8f22a0686c99db6ea9673e5ae2e3f51016b4d7812878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200085960005262001f94565b7f27a60ef60d51be502cad8248a0f6ddc28f49ce9e174032bb1a054503691a99b387818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620008b860005262001f94565b7f080a061bb2bc9ebb8c05ecf71fc842c7a09a85d48f5147fdd3bafc8d63a61801878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200091760005262001f94565b7f0470cb196b0b31dcf0f998c08fd4a2d3784c84625d3d23cd9959c8df3d61a850878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200097660005262001f94565b7f236a18fd797bcde8ceefd41745367450d80ecaf8fa5da304af8dd07d6c9c4a2f87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620009d560005262001f94565b7f2da94346d74ec77c4e5f937d2d595070636e2fcdb9349ce0e2c789c9e9d41ae78781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000a3460005262001f94565b7f278c16574216dd6780c4233d2e8bc1f90a76442f4fed1678d91a38f26a169f1d8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000a9360005262001f94565b7f0aba88ce0a5f3f57c82b73cc72d86f0182a5ebbf61236cf2d67e3903428f105c8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000af260005262001f94565b7f13d45f17ebd7bd267612d1c7d028c3ef2380ee77838b1809039156e45ea399da8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000b5160005262001f94565b7f2d7a5202c14dd920b8382ce02653223d81eeeba9e2a27473af50810482e01dd78781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000bb060005262001f94565b7f245a0767c5b055812467f081108f7dfee5dcfc10f80079da8e941c77cc13db688781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000c0f60005262001f94565b7f2c59e967a2d4ea6770593f65039451741d23b5da99dc8042070a39907478b66e8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000c6e60005262001f94565b7f24c85e48d7afe1001e8f66c6dd31213b4288933a0ad379864f16743df2c980038781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000ccd60005262001f94565b7f227cd523af710c598ecab087c2843100f7a9738c3d488c007e428d91b1f337668781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000d2c60005262001f94565b7f2559fff5296c533ad4c7c6e1c88b9c69980b197513e317db5402d492799eeb9f8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000d8b60005262001f94565b7f02a601bfc4da9459e9718fe6b926c0e175e63aa2217abf643dc9e0757d7ef1548781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000dea60005262001f94565b7f0da58042d5874668e8e0f3a278dfc8c8b08ccfbf5b4257ed2832affb60cb41128781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000e4960005262001f94565b7f2e6fdd26eac7bf454187dee626ab4b3f421739e8318796503f16da5691f1bed98781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000ea860005262001f94565b7f21be0174899457628eb771a9505580d1e4ef36ffb502219a2f43351b18d2784e8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000f0760005262001f94565b7f2133b63278501b60e86883b00a54619ccf4a7cf07702dea240f53b19005f5a368781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000f6660005262001f94565b7f21841c731a220c4817edefba29768e949c0b519bb8e320fab91d0c18a102bc188781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000fc560005262001f94565b7f18b6901831fde10bda86893ae8cbd9f9da5af120dc44c89f5152926c28f2ed2f878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200102460005262001f94565b7f2ec53e23654ad18aca5c584b2eac05eb7d4db203b23ca6620ec475a8795d4202878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200108360005262001f94565b7f2c939494de2138a2ca5e19ce4b67cdffce49ed1107248aa5edb6e12c7d28df7787818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620010e260005262001f94565b7f0623ee7891199514435ad1ff285fb74fd43a7bb0dae62dbbdb36aff96e508972878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200114160005262001f94565b7f22c8292e61a9bddf3d205cb50a7a4d29b06c431e53ec8fbaad8a73dd4104c64a87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620011a060005262001f94565b7f0d51b55ec1f59f569076ecff66ba152b07679bc50dad6cd703b46b95e1cbd7e287818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620011ff60005262001f94565b7f27154bbfb0588b6f36300701b00213556cb869bb368c63d1ded2a8416e273c0d878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200125e60005262001f94565b7f17b1370ccffe479909b0c1f7dc671b344494342940019105b90562cc4228eb5c87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620012bd60005262001f94565b7f20ff783c31f906b9d0a4ae973600ee91e99e4565100c310065c27d0127059074878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200131c60005262001f94565b7f13c45ba44e91db74e719b45a15914640283f1db32e1a4304667bcf67230c615b878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200137b60005262001f94565b7f29cfab68a5620b3760e361caac37294ec856607f2729f2403af22ae485fe48ba87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620013da60005262001f94565b7f1380cf7791392e856692cd802e0820e89d319fe8b262dffb8abd00cc83d10f27878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200143960005262001f94565b7f2d9d9fdcac77dd461f1b159edc18eac9e53a01172733e042fe4ab39f76d4939b878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200149860005262001f94565b7e28701c995d998357f61aae3b02a6764caf807a024ba0478965be12256d62a087818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620014f660005262001f94565b7f06268de0019eb6197fd8b34ca05a250aa2215a169f66b89acc7c70bbbdd26591878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200155560005262001f94565b7f1b8191c81911bb23fd08d9f32c9cfc39d498d937c2cf2b4a286ce463f735e1b587818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620015b460005262001f94565b7f05a7f29c502bbc907f811b53e6901a4598539d0b2404c2c0f998bdc51d877216878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200161360005262001f94565b7f164d0f7cbcdfd7c008c3ad541f1eb04374cdce427af07abbd20abb3c5f47e322878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200167260005262001f94565b7f096f6dad4af11aef93cd170b131dc5ca907f1554edb860a2183b8f387bbfc49387818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620016d160005262001f94565b7f0aef194b2253cc03deb323029aa3d280cfc3bba70dbe35ebc76c4e5efb28f44c878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200173060005262001f94565b7f2739ce523e8ac7040f41978fcb09a61fc893f489a7ac63b7dc2b666a0450b8b7878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200178f60005262001f94565b7f0dda954b88b4662b7228ea53dfc0035cf1c3e54a3eff951ed20eddf50abd007087818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620017ee60005262001f94565b7f06013c9903173cc6bf78d659ddc7ddde597add8f66b4adf14fd0fdd2aea80b42878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200184d60005262001f94565b7f2a44a05caa05df06a56f318ae930c0f5b1238eff2cc641442940c42125e3b1d887818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620018ac60005262001f94565b7f14c09ffabca71eaed84af10167d78bb3e29f0bbbf2d4a7537e046b0b81a560c4878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200190b60005262001f94565b7f142aaa6de3cf63bb4172a80f539bf5ecd9a42802d39bce5d3728e9bcde35a55a878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200196a60005262001f94565b7f06cea3644ef4942b5b898426b6c4845162e327a2ba7660cf2dca68f1ea3ab82a87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620019c960005262001f94565b7f0fd2f28081191b6e436ee90785b22c924bc5936d6ff57c6e5d58f30a83dd46378781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001a2860005262001f94565b7f1f138e07b3bd619267c920f1b52bf311de510f7b04b7c6575bc19dac05286c858781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001a8760005262001f94565b7f1f3a2010c0091c2bf3cdd2834b1480186f4e474b4178af042d82122a69ee1b698781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001ae660005262001f94565b7f1a33927f88bde3319be2cc152435e2ca4b055462321224031404d350be0d03d48781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001b4560005262001f94565b7f15aa17ff60cb072ec045ab101d2eaf64a7ad4cb59493994b4354eef81e7841bf8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001ba460005262001f94565b7f16742ccf030b475a60958dc351e00eb04c088b74d90ba19cd0dc52ff1d8f71788781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001c0360005262001f94565b7f2c03e4f03286941a2ce351f9aad0db78cc42c0b4047849321162da82970b7bd58781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001c6260005262001f94565b7f1a03612ed3fe94958cf4f636e636b4742f8a967ef0d897fe140581ff2107ee4f8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001cc160005262001f94565b7f1852fd3c50e032d8cb1185165dd9f4c38d6a43094d5686e2eec4d8dbc62966178781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001d2060005262001f94565b7ea0d0c4017ec6d8e48c88026c5574218b85ca4bb416fe7dd5301f0cf4963a638781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001dba60005262001f94565b7f2aff97dafead01e68ee8bfcbdb0079f19483cb551634d05dcc52344a35695e608781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001e5560005262001f94565b7f1fe380a3a0814b5ec3bd91dfa1d95992cffdd77ec0341b95b8f6b3509d2670018781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001ef060005262001f94565b7f1783668830df79d79707da6a0e7c023c5f54a112be7ee3f7d49b420213ab7f648781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001f8b60005262001f94565b60005260206000f35b8660205182098760405184098891088760605185098891088760805186098891088760a05187098891088760c05188098891088760e05183098861010051850989910888610120518609899108886101405187098991088861016051880989910888610180518909899108886101a0518409896101c05186098a9108896101e05187098a9108896102005188098a9108896102205189098a910889610240518a098a9108896102605185098a6102805187098b91088a6102a05188098b91088a6102c05189098b91088a6102e0518a098b91088a610300518b098b91088a6103205186098b6103405188098c91088b6103605189098c91088b610380518a098c91088b6103a0518b098c91088b6103c0518c098c91088b6103e05187098c6104005189098d91088c610420518a098d91088c610440518b098d91088c610460518c098d91088c610480518d098d91089a509850965094509250905060005156" + + mixerTransactionRecipient = client.sendRawTransactionGetReceipt("", abi, None, None, bin) + poseidon_address = mixerTransactionRecipient['contractAddress'] + print(f"deploy: mixer_address={poseidon_address}") + inputs = [1, 2] + python_result = poseidon(inputs) + # print(python_result) + poseidonContract = Poseidon(poseidon_address) + contract_result = poseidonContract.poseidon(inputs) + # print(contract_result) + + return poseidon_address + + +if __name__ == '__main__': + deployPoseidon() + diff --git a/commands/zeth_deploy.py b/commands/zeth_deploy.py index 9161730..d9e4411 100644 --- a/commands/zeth_deploy.py +++ b/commands/zeth_deploy.py @@ -24,7 +24,8 @@ def deploy( - token_address: Optional[str] + token_address: Optional[str], + poseidon_address: Optional[str], ) : """ Deploy the zeth contracts and record the instantiation details. @@ -38,7 +39,8 @@ def deploy( print("Received VK, writing verification key...") write_verification_key(vk_json) verification_key_params = zksnark.verification_key_parameters(vk_json) - constructArgs = [5, to_checksum_address(token_address), verification_key_params['Alpha'], verification_key_params['Beta1'], verification_key_params['Beta2'], verification_key_params['Delta1'], verification_key_params['Delta2'], verification_key_params['ABC_coords']] + + constructArgs = [5, to_checksum_address(token_address), to_checksum_address(poseidon_address), verification_key_params['Alpha'], verification_key_params['Beta1'], verification_key_params['Beta2'], verification_key_params['Delta1'], verification_key_params['Delta2'], verification_key_params['ABC_coords']] si = Groth16Mixer("") ''' @@ -51,9 +53,9 @@ def deploy( f1.close() ''' - abi = [{'inputs': [{'internalType': 'uint256', 'name': 'mk_depth', 'type': 'uint256'}, {'internalType': 'address', 'name': 'token', 'type': 'address'}, {'internalType': 'uint256[2]', 'name': 'Alpha', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Beta1', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Beta2', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Delta1', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Delta2', 'type': 'uint256[2]'}, {'internalType': 'uint256[]', 'name': 'ABC_coords', 'type': 'uint256[]'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'string', 'name': 'message', 'type': 'string'}], 'name': 'LogDebug', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'bytes32', 'name': 'message', 'type': 'bytes32'}], 'name': 'LogDebug', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'uint256', 'name': 'mid', 'type': 'uint256'}, {'indexed': False, 'internalType': 'bytes32', 'name': 'root', 'type': 'bytes32'}, {'indexed': False, 'internalType': 'bytes32[2]', 'name': 'nullifiers', 'type': 'bytes32[2]'}, {'indexed': False, 'internalType': 'bytes32[2]', 'name': 'commitments', 'type': 'bytes32[2]'}, {'indexed': False, 'internalType': 'bytes[2]', 'name': 'ciphertexts', 'type': 'bytes[2]'}], 'name': 'LogMix', 'type': 'event'}, {'constant': True, 'inputs': [{'internalType': 'uint256[10]', 'name': 'primary_inputs', 'type': 'uint256[10]'}], 'name': 'assemble_hsig', 'outputs': [{'internalType': 'bytes32', 'name': 'hsig', 'type': 'bytes32'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [{'internalType': 'uint256', 'name': 'index', 'type': 'uint256'}, {'internalType': 'uint256[10]', 'name': 'primary_inputs', 'type': 'uint256[10]'}], 'name': 'assemble_nullifier', 'outputs': [{'internalType': 'bytes32', 'name': 'nf', 'type': 'bytes32'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [{'internalType': 'uint256[10]', 'name': 'primary_inputs', 'type': 'uint256[10]'}], 'name': 'assemble_public_values', 'outputs': [{'internalType': 'uint256', 'name': 'vpub_in', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'vpub_out', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [], 'name': 'get_constants', 'outputs': [{'internalType': 'uint256', 'name': 'js_in', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'js_out', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'num_inputs', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': False, 'inputs': [{'internalType': 'bytes32', 'name': 'commitment', 'type': 'bytes32'}], 'name': 'insert', 'outputs': [], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': True, 'inputs': [], 'name': 'mid', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'view', 'type': 'function'}, {'constant': False, 'inputs': [{'internalType': 'uint256[2]', 'name': 'a', 'type': 'uint256[2]'}, {'internalType': 'uint256[4]', 'name': 'b', 'type': 'uint256[4]'}, {'internalType': 'uint256[2]', 'name': 'c', 'type': 'uint256[2]'}, {'internalType': 'uint256[4]', 'name': 'vk', 'type': 'uint256[4]'}, {'internalType': 'uint256', 'name': 'sigma', 'type': 'uint256'}, {'internalType': 'uint256[10]', 'name': 'input', 'type': 'uint256[10]'}, {'internalType': 'bytes[2]', 'name': 'ciphertexts', 'type': 'bytes[2]'}], 'name': 'mix', 'outputs': [], 'payable': True, 'stateMutability': 'payable', 'type': 'function'}, {'constant': False, 'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'uint256', 'name': '', 'type': 'uint256'}, {'internalType': 'bytes', 'name': '', 'type': 'bytes'}], 'name': 'onBAC001Received', 'outputs': [{'internalType': 'bytes4', 'name': '', 'type': 'bytes4'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': True, 'inputs': [], 'name': 'token', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'payable': False, 'stateMutability': 'view', 'type': 'function'}] + abi = [{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "address", "name": "poseidonAddress", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": False, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": False, "inputs": [{"indexed": False, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event"}, {"anonymous": False, "inputs": [{"indexed": False, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event"}, {"anonymous": False, "inputs": [{"indexed": False, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": False, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": False, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": False, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": False, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event"}, {"constant": True, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": False, "stateMutability": "pure", "type": "function"}, {"constant": True, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": False, "stateMutability": "pure", "type": "function"}, {"constant": True, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": False, "stateMutability": "pure", "type": "function"}, {"constant": True, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": False, "stateMutability": "pure", "type": "function"}, {"constant": False, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": False, "stateMutability": "nonpayable", "type": "function"}, {"constant": True, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": False, "stateMutability": "view", "type": "function"}, {"constant": False, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": True, "stateMutability": "payable", "type": "function"}, {"constant": False, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": False, "stateMutability": "nonpayable", "type": "function"}, {"constant": True, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": False, "stateMutability": "view", "type": "function"}] - binstr = "6080604052600080553480156200001557600080fd5b506040516200393b3803806200393b83398181016040526200003b9190810190620006cf565b878781806005811462000085576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007c9062000904565b60405180910390fd5b50620000966200042960201b60201c565b506000600160008081526020019081526020016000206000603f8110620000b957fe5b01549050600160036000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd1062000183576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200017a90620008c0565b60405180910390fd5b60fd6002800260010160fd610100030260406002020110620001dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001d390620008e2565b60405180910390fd5b505050604051806040016040528087600060028110620001f857fe5b60200201518152602001876001600281106200021057fe5b6020020151815250600660000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200024d57fe5b60200201518152602001866001600281106200026557fe5b60200201518152602001856000600281106200027d57fe5b60200201518152602001856001600281106200029557fe5b6020020151815250600660020160008201518160000155602082015181600101556040820151816002015560608201518160030155905050604051806080016040528084600060028110620002e657fe5b6020020151815260200184600160028110620002fe57fe5b60200201518152602001836000600281106200031657fe5b60200201518152602001836001600281106200032e57fe5b6020020151815250600680016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b60028251816200037757fe5b046006600a0180549050146200041a576006600a016040518060400160405280848481518110620003a457fe5b60200260200101518152602001846001850181518110620003c157fe5b60200260200101518152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050506002810190506200036b565b50505050505050505062000a23565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106200045c57fe5b018190555060006002600560020a816200047257fe5b0490505b6000811115620004df57620004978283620004e360201b620011e91760201c565b9150600060028260020203905082600160008054815260200190815260200160002082603f8110620004c557fe5b018190555060028281620004d557fe5b0491505062000476565b5050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a8112156200057e57602060002080600052868688838808089350868485099250868488858a878809090994505060018101905062000543565b508484868a8888880808089550505050505092915050565b600081519050620005a781620009ef565b92915050565b600082601f830112620005bf57600080fd5b6002620005d6620005d08262000954565b62000926565b91508183856020840282011115620005ed57600080fd5b60005b83811015620006215781620006068882620006b8565b845260208401935060208301925050600181019050620005f0565b5050505092915050565b600082601f8301126200063d57600080fd5b8151620006546200064e8262000977565b62000926565b915081818352602084019350602081019050838560208402820111156200067a57600080fd5b60005b83811015620006ae5781620006938882620006b8565b8452602084019350602083019250506001810190506200067d565b5050505092915050565b600081519050620006c98162000a09565b92915050565b6000806000806000806000806101a0898b031215620006ed57600080fd5b6000620006fd8b828c01620006b8565b9850506020620007108b828c0162000596565b9750506040620007238b828c01620005ad565b9650506080620007368b828c01620005ad565b95505060c0620007498b828c01620005ad565b9450506101006200075d8b828c01620005ad565b935050610140620007718b828c01620005ad565b92505061018089015167ffffffffffffffff8111156200079057600080fd5b6200079e8b828c016200062b565b9150509295985092959890939650565b6000620007bd602d83620009a0565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b600062000825602b83620009a0565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b60006200088d601f83620009a0565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b60006020820190508181036000830152620008db81620007ae565b9050919050565b60006020820190508181036000830152620008fd8162000816565b9050919050565b600060208201905081810360008301526200091f816200087e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156200094a57600080fd5b8060405250919050565b600067ffffffffffffffff8211156200096c57600080fd5b602082029050919050565b600067ffffffffffffffff8211156200098f57600080fd5b602082029050602081019050919050565b600082825260208201905092915050565b6000620009be82620009c5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620009fa81620009b1565b811462000a0657600080fd5b50565b62000a1481620009e5565b811462000a2057600080fd5b50565b612f088062000a336000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611cd7565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612a59565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611bf2565b61031e565b604051610114929190612ace565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611bf2565b61039a565b6040516101519190612843565b60405180910390f35b610174600480360361016f9190810190611c1c565b610417565b005b34801561018257600080fd5b5061019d60048036036101989190810190611d29565b61063d565b6040516101aa9190612843565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611b77565b61075b565b6040516101e7919061285e565b60405180910390f35b3480156101fc57600080fd5b5061020561076f565b60405161021493929190612af7565b60405180910390f35b34801561022957600080fd5b50610232610792565b60405161023f91906127a2565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806107b8565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c0906128f9565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b60008060fd60406002026002800260010160fd6101000302604060020201610100030184600280026001016002800101600a81106103d457fe5b602002015160001b901b901c9050600060fd610100038460028060020101600a81106103fc57fe5b6020020151901b90508160001c810160001b92505050919050565b61041f61180e565b61042a85848361085f565b600060023373ffffffffffffffffffffffffffffffffffffffff168460006002811061045257fe5b60200201518560016002811061046457fe5b60200201518c8c8c8a6040516020016104839796959493929190612728565b60405160208183030381529060405260405161049f91906126fc565b602060405180830381855afa1580156104bc573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506104df9190810190611d00565b9050610533866000600481106104f157fe5b60200201518760016004811061050357fe5b60200201518860026004811061051557fe5b60200201518960036004811061052757fe5b60200201518986610a41565b610572576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610569906129f9565b60405180910390fd5b61057e89898987610b18565b6105bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b490612999565b60405180910390fd5b6105c561180e565b6105cf8582610d1f565b60006105db6002610d7b565b90506105e681610df0565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf76000548286858960405161061f959493929190612a74565b60405180910390a161063086610e31565b5050505050505050505050565b600060028310610682576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067990612879565b60405180910390fd5b600060fd610100038460010102604060020201905060fd61010003810160fd10156106e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d990612919565b60405180910390fd5b600060fd826002800260010160fd6101000302604060020201610100030185600280026001016002800101600a811061071757fe5b602002015160001b901b901c9050600060fd6101000385876002800101600a811061073e57fe5b6020020151901b90508160001c810160001b935050505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106107ea57fe5b018190555060006002600560020a816107ff57fe5b0490505b600081111561085b5761081682836111e9565b9150600060028260020203905082600160008054815260200190815260200160002082603f811061084357fe5b01819055506002828161085257fe5b04915050610803565b5050565b6108688261129a565b6108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90612939565b60405180910390fd5b60008090505b60028110156109755760006108c2828561063d565b90506004600082815260200190815260200160002060009054906101000a900460ff1615610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612899565b60405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061095e57fe5b6020020181815250505080806001019150506108ad565b5060006002828560405160200161098d9291906126d0565b6040516020818303038152906040526040516109a991906126fc565b602060405180830381855afa1580156109c6573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109e99190810190611d00565b905060006109f68461039a565b9050808214610a3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3190612959565b60405180910390fd5b5050505050565b6000610a4b611830565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ac657fe5b602002015181600060058110610ad857fe5b6020020151148015610b0b575080600360058110610af257fe5b602002015181600160058110610b0457fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b46611852565b86600060028110610b5357fe5b602002015181600001818152505086600160028110610b6e57fe5b602002015181602001818152505085600060048110610b8957fe5b602002015181604001818152505085600160048110610ba457fe5b602002015181606001818152505085600260048110610bbf57fe5b602002015181608001818152505085600360048110610bda57fe5b60200201518160a001818152505084600060028110610bf557fe5b60200201518160c001818152505084600160028110610c1057fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c5d5781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d0457838682600a8110610c8957fe5b602002015110610cce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc5906129d9565b60405180910390fd5b8581600a8110610cda57fe5b6020020151828281518110610ceb57fe5b6020026020010181815250508080600101915050610c66565b50610d0f8183611385565b6001149350505050949350505050565b60008090505b6002811015610d765760008382600201600a8110610d3f57fe5b602002015160001b905080838360028110610d5657fe5b602002018181525050610d6881610248565b508080600101915050610d25565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dc457610daa8183856116a1565b809450819350505060028181610dbc57fe5b049050610d96565b60016000805481526020019081526020016000206000603f8110610de457fe5b01549350505050919050565b60016003600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e3d8361031e565b915091506000821115610f8457600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3c576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f04939291906127bd565b600060405180830381600087803b158015610f1e57600080fd5b505af1158015610f32573d6000803e3d6000fd5b5050505050610f7f565b813414610f7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f75906129b9565b60405180910390fd5b5b61103c565b600034111561103b5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fb390612713565b60006040518083038185875af1925050503d8060008114610ff0576040519150601f19603f3d011682016040523d82523d6000602084013e610ff5565b606091505b5050905080611039576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611030906128b9565b60405180910390fd5b505b5b60008111156111e457600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611135576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016110fd929190612807565b600060405180830381600087803b15801561111757600080fd5b505af115801561112b573d6000803e3d6000fd5b50505050506111e3565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161115b90612713565b60006040518083038185875af1925050503d8060008114611198576040519150601f19603f3d011682016040523d82523d6000602084013e61119d565b606091505b50509050806111e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d8906128d9565b60405180910390fd5b505b5b505050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a81121561128257602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050611249565b508484868a8888880808089550505050505092915050565b6000806000905060008090505b600054811161137957600360008281526020019081526020016000206000856000600a81106112d257fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156113045781806001019250505b600360008281526020019081526020016000206000856001600a811061132657fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156113585781806001019250505b600282141561136c57600192505050611380565b80806001019150506112a7565b5060009150505b919050565b60006006600a01805490506001845101146113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc90612979565b60405180910390fd5b6113dd611897565b6000600190506107d05a03600a60060183526020832060208701875160200281018254865260018301546020870152600283019250604086015b8183101561146657835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf1808216881697505050600284019350602083019250611417565b5050505050806114ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a290612a39565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260065460c083015260016006015460e083015260026006015461010083015260036006015461012083015260046006015461014083015260056006015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260068001546102808501526007600601546102a08501526008600601546102c08501526009600601546102e085015260208461030086600060086107d05a03f19250505080611685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167c90612a19565b60405180910390fd5b8160006018811061169257fe5b60200201519250505092915050565b60008060006001860390506000600119861682019050600080600187161461174e576001868401039050611718600160008054815260200190815260200160002082603f81106116ed57fe5b0154600160008054815260200190815260200160002085600202603f811061171157fe5b01546111e9565b60016000805481526020019081526020016000206002600184038161173957fe5b04603f811061174457fe5b0181905550611754565b85830190505b5b818111156117e6576002810390506117b0600160008054815260200190815260200160002082603f811061178557fe5b0154600160008054815260200190815260200160002060018401603f81106117a957fe5b01546111e9565b6001600080548152602001908152602001600020600260018403816117d157fe5b04603f81106117dc57fe5b0181905550611755565b600287816117f057fe5b04600260018801816117fe57fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b6000813590506118c981612e80565b92915050565b600082601f8301126118e057600080fd5b60026118f36118ee82612b5b565b612b2e565b9150818360005b8381101561192a57813586016119108882611aba565b8452602084019350602083019250506001810190506118fa565b5050505092915050565b600082601f83011261194557600080fd5b600a61195861195382612b7d565b612b2e565b9150818385602084028201111561196e57600080fd5b60005b8381101561199e57816119848882611b62565b845260208401935060208301925050600181019050611971565b5050505092915050565b600082601f8301126119b957600080fd5b60026119cc6119c782612b9f565b612b2e565b915081838560208402820111156119e257600080fd5b60005b83811015611a1257816119f88882611b62565b8452602084019350602083019250506001810190506119e5565b5050505092915050565b600082601f830112611a2d57600080fd5b6004611a40611a3b82612bc1565b612b2e565b91508183856020840282011115611a5657600080fd5b60005b83811015611a865781611a6c8882611b62565b845260208401935060208301925050600181019050611a59565b5050505092915050565b600081359050611a9f81612e97565b92915050565b600081519050611ab481612e97565b92915050565b600082601f830112611acb57600080fd5b8135611ade611ad982612be3565b612b2e565b91508082526020830160208301858383011115611afa57600080fd5b611b05838284612e23565b50505092915050565b600082601f830112611b1f57600080fd5b8135611b32611b2d82612c0f565b612b2e565b91508082526020830160208301858383011115611b4e57600080fd5b611b59838284612e23565b50505092915050565b600081359050611b7181612eae565b92915050565b60008060008060808587031215611b8d57600080fd5b6000611b9b878288016118ba565b9450506020611bac878288016118ba565b9350506040611bbd87828801611b62565b925050606085013567ffffffffffffffff811115611bda57600080fd5b611be687828801611b0e565b91505092959194509250565b60006101408284031215611c0557600080fd5b6000611c1384828501611934565b91505092915050565b6000806000806000806000610300888a031215611c3857600080fd5b6000611c468a828b016119a8565b9750506040611c578a828b01611a1c565b96505060c0611c688a828b016119a8565b955050610100611c7a8a828b01611a1c565b945050610180611c8c8a828b01611b62565b9350506101a0611c9e8a828b01611934565b9250506102e088013567ffffffffffffffff811115611cbc57600080fd5b611cc88a828b016118cf565b91505092959891949750929550565b600060208284031215611ce957600080fd5b6000611cf784828501611a90565b91505092915050565b600060208284031215611d1257600080fd5b6000611d2084828501611aa5565b91505092915050565b6000806101608385031215611d3d57600080fd5b6000611d4b85828601611b62565b9250506020611d5c85828601611934565b9150509250929050565b6000611d728383612008565b60208301905092915050565b6000611d8a8383612026565b60208301905092915050565b6000611da28383612075565b905092915050565b6000611db683836126aa565b60208301905092915050565b611dcb81612ded565b82525050565b611dda81612d7b565b82525050565b611de981612c6d565b611df38184612cfb565b9250611dfe82612c3b565b8060005b83811015611e2f578151611e168782611d66565b9650611e2183612cba565b925050600181019050611e02565b505050505050565b611e4081612c6d565b611e4a8184612d06565b9250611e5582612c3b565b8060005b83811015611e86578151611e6d8782611d7e565b9650611e7883612cba565b925050600181019050611e59565b505050505050565b6000611e9982612c78565b611ea38185612d11565b935083602082028501611eb585612c45565b8060005b85811015611ef15784840389528151611ed28582611d96565b9450611edd83612cc7565b925060208a01995050600181019050611eb9565b50829750879550505050505092915050565b611f0c81612c83565b611f168184612d1c565b9250611f2182612c4f565b8060005b83811015611f52578151611f398782611daa565b9650611f4483612cd4565b925050600181019050611f25565b505050505050565b611f6381612c8e565b611f6d8184612d27565b9250611f7882612c59565b8060005b83811015611fa9578151611f908782611daa565b9650611f9b83612ce1565b925050600181019050611f7c565b505050505050565b611fba81612c99565b611fc48184612d32565b9250611fcf82612c63565b8060005b83811015612000578151611fe78782611daa565b9650611ff283612cee565b925050600181019050611fd3565b505050505050565b61201181612d8d565b82525050565b61202081612d8d565b82525050565b61202f81612d8d565b82525050565b61203e81612d97565b82525050565b600061204f82612caf565b6120598185612d5f565b9350612069818560208601612e32565b80840191505092915050565b600061208082612ca4565b61208a8185612d3d565b935061209a818560208601612e32565b6120a381612e6f565b840191505092915050565b60006120b982612ca4565b6120c38185612d5f565b93506120d3818560208601612e32565b80840191505092915050565b60006120ec601883612d6a565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061212c603783612d6a565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b6000612192601e83612d6a565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b60006121d2601883612d6a565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612212602783612d6a565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612278603083612d6a565b91507f6e756c6c6966696572207772697474656e20696e20646966666572656e74207260008301527f6573696475616c2062697420662e652e000000000000000000000000000000006020830152604082019050919050565b60006122de602583612d6a565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612344604983612d6a565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006123d0602283612d6a565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612436603383612d6a565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b600061249c602a83612d6a565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b6000612502601c83612d6a565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b6000612542603b83612d6a565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b60006125a8600083612d4e565b9150600082019050919050565b60006125c2600083612d5f565b9150600082019050919050565b60006125dc603783612d6a565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b6000612642603983612d6a565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b6126a481612de3565b82525050565b6126b381612de3565b82525050565b6126ca6126c582612de3565b612e65565b82525050565b60006126dc8285611e37565b6040820191506126ec8284611fb1565b6080820191508190509392505050565b60006127088284612044565b915081905092915050565b600061271e826125b5565b9150819050919050565b6000612734828a6126b9565b60208201915061274482896120ae565b915061275082886120ae565b915061275c8287611f5a565b60408201915061276c8286611fb1565b60808201915061277c8285611f5a565b60408201915061278c8284611f03565b6101408201915081905098975050505050505050565b60006020820190506127b76000830184611dd1565b92915050565b60006080820190506127d26000830186611dc2565b6127df6020830185611dd1565b6127ec604083018461269b565b81810360608301526127fd8161259b565b9050949350505050565b600060608201905061281c6000830185611dc2565b612829602083018461269b565b818103604083015261283a8161259b565b90509392505050565b60006020820190506128586000830184612017565b92915050565b60006020820190506128736000830184612035565b92915050565b60006020820190508181036000830152612892816120df565b9050919050565b600060208201905081810360008301526128b28161211f565b9050919050565b600060208201905081810360008301526128d281612185565b9050919050565b600060208201905081810360008301526128f2816121c5565b9050919050565b6000602082019050818103600083015261291281612205565b9050919050565b600060208201905081810360008301526129328161226b565b9050919050565b60006020820190508181036000830152612952816122d1565b9050919050565b6000602082019050818103600083015261297281612337565b9050919050565b60006020820190508181036000830152612992816123c3565b9050919050565b600060208201905081810360008301526129b281612429565b9050919050565b600060208201905081810360008301526129d28161248f565b9050919050565b600060208201905081810360008301526129f2816124f5565b9050919050565b60006020820190508181036000830152612a1281612535565b9050919050565b60006020820190508181036000830152612a32816125cf565b9050919050565b60006020820190508181036000830152612a5281612635565b9050919050565b6000602082019050612a6e600083018461269b565b92915050565b600060e082019050612a89600083018861269b565b612a966020830187612017565b612aa36040830186611de0565b612ab06080830185611de0565b81810360c0830152612ac28184611e8e565b90509695505050505050565b6000604082019050612ae3600083018561269b565b612af0602083018461269b565b9392505050565b6000606082019050612b0c600083018661269b565b612b19602083018561269b565b612b26604083018461269b565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612b5157600080fd5b8060405250919050565b600067ffffffffffffffff821115612b7257600080fd5b602082029050919050565b600067ffffffffffffffff821115612b9457600080fd5b602082029050919050565b600067ffffffffffffffff821115612bb657600080fd5b602082029050919050565b600067ffffffffffffffff821115612bd857600080fd5b602082029050919050565b600067ffffffffffffffff821115612bfa57600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612c2657600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612d8682612dc3565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612df882612dff565b9050919050565b6000612e0a82612e11565b9050919050565b6000612e1c82612dc3565b9050919050565b82818337600083830152505050565b60005b83811015612e50578082015181840152602081019050612e35565b83811115612e5f576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612e8981612d7b565b8114612e9457600080fd5b50565b612ea081612d8d565b8114612eab57600080fd5b50565b612eb781612de3565b8114612ec257600080fd5b5056fea365627a7a72315820f62d867b7f806cc547daab622cb427ec98c2222a4a755612cb1dc066faf41a526c6578706572696d656e74616cf564736f6c63430005110040" + binstr = "6080604052600080553480156200001557600080fd5b5060405162003d3338038062003d3383398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b61312b8062000c086000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611e77565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612c43565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611d92565b61031e565b604051610114929190612cb8565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611d92565b61039a565b6040516101519190612a4d565b60405180910390f35b610174600480360361016f9190810190611dbc565b6103c2565b005b34801561018257600080fd5b5061019d60048036036101989190810190611ef2565b6105e8565b6040516101aa9190612a4d565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611d17565b610654565b6040516101e79190612a68565b60405180910390f35b3480156101fc57600080fd5b50610205610668565b60405161021493929190612ce1565b60405180910390f35b34801561022957600080fd5b5061023261068b565b60405161023f919061298a565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806106b1565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c090612b03565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103af57fe5b602002015190508060001b915050919050565b6103ca611999565b6103d585848361086c565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106103fd57fe5b60200201518560016002811061040f57fe5b60200201518c8c8c8a60405160200161042e9796959493929190612910565b60405160208183030381529060405260405161044a91906128e4565b602060405180830381855afa158015610467573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061048a9190810190611ea0565b90506104de8660006004811061049c57fe5b6020020151876001600481106104ae57fe5b6020020151886002600481106104c057fe5b6020020151896003600481106104d257fe5b60200201518986610a55565b61051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051490612be3565b60405180910390fd5b61052989898987610b2c565b610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612b83565b60405180910390fd5b610570611999565b61057a8582610d33565b60006105866002610d8f565b905061059181610e04565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7600054828685896040516105ca959493929190612c5e565b60405180910390a16105db86610e45565b5050505050505050505050565b60006002831061062d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062490612a83565b60405180910390fd5b600082846002800101600a811061064057fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106106e357fe5b018190555060006002600560020a816106f857fe5b0490505b600081111561086857606060026040519080825280602002602001820160405280156107375781602001602082028038833980820191505090505b5090508260001c8160008151811061074b57fe5b6020026020010181815250508260001c8160018151811061076857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016107cf9190612a2b565b60206040518083038186803b1580156107e757600080fd5b505afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061081f9190810190611ec9565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f811061084f57fe5b01819055506002838161085e57fe5b04925050506106fc565b5050565b610875826111fd565b6108b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ab90612b23565b60405180910390fd5b60008090505b60028110156109825760006108cf82856105e8565b90506005600082815260200190815260200160002060009054906101000a900460ff1615610932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092990612aa3565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061096b57fe5b6020020181815250505080806001019150506108ba565b5060006002828560405160200161099a9291906128b8565b6040516020818303038152906040526040516109b691906128e4565b602060405180830381855afa1580156109d3573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109f69190810190611ea0565b9050600381901c90506000610a0a8461039a565b9050808214610a4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4590612b43565b60405180910390fd5b5050505050565b6000610a5f6119bb565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ada57fe5b602002015181600060058110610aec57fe5b6020020151148015610b1f575080600360058110610b0657fe5b602002015181600160058110610b1857fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b5a6119dd565b86600060028110610b6757fe5b602002015181600001818152505086600160028110610b8257fe5b602002015181602001818152505085600060048110610b9d57fe5b602002015181604001818152505085600160048110610bb857fe5b602002015181606001818152505085600260048110610bd357fe5b602002015181608001818152505085600360048110610bee57fe5b60200201518160a001818152505084600060028110610c0957fe5b60200201518160c001818152505084600160028110610c2457fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c715781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d1857838682600a8110610c9d57fe5b602002015110610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612bc3565b60405180910390fd5b8581600a8110610cee57fe5b6020020151828281518110610cff57fe5b6020026020010181815250508080600101915050610c7a565b50610d2381836112e8565b6001149350505050949350505050565b60008090505b6002811015610d8a5760008382600201600a8110610d5357fe5b602002015160001b905080838360028110610d6a57fe5b602002018181525050610d7c81610248565b508080600101915050610d39565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dd857610dbe818385611604565b809450819350505060028181610dd057fe5b049050610daa565b60016000805481526020019081526020016000206000603f8110610df857fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e518361031e565b915091506000821115610f9857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f50576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f18939291906129a5565b600060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b5050505050610f93565b813414610f92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990612ba3565b60405180910390fd5b5b611050565b600034111561104f5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fc7906128fb565b60006040518083038185875af1925050503d8060008114611004576040519150601f19603f3d011682016040523d82523d6000602084013e611009565b606091505b505090508061104d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104490612ac3565b60405180910390fd5b505b5b60008111156111f857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016111119291906129ef565b600060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b50505050506111f7565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161116f906128fb565b60006040518083038185875af1925050503d80600081146111ac576040519150601f19603f3d011682016040523d82523d6000602084013e6111b1565b606091505b50509050806111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612ae3565b60405180910390fd5b505b5b505050565b6000806000905060008090505b60005481116112dc57600460008281526020019081526020016000206000856000600a811061123557fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112675781806001019250505b600460008281526020019081526020016000206000856001600a811061128957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112bb5781806001019250505b60028214156112cf576001925050506112e3565b808060010191505061120a565b5060009150505b919050565b60006007600a0180549050600184510114611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f90612b63565b60405180910390fd5b611340611a22565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156113c957835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf180821688169750505060028401935060208301925061137a565b50505050508061140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140590612c23565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f192505050806115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115df90612c03565b60405180910390fd5b816000601881106115f557fe5b60200201519250505092915050565b6000806000600186039050600060011986168201905060008060018716146117c5576001868401039050606060026040519080825280602002602001820160405280156116605781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061168257fe5b015460001c8160008151811061169457fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f81106116c257fe5b015460001c816001815181106116d457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161173b9190612a2b565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061178b9190810190611ec9565b60001b6001600080548152602001908152602001600020600260018503816117af57fe5b04603f81106117ba57fe5b0181905550506117cb565b85830190505b5b81811115611971576002810390506060600260405190808252806020026020018201604052801561180c5781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061182e57fe5b015460001c8160008151811061184057fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f811061186e57fe5b015460001c8160018151811061188057fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016118e79190612a2b565b60206040518083038186803b1580156118ff57600080fd5b505afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119379190810190611ec9565b60001b60016000805481526020019081526020016000206002600185038161195b57fe5b04603f811061196657fe5b0181905550506117cc565b6002878161197b57fe5b046002600188018161198957fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611a54816130a3565b92915050565b600082601f830112611a6b57600080fd5b6002611a7e611a7982612d45565b612d18565b9150818360005b83811015611ab55781358601611a9b8882611c45565b845260208401935060208301925050600181019050611a85565b5050505092915050565b600082601f830112611ad057600080fd5b600a611ae3611ade82612d67565b612d18565b91508183856020840282011115611af957600080fd5b60005b83811015611b295781611b0f8882611ced565b845260208401935060208301925050600181019050611afc565b5050505092915050565b600082601f830112611b4457600080fd5b6002611b57611b5282612d89565b612d18565b91508183856020840282011115611b6d57600080fd5b60005b83811015611b9d5781611b838882611ced565b845260208401935060208301925050600181019050611b70565b5050505092915050565b600082601f830112611bb857600080fd5b6004611bcb611bc682612dab565b612d18565b91508183856020840282011115611be157600080fd5b60005b83811015611c115781611bf78882611ced565b845260208401935060208301925050600181019050611be4565b5050505092915050565b600081359050611c2a816130ba565b92915050565b600081519050611c3f816130ba565b92915050565b600082601f830112611c5657600080fd5b8135611c69611c6482612dcd565b612d18565b91508082526020830160208301858383011115611c8557600080fd5b611c90838284613046565b50505092915050565b600082601f830112611caa57600080fd5b8135611cbd611cb882612df9565b612d18565b91508082526020830160208301858383011115611cd957600080fd5b611ce4838284613046565b50505092915050565b600081359050611cfc816130d1565b92915050565b600081519050611d11816130d1565b92915050565b60008060008060808587031215611d2d57600080fd5b6000611d3b87828801611a45565b9450506020611d4c87828801611a45565b9350506040611d5d87828801611ced565b925050606085013567ffffffffffffffff811115611d7a57600080fd5b611d8687828801611c99565b91505092959194509250565b60006101408284031215611da557600080fd5b6000611db384828501611abf565b91505092915050565b6000806000806000806000610300888a031215611dd857600080fd5b6000611de68a828b01611b33565b9750506040611df78a828b01611ba7565b96505060c0611e088a828b01611b33565b955050610100611e1a8a828b01611ba7565b945050610180611e2c8a828b01611ced565b9350506101a0611e3e8a828b01611abf565b9250506102e088013567ffffffffffffffff811115611e5c57600080fd5b611e688a828b01611a5a565b91505092959891949750929550565b600060208284031215611e8957600080fd5b6000611e9784828501611c1b565b91505092915050565b600060208284031215611eb257600080fd5b6000611ec084828501611c30565b91505092915050565b600060208284031215611edb57600080fd5b6000611ee984828501611d02565b91505092915050565b6000806101608385031215611f0657600080fd5b6000611f1485828601611ced565b9250506020611f2585828601611abf565b9150509250929050565b6000611f3b8383612247565b60208301905092915050565b6000611f538383612265565b60208301905092915050565b6000611f6b83836122b4565b905092915050565b6000611f7f8383612874565b60208301905092915050565b6000611f978383612892565b60208301905092915050565b611fac81613010565b82525050565b611fbb81612f9e565b82525050565b611fca81612e67565b611fd48184612f0d565b9250611fdf82612e25565b8060005b83811015612010578151611ff78782611f2f565b965061200283612ebf565b925050600181019050611fe3565b505050505050565b61202181612e67565b61202b8184612f18565b925061203682612e25565b8060005b8381101561206757815161204e8782611f47565b965061205983612ebf565b92505060018101905061203a565b505050505050565b600061207a82612e72565b6120848185612f23565b93508360208202850161209685612e2f565b8060005b858110156120d257848403895281516120b38582611f5f565b94506120be83612ecc565b925060208a0199505060018101905061209a565b50829750879550505050505092915050565b6120ed81612e7d565b6120f78184612f2e565b925061210282612e39565b8060005b8381101561213357815161211a8782611f8b565b965061212583612ed9565b925050600181019050612106565b505050505050565b61214481612e88565b61214e8184612f39565b925061215982612e43565b8060005b8381101561218a5781516121718782611f8b565b965061217c83612ee6565b92505060018101905061215d565b505050505050565b61219b81612e93565b6121a58184612f44565b92506121b082612e4d565b8060005b838110156121e15781516121c88782611f8b565b96506121d383612ef3565b9250506001810190506121b4565b505050505050565b60006121f482612e9e565b6121fe8185612f4f565b935061220983612e57565b8060005b8381101561223a5781516122218882611f73565b975061222c83612f00565b92505060018101905061220d565b5085935050505092915050565b61225081612fb0565b82525050565b61225f81612fb0565b82525050565b61226e81612fb0565b82525050565b61227d81612fba565b82525050565b600061228e82612eb4565b6122988185612f82565b93506122a8818560208601613055565b80840191505092915050565b60006122bf82612ea9565b6122c98185612f60565b93506122d9818560208601613055565b6122e281613092565b840191505092915050565b60006122f882612ea9565b6123028185612f82565b9350612312818560208601613055565b80840191505092915050565b600061232b601883612f8d565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061236b603783612f8d565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b60006123d1601e83612f8d565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612411601883612f8d565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612451602783612f8d565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124b7602583612f8d565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061251d604983612f8d565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006125a9602283612f8d565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061260f603383612f8d565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b6000612675602a83612f8d565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b60006126db601c83612f8d565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b600061271b603b83612f8d565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b6000612781600083612f71565b9150600082019050919050565b600061279b600083612f82565b9150600082019050919050565b60006127b5603783612f8d565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b600061281b603983612f8d565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61287d81613006565b82525050565b61288c81613006565b82525050565b61289b81613006565b82525050565b6128b26128ad82613006565b613088565b82525050565b60006128c48285612018565b6040820191506128d48284612192565b6080820191508190509392505050565b60006128f08284612283565b915081905092915050565b60006129068261278e565b9150819050919050565b600061291c828a6128a1565b60208201915061292c82896122ed565b915061293882886122ed565b9150612944828761213b565b6040820191506129548286612192565b608082019150612964828561213b565b60408201915061297482846120e4565b6101408201915081905098975050505050505050565b600060208201905061299f6000830184611fb2565b92915050565b60006080820190506129ba6000830186611fa3565b6129c76020830185611fb2565b6129d46040830184612883565b81810360608301526129e581612774565b9050949350505050565b6000606082019050612a046000830185611fa3565b612a116020830184612883565b8181036040830152612a2281612774565b90509392505050565b60006020820190508181036000830152612a4581846121e9565b905092915050565b6000602082019050612a626000830184612256565b92915050565b6000602082019050612a7d6000830184612274565b92915050565b60006020820190508181036000830152612a9c8161231e565b9050919050565b60006020820190508181036000830152612abc8161235e565b9050919050565b60006020820190508181036000830152612adc816123c4565b9050919050565b60006020820190508181036000830152612afc81612404565b9050919050565b60006020820190508181036000830152612b1c81612444565b9050919050565b60006020820190508181036000830152612b3c816124aa565b9050919050565b60006020820190508181036000830152612b5c81612510565b9050919050565b60006020820190508181036000830152612b7c8161259c565b9050919050565b60006020820190508181036000830152612b9c81612602565b9050919050565b60006020820190508181036000830152612bbc81612668565b9050919050565b60006020820190508181036000830152612bdc816126ce565b9050919050565b60006020820190508181036000830152612bfc8161270e565b9050919050565b60006020820190508181036000830152612c1c816127a8565b9050919050565b60006020820190508181036000830152612c3c8161280e565b9050919050565b6000602082019050612c586000830184612883565b92915050565b600060e082019050612c736000830188612883565b612c806020830187612256565b612c8d6040830186611fc1565b612c9a6080830185611fc1565b81810360c0830152612cac818461206f565b90509695505050505050565b6000604082019050612ccd6000830185612883565b612cda6020830184612883565b9392505050565b6000606082019050612cf66000830186612883565b612d036020830185612883565b612d106040830184612883565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612d3b57600080fd5b8060405250919050565b600067ffffffffffffffff821115612d5c57600080fd5b602082029050919050565b600067ffffffffffffffff821115612d7e57600080fd5b602082029050919050565b600067ffffffffffffffff821115612da057600080fd5b602082029050919050565b600067ffffffffffffffff821115612dc257600080fd5b602082029050919050565b600067ffffffffffffffff821115612de457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612e1057600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612fa982612fe6565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061301b82613022565b9050919050565b600061302d82613034565b9050919050565b600061303f82612fe6565b9050919050565b82818337600083830152505050565b60005b83811015613073578082015181840152602081019050613058565b83811115613082576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6130ac81612f9e565b81146130b757600080fd5b50565b6130c381612fb0565b81146130ce57600080fd5b50565b6130da81613006565b81146130e557600080fd5b5056fea365627a7a723158200681dad9a2468c04d3031ae3856b4cd273e5060b0dcbefd4ceea6ed749f9fe746c6578706572696d656e74616cf564736f6c63430005110040" # with open("./contract/mixer/abi/Groth16Mixer.abi", "r") as abistring: # abistr = abistring.readlines()[0] diff --git a/contract/Groth16Mixer.abi b/contract/Groth16Mixer.abi index 663498b..94b0783 100644 --- a/contract/Groth16Mixer.abi +++ b/contract/Groth16Mixer.abi @@ -1 +1 @@ -[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}] \ No newline at end of file +[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "address", "name": "poseidonAddress", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}] \ No newline at end of file diff --git a/contract/Groth16Mixer.bin b/contract/Groth16Mixer.bin index 82b926c..87736b4 100644 --- a/contract/Groth16Mixer.bin +++ b/contract/Groth16Mixer.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200364e3803806200364e833981810160405262000037919081019062000685565b878781806005811462000081576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620008ba565b60405180910390fd5b50620000926200040360201b60201c565b506000806000603f8110620000a357fe5b0154905060016040600083815260200190815260200160002060006101000a81548160ff02191690831515021790555081604260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd106200015c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001539062000876565b60405180910390fd5b60fd6002800260010160fd610100030260406002020110620001b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001ac9062000898565b60405180910390fd5b505050604051806040016040528087600060028110620001d157fe5b6020020151815260200187600160028110620001e957fe5b6020020151815250604360000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200022657fe5b60200201518152602001866001600281106200023e57fe5b60200201518152602001856000600281106200025657fe5b60200201518152602001856001600281106200026e57fe5b6020020151815250604360020160008201518160000155602082015181600101556040820151816002015560608201518160030155905050604051806080016040528084600060028110620002bf57fe5b6020020151815260200184600160028110620002d757fe5b6020020151815260200183600060028110620002ef57fe5b60200201518152602001836001600281106200030757fe5b602002015181525060436006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b60028251816200035157fe5b046043600a018054905014620003f4576043600a0160405180604001604052808484815181106200037e57fe5b602002602001015181526020018460018501815181106200039b57fe5b602002602001015181525090806001815401808255809150509060018203906000526020600020906002020160009091929091909150600082015181600001556020820151816001015550505060028101905062000345565b505050505050505050620009d9565b60008060001b90508060006002600560020a60020203603f81106200042457fe5b018190555060006002600560020a816200043a57fe5b0490505b600081111562000495576200045f82836200049960201b620014e31760201c565b9150600060028260020203905082600082603f81106200047b57fe5b0181905550600282816200048b57fe5b049150506200043e565b5050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a8112156200053457602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050620004f9565b508484868a8888880808089550505050505092915050565b6000815190506200055d81620009a5565b92915050565b600082601f8301126200057557600080fd5b60026200058c62000586826200090a565b620008dc565b91508183856020840282011115620005a357600080fd5b60005b83811015620005d75781620005bc88826200066e565b845260208401935060208301925050600181019050620005a6565b5050505092915050565b600082601f830112620005f357600080fd5b81516200060a62000604826200092d565b620008dc565b915081818352602084019350602081019050838560208402820111156200063057600080fd5b60005b838110156200066457816200064988826200066e565b84526020840193506020830192505060018101905062000633565b5050505092915050565b6000815190506200067f81620009bf565b92915050565b6000806000806000806000806101a0898b031215620006a357600080fd5b6000620006b38b828c016200066e565b9850506020620006c68b828c016200054c565b9750506040620006d98b828c0162000563565b9650506080620006ec8b828c0162000563565b95505060c0620006ff8b828c0162000563565b945050610100620007138b828c0162000563565b935050610140620007278b828c0162000563565b92505061018089015167ffffffffffffffff8111156200074657600080fd5b620007548b828c01620005e1565b9150509295985092959890939650565b600062000773602d8362000956565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b6000620007db602b8362000956565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b600062000843601f8362000956565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b60006020820190508181036000830152620008918162000764565b9050919050565b60006020820190508181036000830152620008b381620007cc565b9050919050565b60006020820190508181036000830152620008d58162000834565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156200090057600080fd5b8060405250919050565b600067ffffffffffffffff8211156200092257600080fd5b602082029050919050565b600067ffffffffffffffff8211156200094557600080fd5b602082029050602081019050919050565b600082825260208201905092915050565b600062000974826200097b565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620009b08162000967565b8114620009bc57600080fd5b50565b620009ca816200099b565b8114620009d657600080fd5b50565b612c6580620009e96000396000f3fe60806040526004361061007b5760003560e01c806397e004891161004e57806397e0048914610161578063c73d16ae1461017d578063f9eb943f146101ba578063fc0c546a146101e75761007b565b806305ceb93c146100805780631f40927c146100bd5780632d287e43146100fb578063354d06fd14610124575b600080fd5b34801561008c57600080fd5b506100a760048036036100a29190810190611aaf565b610212565b6040516100b491906125c9565b60405180910390f35b3480156100c957600080fd5b506100e460048036036100df9190810190611a33565b610332565b6040516100f292919061282b565b60405180910390f35b34801561010757600080fd5b50610122600480360361011d9190810190611a5d565b6103af565b005b34801561013057600080fd5b5061014b60048036036101469190810190611a33565b610434565b60405161015891906125c9565b60405180910390f35b61017b60048036036101769190810190611978565b6104b2565b005b34801561018957600080fd5b506101a4600480360361019f91908101906118fd565b6106d4565b6040516101b19190612630565b60405180910390f35b3480156101c657600080fd5b506101cf6106e8565b6040516101de93929190612854565b60405180910390f35b3480156101f357600080fd5b506101fc61070c565b6040516102099190612528565b60405180910390f35b600060028310610257576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024e9061264b565b60405180910390fd5b600060fd610100038460010102604060020201905060fd61010003810160fd10156102b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ae906126eb565b60405180910390fd5b600060fd826002800260010160fd610100030260406002020161010003018560028002600101600260010101600981106102ed57fe5b602002015160001b901b901c9050600060fd6101000385876002600101016009811061031557fe5b6020020151901b90508160001c810160001b935050505092915050565b600080600083600280026001016002600101016009811061034f57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b600560020a603f54106103f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ee906126cb565b60405180910390fd5b6000603f549050603f60008154600101919050819055506000816001600560020a0301905082600082603f811061042a57fe5b0181905550505050565b60008060fd60406002026002800260010160fd6101000302604060020201610100030184600280026001016002600101016009811061046f57fe5b602002015160001b901b901c9050600060fd6101000384600280600101016009811061049757fe5b6020020151901b90508160001c810160001b92505050919050565b6104ba611594565b6104c5858483610732565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106104ed57fe5b6020020151856001600281106104ff57fe5b60200201518c8c8c8a60405160200161051e97969594939291906124ae565b60405160208183030381529060405260405161053a9190612482565b602060405180830381855afa158015610557573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061057a9190810190611a86565b90506105ce8660006004811061058c57fe5b60200201518760016004811061059e57fe5b6020020151886002600481106105b057fe5b6020020151896003600481106105c257fe5b60200201518986610940565b61060d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610604906127cb565b60405180910390fd5b61061989898987610a17565b610658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064f9061276b565b60405180910390fd5b610660611594565b61066a8582610c20565b60006106766002610c7c565b905061068181610cde565b7f36ed7c3f2ecfb5a5226c478b034d33144c060afe361be291e948f861dcddc618818584886040516106b694939291906125e4565b60405180910390a16106c786610d0d565b5050505050505050505050565b600063c73d16ae60e01b9050949350505050565b60008060006002925060029150600160028002600101600260010101019050909192565b604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604060008360006009811061074357fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff166107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079d9061270b565b60405180910390fd5b60008090505b60028110156108745760006107c18285610212565b90506041600082815260200190815260200160002060009054906101000a900460ff1615610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b9061266b565b60405180910390fd5b60016041600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061085d57fe5b6020020181815250505080806001019150506107ac565b5060006002828560405160200161088c929190612456565b6040516020818303038152906040526040516108a89190612482565b602060405180830381855afa1580156108c5573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506108e89190810190611a86565b905060006108f584610434565b9050808214610939576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109309061272b565b60405180910390fd5b5050505050565b600061094a6115b6565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f1505050806002600581106109c557fe5b6020020151816000600581106109d757fe5b6020020151148015610a0a5750806003600581106109f157fe5b602002015181600160058110610a0357fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610a456115d8565b86600060028110610a5257fe5b602002015181600001818152505086600160028110610a6d57fe5b602002015181602001818152505085600060048110610a8857fe5b602002015181604001818152505085600160048110610aa357fe5b602002015181606001818152505085600260048110610abe57fe5b602002015181608001818152505085600360048110610ad957fe5b60200201518160a001818152505084600060028110610af457fe5b60200201518160c001818152505084600160028110610b0f57fe5b60200201518160e0018181525050606060016002800260010160026001010101604051908082528060200260200182016040528015610b5d5781602001602082028038833980820191505090505b50905060008090505b60016002800260010160026001010101811015610c055783868260098110610b8a57fe5b602002015110610bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc6906127ab565b60405180910390fd5b858160098110610bdb57fe5b6020020151828281518110610bec57fe5b6020026020010181815250508080600101915050610b66565b50610c1081836110c5565b6001149350505050949350505050565b60008090505b6002811015610c77576000838260010160098110610c4057fe5b602002015160001b905080838360028110610c5757fe5b602002018181525050610c69816103af565b508080600101915050610c26565b505050565b600080603f549050600083603f540390506000600560020a90505b6001811115610cc557610cab8183856113e2565b809450819350505060028181610cbd57fe5b049050610c97565b600080603f8110610cd257fe5b01549350505050919050565b60016040600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610d1983610332565b915091506000821115610e6057600073ffffffffffffffffffffffffffffffffffffffff16604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e18576000604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610de093929190612543565b600060405180830381600087803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050505050610e5b565b813414610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e519061278b565b60405180910390fd5b5b610f18565b6000341115610f175760003373ffffffffffffffffffffffffffffffffffffffff1634604051610e8f90612499565b60006040518083038185875af1925050503d8060008114610ecc576040519150601f19603f3d011682016040523d82523d6000602084013e610ed1565b606091505b5050905080610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c9061268b565b60405180910390fd5b505b5b60008111156110c057600073ffffffffffffffffffffffffffffffffffffffff16604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611011576000604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b8152600401610fd992919061258d565b600060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b50505050506110bf565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161103790612499565b60006040518083038185875af1925050503d8060008114611074576040519150601f19603f3d011682016040523d82523d6000602084013e611079565b606091505b50509050806110bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b4906126ab565b60405180910390fd5b505b5b505050565b60006043600a0180549050600184510114611115576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110c9061274b565b60405180910390fd5b61111d61161d565b6000600190506107d05a03600a60430183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156111a657835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf1808216881697505050600284019350602083019250611157565b5050505050806111eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e29061280b565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260435460c083015260016043015460e083015260026043015461010083015260036043015461012083015260046043015461014083015260056043015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e08601516102608501526006604301546102808501526007604301546102a08501526008604301546102c08501526009604301546102e085015260208461030086600060086107d05a03f192505050806113c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bd906127eb565b60405180910390fd5b816000601881106113d357fe5b60200201519250505092915050565b600080600060018603905060006001198616820190506000806001871614611459576001868401039050611435600082603f811061141c57fe5b0154600085600202603f811061142e57fe5b01546114e3565b60006002600184038161144457fe5b04603f811061144f57fe5b018190555061145f565b85830190505b5b818111156114bb57600281039050611497600082603f811061147e57fe5b0154600060018401603f811061149057fe5b01546114e3565b6000600260018403816114a657fe5b04603f81106114b157fe5b0181905550611460565b600287816114c557fe5b04600260018801816114d357fe5b0494509450505050935093915050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a81121561157c57602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050611543565b508484868a8888880808089550505050505092915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b60008135905061164f81612bdd565b92915050565b600082601f83011261166657600080fd5b6002611679611674826128b8565b61288b565b9150818360005b838110156116b057813586016116968882611840565b845260208401935060208301925050600181019050611680565b5050505092915050565b600082601f8301126116cb57600080fd5b60026116de6116d9826128da565b61288b565b915081838560208402820111156116f457600080fd5b60005b83811015611724578161170a88826118e8565b8452602084019350602083019250506001810190506116f7565b5050505092915050565b600082601f83011261173f57600080fd5b600461175261174d826128fc565b61288b565b9150818385602084028201111561176857600080fd5b60005b83811015611798578161177e88826118e8565b84526020840193506020830192505060018101905061176b565b5050505092915050565b600082601f8301126117b357600080fd5b60096117c66117c18261291e565b61288b565b915081838560208402820111156117dc57600080fd5b60005b8381101561180c57816117f288826118e8565b8452602084019350602083019250506001810190506117df565b5050505092915050565b60008135905061182581612bf4565b92915050565b60008151905061183a81612bf4565b92915050565b600082601f83011261185157600080fd5b813561186461185f82612940565b61288b565b9150808252602083016020830185838301111561188057600080fd5b61188b838284612b80565b50505092915050565b600082601f8301126118a557600080fd5b81356118b86118b38261296c565b61288b565b915080825260208301602083018583830111156118d457600080fd5b6118df838284612b80565b50505092915050565b6000813590506118f781612c0b565b92915050565b6000806000806080858703121561191357600080fd5b600061192187828801611640565b945050602061193287828801611640565b9350506040611943878288016118e8565b925050606085013567ffffffffffffffff81111561196057600080fd5b61196c87828801611894565b91505092959194509250565b60008060008060008060006102e0888a03121561199457600080fd5b60006119a28a828b016116ba565b97505060406119b38a828b0161172e565b96505060c06119c48a828b016116ba565b9550506101006119d68a828b0161172e565b9450506101806119e88a828b016118e8565b9350506101a06119fa8a828b016117a2565b9250506102c088013567ffffffffffffffff811115611a1857600080fd5b611a248a828b01611655565b91505092959891949750929550565b60006101208284031215611a4657600080fd5b6000611a54848285016117a2565b91505092915050565b600060208284031215611a6f57600080fd5b6000611a7d84828501611816565b91505092915050565b600060208284031215611a9857600080fd5b6000611aa68482850161182b565b91505092915050565b6000806101408385031215611ac357600080fd5b6000611ad1858286016118e8565b9250506020611ae2858286016117a2565b9150509250929050565b6000611af88383611d8e565b60208301905092915050565b6000611b108383611dac565b60208301905092915050565b6000611b288383611dfb565b905092915050565b6000611b3c8383612430565b60208301905092915050565b611b5181612b4a565b82525050565b611b6081612ad8565b82525050565b611b6f816129ca565b611b798184612a58565b9250611b8482612998565b8060005b83811015611bb5578151611b9c8782611aec565b9650611ba783612a17565b925050600181019050611b88565b505050505050565b611bc6816129ca565b611bd08184612a63565b9250611bdb82612998565b8060005b83811015611c0c578151611bf38782611b04565b9650611bfe83612a17565b925050600181019050611bdf565b505050505050565b6000611c1f826129d5565b611c298185612a6e565b935083602082028501611c3b856129a2565b8060005b85811015611c775784840389528151611c588582611b1c565b9450611c6383612a24565b925060208a01995050600181019050611c3f565b50829750879550505050505092915050565b611c92816129e0565b611c9c8184612a79565b9250611ca7826129ac565b8060005b83811015611cd8578151611cbf8782611b30565b9650611cca83612a31565b925050600181019050611cab565b505050505050565b611ce9816129eb565b611cf38184612a84565b9250611cfe826129b6565b8060005b83811015611d2f578151611d168782611b30565b9650611d2183612a3e565b925050600181019050611d02565b505050505050565b611d40816129f6565b611d4a8184612a8f565b9250611d55826129c0565b8060005b83811015611d86578151611d6d8782611b30565b9650611d7883612a4b565b925050600181019050611d59565b505050505050565b611d9781612aea565b82525050565b611da681612aea565b82525050565b611db581612aea565b82525050565b611dc481612af4565b82525050565b6000611dd582612a0c565b611ddf8185612abc565b9350611def818560208601612b8f565b80840191505092915050565b6000611e0682612a01565b611e108185612a9a565b9350611e20818560208601612b8f565b611e2981612bcc565b840191505092915050565b6000611e3f82612a01565b611e498185612abc565b9350611e59818560208601612b8f565b80840191505092915050565b6000611e72601883612ac7565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b6000611eb2603783612ac7565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b6000611f18601e83612ac7565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000611f58601883612ac7565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000611f98602783612ac7565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ffe603083612ac7565b91507f6e756c6c6966696572207772697474656e20696e20646966666572656e74207260008301527f6573696475616c2062697420662e652e000000000000000000000000000000006020830152604082019050919050565b6000612064602583612ac7565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006120ca604983612ac7565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b6000612156602283612ac7565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006121bc603383612ac7565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b6000612222602a83612ac7565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b6000612288601c83612ac7565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b60006122c8603b83612ac7565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b600061232e600083612aab565b9150600082019050919050565b6000612348600083612abc565b9150600082019050919050565b6000612362603783612ac7565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b60006123c8603983612ac7565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61242a81612b40565b82525050565b61243981612b40565b82525050565b61245061244b82612b40565b612bc2565b82525050565b60006124628285611bbd565b6040820191506124728284611ce0565b6080820191508190509392505050565b600061248e8284611dca565b915081905092915050565b60006124a48261233b565b9150819050919050565b60006124ba828a61243f565b6020820191506124ca8289611e34565b91506124d68288611e34565b91506124e28287611c89565b6040820191506124f28286611ce0565b6080820191506125028285611c89565b6040820191506125128284611d37565b6101208201915081905098975050505050505050565b600060208201905061253d6000830184611b57565b92915050565b60006080820190506125586000830186611b48565b6125656020830185611b57565b6125726040830184612421565b818103606083015261258381612321565b9050949350505050565b60006060820190506125a26000830185611b48565b6125af6020830184612421565b81810360408301526125c081612321565b90509392505050565b60006020820190506125de6000830184611d9d565b92915050565b600060c0820190506125f96000830187611d9d565b6126066020830186611b66565b6126136060830185611b66565b81810360a08301526126258184611c14565b905095945050505050565b60006020820190506126456000830184611dbb565b92915050565b6000602082019050818103600083015261266481611e65565b9050919050565b6000602082019050818103600083015261268481611ea5565b9050919050565b600060208201905081810360008301526126a481611f0b565b9050919050565b600060208201905081810360008301526126c481611f4b565b9050919050565b600060208201905081810360008301526126e481611f8b565b9050919050565b6000602082019050818103600083015261270481611ff1565b9050919050565b6000602082019050818103600083015261272481612057565b9050919050565b60006020820190508181036000830152612744816120bd565b9050919050565b6000602082019050818103600083015261276481612149565b9050919050565b60006020820190508181036000830152612784816121af565b9050919050565b600060208201905081810360008301526127a481612215565b9050919050565b600060208201905081810360008301526127c48161227b565b9050919050565b600060208201905081810360008301526127e4816122bb565b9050919050565b6000602082019050818103600083015261280481612355565b9050919050565b60006020820190508181036000830152612824816123bb565b9050919050565b60006040820190506128406000830185612421565b61284d6020830184612421565b9392505050565b60006060820190506128696000830186612421565b6128766020830185612421565b6128836040830184612421565b949350505050565b6000604051905081810181811067ffffffffffffffff821117156128ae57600080fd5b8060405250919050565b600067ffffffffffffffff8211156128cf57600080fd5b602082029050919050565b600067ffffffffffffffff8211156128f157600080fd5b602082029050919050565b600067ffffffffffffffff82111561291357600080fd5b602082029050919050565b600067ffffffffffffffff82111561293557600080fd5b602082029050919050565b600067ffffffffffffffff82111561295757600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561298357600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060029050919050565b600060029050919050565b600060029050919050565b600060049050919050565b600060099050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612ae382612b20565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612b5582612b5c565b9050919050565b6000612b6782612b6e565b9050919050565b6000612b7982612b20565b9050919050565b82818337600083830152505050565b60005b83811015612bad578082015181840152602081019050612b92565b83811115612bbc576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612be681612ad8565b8114612bf157600080fd5b50565b612bfd81612aea565b8114612c0857600080fd5b50565b612c1481612b40565b8114612c1f57600080fd5b5056fea365627a7a7231582015c071139d561376dc726ac2a4746c70b465ba5933ab1663b55ed1c13980d2086c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file +6080604052600080553480156200001557600080fd5b5060405162003d3338038062003d3383398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b61312b8062000c086000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611e77565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612c43565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611d92565b61031e565b604051610114929190612cb8565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611d92565b61039a565b6040516101519190612a4d565b60405180910390f35b610174600480360361016f9190810190611dbc565b6103c2565b005b34801561018257600080fd5b5061019d60048036036101989190810190611ef2565b6105e8565b6040516101aa9190612a4d565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611d17565b610654565b6040516101e79190612a68565b60405180910390f35b3480156101fc57600080fd5b50610205610668565b60405161021493929190612ce1565b60405180910390f35b34801561022957600080fd5b5061023261068b565b60405161023f919061298a565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806106b1565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c090612b03565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103af57fe5b602002015190508060001b915050919050565b6103ca611999565b6103d585848361086c565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106103fd57fe5b60200201518560016002811061040f57fe5b60200201518c8c8c8a60405160200161042e9796959493929190612910565b60405160208183030381529060405260405161044a91906128e4565b602060405180830381855afa158015610467573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061048a9190810190611ea0565b90506104de8660006004811061049c57fe5b6020020151876001600481106104ae57fe5b6020020151886002600481106104c057fe5b6020020151896003600481106104d257fe5b60200201518986610a55565b61051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051490612be3565b60405180910390fd5b61052989898987610b2c565b610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612b83565b60405180910390fd5b610570611999565b61057a8582610d33565b60006105866002610d8f565b905061059181610e04565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7600054828685896040516105ca959493929190612c5e565b60405180910390a16105db86610e45565b5050505050505050505050565b60006002831061062d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062490612a83565b60405180910390fd5b600082846002800101600a811061064057fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106106e357fe5b018190555060006002600560020a816106f857fe5b0490505b600081111561086857606060026040519080825280602002602001820160405280156107375781602001602082028038833980820191505090505b5090508260001c8160008151811061074b57fe5b6020026020010181815250508260001c8160018151811061076857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016107cf9190612a2b565b60206040518083038186803b1580156107e757600080fd5b505afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061081f9190810190611ec9565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f811061084f57fe5b01819055506002838161085e57fe5b04925050506106fc565b5050565b610875826111fd565b6108b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ab90612b23565b60405180910390fd5b60008090505b60028110156109825760006108cf82856105e8565b90506005600082815260200190815260200160002060009054906101000a900460ff1615610932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092990612aa3565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061096b57fe5b6020020181815250505080806001019150506108ba565b5060006002828560405160200161099a9291906128b8565b6040516020818303038152906040526040516109b691906128e4565b602060405180830381855afa1580156109d3573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109f69190810190611ea0565b9050600381901c90506000610a0a8461039a565b9050808214610a4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4590612b43565b60405180910390fd5b5050505050565b6000610a5f6119bb565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ada57fe5b602002015181600060058110610aec57fe5b6020020151148015610b1f575080600360058110610b0657fe5b602002015181600160058110610b1857fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b5a6119dd565b86600060028110610b6757fe5b602002015181600001818152505086600160028110610b8257fe5b602002015181602001818152505085600060048110610b9d57fe5b602002015181604001818152505085600160048110610bb857fe5b602002015181606001818152505085600260048110610bd357fe5b602002015181608001818152505085600360048110610bee57fe5b60200201518160a001818152505084600060028110610c0957fe5b60200201518160c001818152505084600160028110610c2457fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c715781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d1857838682600a8110610c9d57fe5b602002015110610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612bc3565b60405180910390fd5b8581600a8110610cee57fe5b6020020151828281518110610cff57fe5b6020026020010181815250508080600101915050610c7a565b50610d2381836112e8565b6001149350505050949350505050565b60008090505b6002811015610d8a5760008382600201600a8110610d5357fe5b602002015160001b905080838360028110610d6a57fe5b602002018181525050610d7c81610248565b508080600101915050610d39565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dd857610dbe818385611604565b809450819350505060028181610dd057fe5b049050610daa565b60016000805481526020019081526020016000206000603f8110610df857fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e518361031e565b915091506000821115610f9857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f50576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f18939291906129a5565b600060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b5050505050610f93565b813414610f92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990612ba3565b60405180910390fd5b5b611050565b600034111561104f5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fc7906128fb565b60006040518083038185875af1925050503d8060008114611004576040519150601f19603f3d011682016040523d82523d6000602084013e611009565b606091505b505090508061104d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104490612ac3565b60405180910390fd5b505b5b60008111156111f857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016111119291906129ef565b600060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b50505050506111f7565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161116f906128fb565b60006040518083038185875af1925050503d80600081146111ac576040519150601f19603f3d011682016040523d82523d6000602084013e6111b1565b606091505b50509050806111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612ae3565b60405180910390fd5b505b5b505050565b6000806000905060008090505b60005481116112dc57600460008281526020019081526020016000206000856000600a811061123557fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112675781806001019250505b600460008281526020019081526020016000206000856001600a811061128957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112bb5781806001019250505b60028214156112cf576001925050506112e3565b808060010191505061120a565b5060009150505b919050565b60006007600a0180549050600184510114611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f90612b63565b60405180910390fd5b611340611a22565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156113c957835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf180821688169750505060028401935060208301925061137a565b50505050508061140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140590612c23565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f192505050806115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115df90612c03565b60405180910390fd5b816000601881106115f557fe5b60200201519250505092915050565b6000806000600186039050600060011986168201905060008060018716146117c5576001868401039050606060026040519080825280602002602001820160405280156116605781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061168257fe5b015460001c8160008151811061169457fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f81106116c257fe5b015460001c816001815181106116d457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161173b9190612a2b565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061178b9190810190611ec9565b60001b6001600080548152602001908152602001600020600260018503816117af57fe5b04603f81106117ba57fe5b0181905550506117cb565b85830190505b5b81811115611971576002810390506060600260405190808252806020026020018201604052801561180c5781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061182e57fe5b015460001c8160008151811061184057fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f811061186e57fe5b015460001c8160018151811061188057fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016118e79190612a2b565b60206040518083038186803b1580156118ff57600080fd5b505afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119379190810190611ec9565b60001b60016000805481526020019081526020016000206002600185038161195b57fe5b04603f811061196657fe5b0181905550506117cc565b6002878161197b57fe5b046002600188018161198957fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611a54816130a3565b92915050565b600082601f830112611a6b57600080fd5b6002611a7e611a7982612d45565b612d18565b9150818360005b83811015611ab55781358601611a9b8882611c45565b845260208401935060208301925050600181019050611a85565b5050505092915050565b600082601f830112611ad057600080fd5b600a611ae3611ade82612d67565b612d18565b91508183856020840282011115611af957600080fd5b60005b83811015611b295781611b0f8882611ced565b845260208401935060208301925050600181019050611afc565b5050505092915050565b600082601f830112611b4457600080fd5b6002611b57611b5282612d89565b612d18565b91508183856020840282011115611b6d57600080fd5b60005b83811015611b9d5781611b838882611ced565b845260208401935060208301925050600181019050611b70565b5050505092915050565b600082601f830112611bb857600080fd5b6004611bcb611bc682612dab565b612d18565b91508183856020840282011115611be157600080fd5b60005b83811015611c115781611bf78882611ced565b845260208401935060208301925050600181019050611be4565b5050505092915050565b600081359050611c2a816130ba565b92915050565b600081519050611c3f816130ba565b92915050565b600082601f830112611c5657600080fd5b8135611c69611c6482612dcd565b612d18565b91508082526020830160208301858383011115611c8557600080fd5b611c90838284613046565b50505092915050565b600082601f830112611caa57600080fd5b8135611cbd611cb882612df9565b612d18565b91508082526020830160208301858383011115611cd957600080fd5b611ce4838284613046565b50505092915050565b600081359050611cfc816130d1565b92915050565b600081519050611d11816130d1565b92915050565b60008060008060808587031215611d2d57600080fd5b6000611d3b87828801611a45565b9450506020611d4c87828801611a45565b9350506040611d5d87828801611ced565b925050606085013567ffffffffffffffff811115611d7a57600080fd5b611d8687828801611c99565b91505092959194509250565b60006101408284031215611da557600080fd5b6000611db384828501611abf565b91505092915050565b6000806000806000806000610300888a031215611dd857600080fd5b6000611de68a828b01611b33565b9750506040611df78a828b01611ba7565b96505060c0611e088a828b01611b33565b955050610100611e1a8a828b01611ba7565b945050610180611e2c8a828b01611ced565b9350506101a0611e3e8a828b01611abf565b9250506102e088013567ffffffffffffffff811115611e5c57600080fd5b611e688a828b01611a5a565b91505092959891949750929550565b600060208284031215611e8957600080fd5b6000611e9784828501611c1b565b91505092915050565b600060208284031215611eb257600080fd5b6000611ec084828501611c30565b91505092915050565b600060208284031215611edb57600080fd5b6000611ee984828501611d02565b91505092915050565b6000806101608385031215611f0657600080fd5b6000611f1485828601611ced565b9250506020611f2585828601611abf565b9150509250929050565b6000611f3b8383612247565b60208301905092915050565b6000611f538383612265565b60208301905092915050565b6000611f6b83836122b4565b905092915050565b6000611f7f8383612874565b60208301905092915050565b6000611f978383612892565b60208301905092915050565b611fac81613010565b82525050565b611fbb81612f9e565b82525050565b611fca81612e67565b611fd48184612f0d565b9250611fdf82612e25565b8060005b83811015612010578151611ff78782611f2f565b965061200283612ebf565b925050600181019050611fe3565b505050505050565b61202181612e67565b61202b8184612f18565b925061203682612e25565b8060005b8381101561206757815161204e8782611f47565b965061205983612ebf565b92505060018101905061203a565b505050505050565b600061207a82612e72565b6120848185612f23565b93508360208202850161209685612e2f565b8060005b858110156120d257848403895281516120b38582611f5f565b94506120be83612ecc565b925060208a0199505060018101905061209a565b50829750879550505050505092915050565b6120ed81612e7d565b6120f78184612f2e565b925061210282612e39565b8060005b8381101561213357815161211a8782611f8b565b965061212583612ed9565b925050600181019050612106565b505050505050565b61214481612e88565b61214e8184612f39565b925061215982612e43565b8060005b8381101561218a5781516121718782611f8b565b965061217c83612ee6565b92505060018101905061215d565b505050505050565b61219b81612e93565b6121a58184612f44565b92506121b082612e4d565b8060005b838110156121e15781516121c88782611f8b565b96506121d383612ef3565b9250506001810190506121b4565b505050505050565b60006121f482612e9e565b6121fe8185612f4f565b935061220983612e57565b8060005b8381101561223a5781516122218882611f73565b975061222c83612f00565b92505060018101905061220d565b5085935050505092915050565b61225081612fb0565b82525050565b61225f81612fb0565b82525050565b61226e81612fb0565b82525050565b61227d81612fba565b82525050565b600061228e82612eb4565b6122988185612f82565b93506122a8818560208601613055565b80840191505092915050565b60006122bf82612ea9565b6122c98185612f60565b93506122d9818560208601613055565b6122e281613092565b840191505092915050565b60006122f882612ea9565b6123028185612f82565b9350612312818560208601613055565b80840191505092915050565b600061232b601883612f8d565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061236b603783612f8d565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b60006123d1601e83612f8d565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612411601883612f8d565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612451602783612f8d565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124b7602583612f8d565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061251d604983612f8d565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006125a9602283612f8d565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061260f603383612f8d565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b6000612675602a83612f8d565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b60006126db601c83612f8d565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b600061271b603b83612f8d565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b6000612781600083612f71565b9150600082019050919050565b600061279b600083612f82565b9150600082019050919050565b60006127b5603783612f8d565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b600061281b603983612f8d565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61287d81613006565b82525050565b61288c81613006565b82525050565b61289b81613006565b82525050565b6128b26128ad82613006565b613088565b82525050565b60006128c48285612018565b6040820191506128d48284612192565b6080820191508190509392505050565b60006128f08284612283565b915081905092915050565b60006129068261278e565b9150819050919050565b600061291c828a6128a1565b60208201915061292c82896122ed565b915061293882886122ed565b9150612944828761213b565b6040820191506129548286612192565b608082019150612964828561213b565b60408201915061297482846120e4565b6101408201915081905098975050505050505050565b600060208201905061299f6000830184611fb2565b92915050565b60006080820190506129ba6000830186611fa3565b6129c76020830185611fb2565b6129d46040830184612883565b81810360608301526129e581612774565b9050949350505050565b6000606082019050612a046000830185611fa3565b612a116020830184612883565b8181036040830152612a2281612774565b90509392505050565b60006020820190508181036000830152612a4581846121e9565b905092915050565b6000602082019050612a626000830184612256565b92915050565b6000602082019050612a7d6000830184612274565b92915050565b60006020820190508181036000830152612a9c8161231e565b9050919050565b60006020820190508181036000830152612abc8161235e565b9050919050565b60006020820190508181036000830152612adc816123c4565b9050919050565b60006020820190508181036000830152612afc81612404565b9050919050565b60006020820190508181036000830152612b1c81612444565b9050919050565b60006020820190508181036000830152612b3c816124aa565b9050919050565b60006020820190508181036000830152612b5c81612510565b9050919050565b60006020820190508181036000830152612b7c8161259c565b9050919050565b60006020820190508181036000830152612b9c81612602565b9050919050565b60006020820190508181036000830152612bbc81612668565b9050919050565b60006020820190508181036000830152612bdc816126ce565b9050919050565b60006020820190508181036000830152612bfc8161270e565b9050919050565b60006020820190508181036000830152612c1c816127a8565b9050919050565b60006020820190508181036000830152612c3c8161280e565b9050919050565b6000602082019050612c586000830184612883565b92915050565b600060e082019050612c736000830188612883565b612c806020830187612256565b612c8d6040830186611fc1565b612c9a6080830185611fc1565b81810360c0830152612cac818461206f565b90509695505050505050565b6000604082019050612ccd6000830185612883565b612cda6020830184612883565b9392505050565b6000606082019050612cf66000830186612883565b612d036020830185612883565b612d106040830184612883565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612d3b57600080fd5b8060405250919050565b600067ffffffffffffffff821115612d5c57600080fd5b602082029050919050565b600067ffffffffffffffff821115612d7e57600080fd5b602082029050919050565b600067ffffffffffffffff821115612da057600080fd5b602082029050919050565b600067ffffffffffffffff821115612dc257600080fd5b602082029050919050565b600067ffffffffffffffff821115612de457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612e1057600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612fa982612fe6565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061301b82613022565b9050919050565b600061302d82613034565b9050919050565b600061303f82612fe6565b9050919050565b82818337600083830152505050565b60005b83811015613073578082015181840152602081019050613058565b83811115613082576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6130ac81612f9e565b81146130b757600080fd5b50565b6130c381612fb0565b81146130ce57600080fd5b50565b6130da81613006565b81146130e557600080fd5b5056fea365627a7a723158200681dad9a2468c04d3031ae3856b4cd273e5060b0dcbefd4ceea6ed749f9fe746c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file diff --git a/contract/Groth16Mixer.py b/contract/Groth16Mixer.py index 495b239..62e27b1 100644 --- a/contract/Groth16Mixer.py +++ b/contract/Groth16Mixer.py @@ -1,15 +1,16 @@ # template for codegen +from eth_utils import to_checksum_address + from python_web3.client.bcosclient import ( BcosClient ) from python_web3.client.datatype_parser import DatatypeParser import json -from eth_utils import to_checksum_address class Groth16Mixer: # name of abi address = None - contract_abi_string = '''[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event", "topic": "0xd44da6836c8376d1693e8b9cacf1c39b9bed3599164ad6d8e60902515f83938e"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event", "topic": "0x05e46912c9be87d8a6830598db8544b61884d9d22f3921597a9a6e8a340914b3"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event", "topic": "0x5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}]''' + contract_abi_string = '''[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "address", "name": "poseidonAddress", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event", "topic": "0xd44da6836c8376d1693e8b9cacf1c39b9bed3599164ad6d8e60902515f83938e"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event", "topic": "0x05e46912c9be87d8a6830598db8544b61884d9d22f3921597a9a6e8a340914b3"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event", "topic": "0x5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}]''' contract_abi = None data_parser = DatatypeParser() client = None diff --git a/contract/Poseidon.py b/contract/Poseidon.py new file mode 100644 index 0000000..d86a176 --- /dev/null +++ b/contract/Poseidon.py @@ -0,0 +1,32 @@ +# template for codegen +from python_web3.client.bcosclient import ( + BcosClient +) +from python_web3.client.datatype_parser import DatatypeParser +import json + + +class Poseidon: # name of abi + address = None + contract_abi_string = '''[{"constant": true, "inputs": [{"internalType": "uint256[]", "name": "input", "type": "uint256[]"}], "name": "poseidon", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}]''' + contract_abi = None + data_parser = DatatypeParser() + client = None + + def __init__(self, address): + self.client = BcosClient() + self.address = address + self.contract_abi = json.loads(self.contract_abi_string) + self.data_parser.set_abi(self.contract_abi) + + def deploy(self, contract_bin_file): + result = self.client.deployFromFile(contract_bin_file) + self.address = result["contractAddress"] + return result + + # ------------------------------------------ + def poseidon(self, input): + func_name = 'poseidon' + args = [input] + result = self.client.call(self.address, self.contract_abi, func_name, args) + return result diff --git a/contract/mixer/BaseMixer.sol b/contract/mixer/BaseMixer.sol index 467a75e..3c61311 100644 --- a/contract/mixer/BaseMixer.sol +++ b/contract/mixer/BaseMixer.sol @@ -5,7 +5,7 @@ pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; -import "./MerkleTreeMiMC7.sol"; +import "./MerkleTreePos.sol"; // Declare the BAC001 interface in order to handle BAC001 tokens transfers to and // from the Mixer. Note that we only declare the functions we are interested in, @@ -24,7 +24,7 @@ contract BAC001Holder { // BaseMixer implements the functions shared across all Mixers (regardless which // zkSNARK is used) -contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { +contract BaseMixer is MerkleTreePos, BAC001Holder { // The roots of the different updated trees mapping(uint => mapping(bytes32 => bool)) roots; @@ -112,7 +112,7 @@ contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { event LogDebug(string message); // Constructor - constructor(uint256 depth, address token_address) MerkleTreeMiMC7(depth) + constructor(uint256 depth, address token_address, address poseidonAddress) MerkleTreePos(depth,poseidonAddress) public { bytes32 initialRoot = nodesWithMid[0][0]; roots[0][initialRoot] = true; @@ -209,17 +209,19 @@ contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { // residual bits and remove any extra bits (due to the padding) They // correspond to the (digest_length - field_capacity) least significant // bits of hsig in big endian - bytes32 hsig_bytes = - (bytes32(primary_inputs[2 + jsOut + nb_hash_digests]) << padding_size + - 2*public_value_length) >> field_capacity; +// bytes32 hsig_bytes = +// (bytes32(primary_inputs[2 + jsOut + nb_hash_digests]) << padding_size + +// 2*public_value_length) >> field_capacity // We retrieve the field element corresponding to the `field_capacity` // most significant bits of hsig We remove the left padding due to // casting `field_capacity` bits into a bytes32 We reassemble hsig by // adding the values - uint256 high_bits = uint( - primary_inputs[2 + jsIn + jsOut] << (digest_length - field_capacity)); - hsig = bytes32(high_bits + uint(hsig_bytes)); +// uint256 high_bits = uint( +// primary_inputs[2 + jsIn + jsOut] << (digest_length - field_capacity)); + + uint256 high_bits = uint(primary_inputs[2 + jsIn + jsOut] ); + hsig = bytes32(high_bits); } // This function is used to reassemble the nullifiers given the nullifier @@ -240,19 +242,19 @@ contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { // We compute the nullifier's residual bits index and check the 1st // f.e. indeed comprises it. See the way the residual bits are ordered // in the extended proof - uint256 nf_bit_index = - 2*public_value_length + (1 + index) * packing_residue_length; - require( - field_capacity >= nf_bit_index + packing_residue_length, - "nullifier written in different residual bit f.e." - ); +// uint256 nf_bit_index = +// 2*public_value_length + (1 + index) * packing_residue_length; +// require( +// field_capacity >= nf_bit_index + packing_residue_length, +// "nullifier written in different residual bit f.e." +// ); // We retrieve nf's residual bits and remove any extra bits (due to the // padding). They correspond to the (digest_length - field_capacity) // least significant bits of nf in big endian - bytes32 nf_bytes = ( - bytes32(primary_inputs[2 + jsOut + nb_hash_digests]) - << (padding_size + nf_bit_index)) >> field_capacity; +// bytes32 nf_bytes = +// bytes32(primary_inputs[2 + jsOut + nb_hash_digests]); +// << (padding_size + nf_bit_index)) >> field_capacity; // We offset the nullifier index by the number of values preceding the // nullifiers in the primary inputs: the root (1) and the cms (jsOut) @@ -260,9 +262,12 @@ contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { // most significant bits of nf. We remove the left padding due to // casting `field_capacity` bits into a bytes32. We reassemble nf by // adding the values. - uint256 high_bits = uint( - primary_inputs[2 + jsOut + index] << (digest_length - field_capacity)); - nf = bytes32(high_bits + uint(nf_bytes)); +// uint256 high_bits = uint( +// primary_inputs[2 + jsOut + index] << (digest_length - field_capacity)); + + uint256 high_bits = uint( + primary_inputs[2 + jsOut + index]); + nf = bytes32(high_bits); } // This function processes the primary inputs to append and check the root @@ -297,6 +302,9 @@ contract BaseMixer is MerkleTreeMiMC7, BAC001Holder { // they are equal (i.e. that h_sig re-assembled was correctly generated // from vk). bytes32 expected_hsig = sha256(abi.encodePacked(nfs, vk)); + + expected_hsig = expected_hsig >> 3; + bytes32 hsig = assemble_hsig(primary_inputs); require( expected_hsig == hsig, diff --git a/contract/mixer/Groth16Mixer.sol b/contract/mixer/Groth16Mixer.sol index fe5e5a3..ef82c8c 100644 --- a/contract/mixer/Groth16Mixer.sol +++ b/contract/mixer/Groth16Mixer.sol @@ -45,13 +45,14 @@ contract Groth16Mixer is BaseMixer { constructor( uint256 mk_depth, address token, + address poseidonAddress, uint256[2] memory Alpha, uint256[2] memory Beta1, uint256[2] memory Beta2, uint256[2] memory Delta1, uint256[2] memory Delta2, uint256[] memory ABC_coords) - BaseMixer(mk_depth, token) + BaseMixer(mk_depth, token, poseidonAddress) public { verifyKey.Alpha = Pairing.G1Point(Alpha[0], Alpha[1]); verifyKey.Beta = Pairing.G2Point(Beta1[0], Beta1[1], Beta2[0], Beta2[1]); diff --git a/contract/mixer/MerkleTreePos.sol b/contract/mixer/MerkleTreePos.sol new file mode 100644 index 0000000..394c1a0 --- /dev/null +++ b/contract/mixer/MerkleTreePos.sol @@ -0,0 +1,193 @@ +// Copyright (c) 2015-2020 Clearmatics Technologies Ltd +// +// SPDX-License-Identifier: LGPL-3.0+ + +pragma solidity ^0.5.0; + +import "./Poseidon.sol"; + +// The Merkle tree implementation must trade-off complexity, storage, +// initialization cost, and update & root computation cost. +// +// This implementation stores all leaves and nodes, skipping those that have +// not been populated yet. The final entry in each layer stores that layer's +// default value. +contract MerkleTreePos +{ + uint256 constant MASK_LS_BIT = ~uint256(1); + + constructor(uint256 treeDepth, address poseidon) public + { + // Constructor + poseidonAddress = poseidon; + require ( + treeDepth == DEPTH, + "Invalid depth in BaseMerkleTree"); + initializeTree(); + } + + function recomputeRoot(uint num_new_leaves) internal returns (bytes32) + { + // Assume `num_new_leaves` have been written into the leaf slots. + // Update any affected nodes in the tree, up to the root, using the + // default values for any missing nodes. + + uint256 end_idx = num_leaves; + uint256 start_idx = num_leaves - num_new_leaves; + uint256 layer_size = MAX_NUM_LEAVES; + + while (layer_size > 1) { + (start_idx, end_idx) = + recomputeParentLayer(layer_size, start_idx, end_idx); + layer_size = layer_size / 2; + } + + return nodesWithMid[mid][0]; + } + + // Recompute nodes in the parent layer that are affected by entries + // [child_start_idx, child_end_idx[ in the child layer. If + // `child_end_idx` is required in the calculation, the final entry of + // the child layer is used (since this contains the default entry for + // the layer if the tree is not full). + // + // / \ / \ / \ + // Parent: ? ? F G H 0 + // / \ / \ / \ / \ / \ / \ + // Child: ? ? ? ? A B C D E ? ? 0 + // ^ ^ + // child_start_idx child_end_idx + // + // Returns the start and end indices (within the parent layer) of touched + // parent nodes. + function recomputeParentLayer( + uint256 child_layer_size, + uint256 child_start_idx, + uint256 child_end_idx) + private + returns (uint256, uint256) + { + uint256 child_layer_start = child_layer_size - 1; + + + // Start at the right and iterate left, so we only execute the + // default_value logic once. child_left_idx_rend (reverse-end) is the + // smallest value of child_left_idx at which we should recompute the + // parent node hash. + + uint256 child_left_idx_rend = + child_layer_start + (child_start_idx & MASK_LS_BIT); + + // If child_end_idx is odd, it is the RIGHT of a computation we need to + // make. Do the computation using the default value, and move to the + // next pair (on the left). Otherwise, we have a fully populated pair. + + //-----------fix------------// + uint256 child_left_idx; + if ((child_end_idx & 1) != 0) { + child_left_idx = child_layer_start + child_end_idx - 1; + uint256[] memory input = new uint[](2); + input[0] = uint256(nodesWithMid[mid][child_left_idx]); + input[1] = uint256(nodesWithMid[mid][2 * child_layer_start]); + + nodesWithMid[mid][(child_left_idx - 1) / 2] = bytes32(Poseidon(poseidonAddress).poseidon(input)); + } else { + child_left_idx = child_layer_start + child_end_idx; + } + + // At this stage, pairs are all populated. Compute until we reach + // child_left_idx_rend. + + while (child_left_idx > child_left_idx_rend) { + child_left_idx = child_left_idx - 2; + uint256[] memory input = new uint[](2); + input[0] = uint256(nodesWithMid[mid][child_left_idx]); + input[1] = uint256(nodesWithMid[mid][child_left_idx + 1]); + + nodesWithMid[mid][(child_left_idx - 1) / 2] = bytes32(Poseidon(poseidonAddress).poseidon(input)); + } + + return (child_start_idx / 2, (child_end_idx + 1) / 2); + } + + + //----------------------basemerkeltree--------------------// + // cpp prover) + uint256 constant DEPTH = 5; + + // Number of leaves + uint256 constant MAX_NUM_LEAVES = 2**DEPTH; + + // Number of nodes + uint constant MAX_NUM_NODES = (MAX_NUM_LEAVES * 2) - 1; + + bytes32 constant DEFAULT_LEAF_VALUE = 0x0; + + // Array containing the 2^(depth) leaves of the merkle tree. We can switch + // the leaves to be of type bytes and not bytes32 to support digest of + // various size (eg: if we use different hash functions). That way we'd + // have a merkle tree for any type of hash function (that can be implemented + // as a precompiled contract for instance) + // + // Leaves is a 2D array + + // Sparse array of populated leaves of the merkle tree. Unpopulated leaves + // have the DEFAULT_LEAF_VALUE. + uint public mid = 0; +// bytes32[MAX_NUM_NODES] nodes; + mapping(uint => bytes32[MAX_NUM_NODES]) nodesWithMid; + // Number of leaves populated in `nodes`. + uint256 num_leaves; + address poseidonAddress; + + // Debug only + event LogDebug(bytes32 message); + + + function initializeTree() internal + { + // First layer + bytes32 default_value = DEFAULT_LEAF_VALUE; + + nodesWithMid[mid][2 * MAX_NUM_LEAVES - 2] = default_value; + uint256 layer_size = MAX_NUM_LEAVES / 2; + + + // Subsequent layers + while (layer_size > 0) { + uint256[] memory input = new uint[](2); + input[0] = uint256(default_value); + input[1] = uint256(default_value); + default_value = bytes32(Poseidon(poseidonAddress).poseidon(input)); + uint256 layer_final_entry_idx = 2 * layer_size - 2; + nodesWithMid[mid][layer_final_entry_idx] = default_value; + layer_size = layer_size / 2; + } + } + + // Appends a commitment to the tree, and returns its address + function insert(bytes32 commitment) public { + + // If this require fails => the merkle tree is full, we can't append + // leaves anymore. + if( num_leaves==MAX_NUM_LEAVES) { + mid = mid+1; + num_leaves = num_leaves % MAX_NUM_LEAVES; + initializeTree(); + } + + require( + num_leaves < MAX_NUM_LEAVES, + "Merkle tree full: Cannot append anymore" + ); + + // Address of the next leaf is the current number of leaves (before + // insertion). Compute the next index in the full set of nodes, and + // write. + + uint256 next_address = num_leaves; + ++num_leaves; + uint256 next_entry_idx = (MAX_NUM_LEAVES - 1) + next_address; + nodesWithMid[mid][next_entry_idx] = commitment; + } +} diff --git a/contract/mixer/Poseidon.sol b/contract/mixer/Poseidon.sol new file mode 100644 index 0000000..a88de4b --- /dev/null +++ b/contract/mixer/Poseidon.sol @@ -0,0 +1,5 @@ +pragma solidity ^0.5.0; + +contract Poseidon { + function poseidon(uint256[] memory input) public pure returns(uint256) ; +} \ No newline at end of file diff --git a/contract/mixer/abi/Groth16Mixer.abi b/contract/mixer/abi/Groth16Mixer.abi index 663498b..94b0783 100644 --- a/contract/mixer/abi/Groth16Mixer.abi +++ b/contract/mixer/abi/Groth16Mixer.abi @@ -1 +1 @@ -[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}] \ No newline at end of file +[{"inputs": [{"internalType": "uint256", "name": "mk_depth", "type": "uint256"}, {"internalType": "address", "name": "token", "type": "address"}, {"internalType": "address", "name": "poseidonAddress", "type": "address"}, {"internalType": "uint256[2]", "name": "Alpha", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Beta2", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta1", "type": "uint256[2]"}, {"internalType": "uint256[2]", "name": "Delta2", "type": "uint256[2]"}, {"internalType": "uint256[]", "name": "ABC_coords", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "message", "type": "string"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "bytes32", "name": "message", "type": "bytes32"}], "name": "LogDebug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "mid", "type": "uint256"}, {"indexed": false, "internalType": "bytes32", "name": "root", "type": "bytes32"}, {"indexed": false, "internalType": "bytes32[2]", "name": "nullifiers", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes32[2]", "name": "commitments", "type": "bytes32[2]"}, {"indexed": false, "internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "LogMix", "type": "event"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_hsig", "outputs": [{"internalType": "bytes32", "name": "hsig", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_nullifier", "outputs": [{"internalType": "bytes32", "name": "nf", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}], "name": "assemble_public_values", "outputs": [{"internalType": "uint256", "name": "vpub_in", "type": "uint256"}, {"internalType": "uint256", "name": "vpub_out", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "get_constants", "outputs": [{"internalType": "uint256", "name": "js_in", "type": "uint256"}, {"internalType": "uint256", "name": "js_out", "type": "uint256"}, {"internalType": "uint256", "name": "num_inputs", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes32", "name": "commitment", "type": "bytes32"}], "name": "insert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256[2]", "name": "a", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "b", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "c", "type": "uint256[2]"}, {"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256", "name": "sigma", "type": "uint256"}, {"internalType": "uint256[10]", "name": "input", "type": "uint256[10]"}, {"internalType": "bytes[2]", "name": "ciphertexts", "type": "bytes[2]"}], "name": "mix", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint256", "name": "", "type": "uint256"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "onBAC001Received", "outputs": [{"internalType": "bytes4", "name": "", "type": "bytes4"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}] \ No newline at end of file diff --git a/contract/mixer/abi/Groth16Mixer.bin b/contract/mixer/abi/Groth16Mixer.bin index a2be301..87736b4 100644 --- a/contract/mixer/abi/Groth16Mixer.bin +++ b/contract/mixer/abi/Groth16Mixer.bin @@ -1 +1 @@ -6080604052600080553480156200001557600080fd5b506040516200393b3803806200393b83398181016040526200003b9190810190620006cf565b878781806005811462000085576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007c9062000904565b60405180910390fd5b50620000966200042960201b60201c565b506000600160008081526020019081526020016000206000603f8110620000b957fe5b01549050600160036000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd1062000183576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200017a90620008c0565b60405180910390fd5b60fd6002800260010160fd610100030260406002020110620001dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001d390620008e2565b60405180910390fd5b505050604051806040016040528087600060028110620001f857fe5b60200201518152602001876001600281106200021057fe5b6020020151815250600660000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200024d57fe5b60200201518152602001866001600281106200026557fe5b60200201518152602001856000600281106200027d57fe5b60200201518152602001856001600281106200029557fe5b6020020151815250600660020160008201518160000155602082015181600101556040820151816002015560608201518160030155905050604051806080016040528084600060028110620002e657fe5b6020020151815260200184600160028110620002fe57fe5b60200201518152602001836000600281106200031657fe5b60200201518152602001836001600281106200032e57fe5b6020020151815250600680016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b60028251816200037757fe5b046006600a0180549050146200041a576006600a016040518060400160405280848481518110620003a457fe5b60200260200101518152602001846001850181518110620003c157fe5b60200260200101518152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050506002810190506200036b565b50505050505050505062000a23565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106200045c57fe5b018190555060006002600560020a816200047257fe5b0490505b6000811115620004df57620004978283620004e360201b620011e91760201c565b9150600060028260020203905082600160008054815260200190815260200160002082603f8110620004c557fe5b018190555060028281620004d557fe5b0491505062000476565b5050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a8112156200057e57602060002080600052868688838808089350868485099250868488858a878809090994505060018101905062000543565b508484868a8888880808089550505050505092915050565b600081519050620005a781620009ef565b92915050565b600082601f830112620005bf57600080fd5b6002620005d6620005d08262000954565b62000926565b91508183856020840282011115620005ed57600080fd5b60005b83811015620006215781620006068882620006b8565b845260208401935060208301925050600181019050620005f0565b5050505092915050565b600082601f8301126200063d57600080fd5b8151620006546200064e8262000977565b62000926565b915081818352602084019350602081019050838560208402820111156200067a57600080fd5b60005b83811015620006ae5781620006938882620006b8565b8452602084019350602083019250506001810190506200067d565b5050505092915050565b600081519050620006c98162000a09565b92915050565b6000806000806000806000806101a0898b031215620006ed57600080fd5b6000620006fd8b828c01620006b8565b9850506020620007108b828c0162000596565b9750506040620007238b828c01620005ad565b9650506080620007368b828c01620005ad565b95505060c0620007498b828c01620005ad565b9450506101006200075d8b828c01620005ad565b935050610140620007718b828c01620005ad565b92505061018089015167ffffffffffffffff8111156200079057600080fd5b6200079e8b828c016200062b565b9150509295985092959890939650565b6000620007bd602d83620009a0565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b600062000825602b83620009a0565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b60006200088d601f83620009a0565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b60006020820190508181036000830152620008db81620007ae565b9050919050565b60006020820190508181036000830152620008fd8162000816565b9050919050565b600060208201905081810360008301526200091f816200087e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156200094a57600080fd5b8060405250919050565b600067ffffffffffffffff8211156200096c57600080fd5b602082029050919050565b600067ffffffffffffffff8211156200098f57600080fd5b602082029050602081019050919050565b600082825260208201905092915050565b6000620009be82620009c5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620009fa81620009b1565b811462000a0657600080fd5b50565b62000a1481620009e5565b811462000a2057600080fd5b50565b612f088062000a336000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611cd7565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612a59565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611bf2565b61031e565b604051610114929190612ace565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611bf2565b61039a565b6040516101519190612843565b60405180910390f35b610174600480360361016f9190810190611c1c565b610417565b005b34801561018257600080fd5b5061019d60048036036101989190810190611d29565b61063d565b6040516101aa9190612843565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611b77565b61075b565b6040516101e7919061285e565b60405180910390f35b3480156101fc57600080fd5b5061020561076f565b60405161021493929190612af7565b60405180910390f35b34801561022957600080fd5b50610232610792565b60405161023f91906127a2565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806107b8565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c0906128f9565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b60008060fd60406002026002800260010160fd6101000302604060020201610100030184600280026001016002800101600a81106103d457fe5b602002015160001b901b901c9050600060fd610100038460028060020101600a81106103fc57fe5b6020020151901b90508160001c810160001b92505050919050565b61041f61180e565b61042a85848361085f565b600060023373ffffffffffffffffffffffffffffffffffffffff168460006002811061045257fe5b60200201518560016002811061046457fe5b60200201518c8c8c8a6040516020016104839796959493929190612728565b60405160208183030381529060405260405161049f91906126fc565b602060405180830381855afa1580156104bc573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506104df9190810190611d00565b9050610533866000600481106104f157fe5b60200201518760016004811061050357fe5b60200201518860026004811061051557fe5b60200201518960036004811061052757fe5b60200201518986610a41565b610572576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610569906129f9565b60405180910390fd5b61057e89898987610b18565b6105bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b490612999565b60405180910390fd5b6105c561180e565b6105cf8582610d1f565b60006105db6002610d7b565b90506105e681610df0565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf76000548286858960405161061f959493929190612a74565b60405180910390a161063086610e31565b5050505050505050505050565b600060028310610682576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067990612879565b60405180910390fd5b600060fd610100038460010102604060020201905060fd61010003810160fd10156106e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d990612919565b60405180910390fd5b600060fd826002800260010160fd6101000302604060020201610100030185600280026001016002800101600a811061071757fe5b602002015160001b901b901c9050600060fd6101000385876002800101600a811061073e57fe5b6020020151901b90508160001c810160001b935050505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106107ea57fe5b018190555060006002600560020a816107ff57fe5b0490505b600081111561085b5761081682836111e9565b9150600060028260020203905082600160008054815260200190815260200160002082603f811061084357fe5b01819055506002828161085257fe5b04915050610803565b5050565b6108688261129a565b6108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90612939565b60405180910390fd5b60008090505b60028110156109755760006108c2828561063d565b90506004600082815260200190815260200160002060009054906101000a900460ff1615610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612899565b60405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061095e57fe5b6020020181815250505080806001019150506108ad565b5060006002828560405160200161098d9291906126d0565b6040516020818303038152906040526040516109a991906126fc565b602060405180830381855afa1580156109c6573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109e99190810190611d00565b905060006109f68461039a565b9050808214610a3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3190612959565b60405180910390fd5b5050505050565b6000610a4b611830565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ac657fe5b602002015181600060058110610ad857fe5b6020020151148015610b0b575080600360058110610af257fe5b602002015181600160058110610b0457fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b46611852565b86600060028110610b5357fe5b602002015181600001818152505086600160028110610b6e57fe5b602002015181602001818152505085600060048110610b8957fe5b602002015181604001818152505085600160048110610ba457fe5b602002015181606001818152505085600260048110610bbf57fe5b602002015181608001818152505085600360048110610bda57fe5b60200201518160a001818152505084600060028110610bf557fe5b60200201518160c001818152505084600160028110610c1057fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c5d5781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d0457838682600a8110610c8957fe5b602002015110610cce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc5906129d9565b60405180910390fd5b8581600a8110610cda57fe5b6020020151828281518110610ceb57fe5b6020026020010181815250508080600101915050610c66565b50610d0f8183611385565b6001149350505050949350505050565b60008090505b6002811015610d765760008382600201600a8110610d3f57fe5b602002015160001b905080838360028110610d5657fe5b602002018181525050610d6881610248565b508080600101915050610d25565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dc457610daa8183856116a1565b809450819350505060028181610dbc57fe5b049050610d96565b60016000805481526020019081526020016000206000603f8110610de457fe5b01549350505050919050565b60016003600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e3d8361031e565b915091506000821115610f8457600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3c576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f04939291906127bd565b600060405180830381600087803b158015610f1e57600080fd5b505af1158015610f32573d6000803e3d6000fd5b5050505050610f7f565b813414610f7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f75906129b9565b60405180910390fd5b5b61103c565b600034111561103b5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fb390612713565b60006040518083038185875af1925050503d8060008114610ff0576040519150601f19603f3d011682016040523d82523d6000602084013e610ff5565b606091505b5050905080611039576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611030906128b9565b60405180910390fd5b505b5b60008111156111e457600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611135576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016110fd929190612807565b600060405180830381600087803b15801561111757600080fd5b505af115801561112b573d6000803e3d6000fd5b50505050506111e3565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161115b90612713565b60006040518083038185875af1925050503d8060008114611198576040519150601f19603f3d011682016040523d82523d6000602084013e61119d565b606091505b50509050806111e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d8906128d9565b60405180910390fd5b505b5b505050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a81121561128257602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050611249565b508484868a8888880808089550505050505092915050565b6000806000905060008090505b600054811161137957600360008281526020019081526020016000206000856000600a81106112d257fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156113045781806001019250505b600360008281526020019081526020016000206000856001600a811061132657fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156113585781806001019250505b600282141561136c57600192505050611380565b80806001019150506112a7565b5060009150505b919050565b60006006600a01805490506001845101146113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc90612979565b60405180910390fd5b6113dd611897565b6000600190506107d05a03600a60060183526020832060208701875160200281018254865260018301546020870152600283019250604086015b8183101561146657835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf1808216881697505050600284019350602083019250611417565b5050505050806114ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a290612a39565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260065460c083015260016006015460e083015260026006015461010083015260036006015461012083015260046006015461014083015260056006015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260068001546102808501526007600601546102a08501526008600601546102c08501526009600601546102e085015260208461030086600060086107d05a03f19250505080611685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167c90612a19565b60405180910390fd5b8160006018811061169257fe5b60200201519250505092915050565b60008060006001860390506000600119861682019050600080600187161461174e576001868401039050611718600160008054815260200190815260200160002082603f81106116ed57fe5b0154600160008054815260200190815260200160002085600202603f811061171157fe5b01546111e9565b60016000805481526020019081526020016000206002600184038161173957fe5b04603f811061174457fe5b0181905550611754565b85830190505b5b818111156117e6576002810390506117b0600160008054815260200190815260200160002082603f811061178557fe5b0154600160008054815260200190815260200160002060018401603f81106117a957fe5b01546111e9565b6001600080548152602001908152602001600020600260018403816117d157fe5b04603f81106117dc57fe5b0181905550611755565b600287816117f057fe5b04600260018801816117fe57fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b6000813590506118c981612e80565b92915050565b600082601f8301126118e057600080fd5b60026118f36118ee82612b5b565b612b2e565b9150818360005b8381101561192a57813586016119108882611aba565b8452602084019350602083019250506001810190506118fa565b5050505092915050565b600082601f83011261194557600080fd5b600a61195861195382612b7d565b612b2e565b9150818385602084028201111561196e57600080fd5b60005b8381101561199e57816119848882611b62565b845260208401935060208301925050600181019050611971565b5050505092915050565b600082601f8301126119b957600080fd5b60026119cc6119c782612b9f565b612b2e565b915081838560208402820111156119e257600080fd5b60005b83811015611a1257816119f88882611b62565b8452602084019350602083019250506001810190506119e5565b5050505092915050565b600082601f830112611a2d57600080fd5b6004611a40611a3b82612bc1565b612b2e565b91508183856020840282011115611a5657600080fd5b60005b83811015611a865781611a6c8882611b62565b845260208401935060208301925050600181019050611a59565b5050505092915050565b600081359050611a9f81612e97565b92915050565b600081519050611ab481612e97565b92915050565b600082601f830112611acb57600080fd5b8135611ade611ad982612be3565b612b2e565b91508082526020830160208301858383011115611afa57600080fd5b611b05838284612e23565b50505092915050565b600082601f830112611b1f57600080fd5b8135611b32611b2d82612c0f565b612b2e565b91508082526020830160208301858383011115611b4e57600080fd5b611b59838284612e23565b50505092915050565b600081359050611b7181612eae565b92915050565b60008060008060808587031215611b8d57600080fd5b6000611b9b878288016118ba565b9450506020611bac878288016118ba565b9350506040611bbd87828801611b62565b925050606085013567ffffffffffffffff811115611bda57600080fd5b611be687828801611b0e565b91505092959194509250565b60006101408284031215611c0557600080fd5b6000611c1384828501611934565b91505092915050565b6000806000806000806000610300888a031215611c3857600080fd5b6000611c468a828b016119a8565b9750506040611c578a828b01611a1c565b96505060c0611c688a828b016119a8565b955050610100611c7a8a828b01611a1c565b945050610180611c8c8a828b01611b62565b9350506101a0611c9e8a828b01611934565b9250506102e088013567ffffffffffffffff811115611cbc57600080fd5b611cc88a828b016118cf565b91505092959891949750929550565b600060208284031215611ce957600080fd5b6000611cf784828501611a90565b91505092915050565b600060208284031215611d1257600080fd5b6000611d2084828501611aa5565b91505092915050565b6000806101608385031215611d3d57600080fd5b6000611d4b85828601611b62565b9250506020611d5c85828601611934565b9150509250929050565b6000611d728383612008565b60208301905092915050565b6000611d8a8383612026565b60208301905092915050565b6000611da28383612075565b905092915050565b6000611db683836126aa565b60208301905092915050565b611dcb81612ded565b82525050565b611dda81612d7b565b82525050565b611de981612c6d565b611df38184612cfb565b9250611dfe82612c3b565b8060005b83811015611e2f578151611e168782611d66565b9650611e2183612cba565b925050600181019050611e02565b505050505050565b611e4081612c6d565b611e4a8184612d06565b9250611e5582612c3b565b8060005b83811015611e86578151611e6d8782611d7e565b9650611e7883612cba565b925050600181019050611e59565b505050505050565b6000611e9982612c78565b611ea38185612d11565b935083602082028501611eb585612c45565b8060005b85811015611ef15784840389528151611ed28582611d96565b9450611edd83612cc7565b925060208a01995050600181019050611eb9565b50829750879550505050505092915050565b611f0c81612c83565b611f168184612d1c565b9250611f2182612c4f565b8060005b83811015611f52578151611f398782611daa565b9650611f4483612cd4565b925050600181019050611f25565b505050505050565b611f6381612c8e565b611f6d8184612d27565b9250611f7882612c59565b8060005b83811015611fa9578151611f908782611daa565b9650611f9b83612ce1565b925050600181019050611f7c565b505050505050565b611fba81612c99565b611fc48184612d32565b9250611fcf82612c63565b8060005b83811015612000578151611fe78782611daa565b9650611ff283612cee565b925050600181019050611fd3565b505050505050565b61201181612d8d565b82525050565b61202081612d8d565b82525050565b61202f81612d8d565b82525050565b61203e81612d97565b82525050565b600061204f82612caf565b6120598185612d5f565b9350612069818560208601612e32565b80840191505092915050565b600061208082612ca4565b61208a8185612d3d565b935061209a818560208601612e32565b6120a381612e6f565b840191505092915050565b60006120b982612ca4565b6120c38185612d5f565b93506120d3818560208601612e32565b80840191505092915050565b60006120ec601883612d6a565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061212c603783612d6a565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b6000612192601e83612d6a565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b60006121d2601883612d6a565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612212602783612d6a565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612278603083612d6a565b91507f6e756c6c6966696572207772697474656e20696e20646966666572656e74207260008301527f6573696475616c2062697420662e652e000000000000000000000000000000006020830152604082019050919050565b60006122de602583612d6a565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612344604983612d6a565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006123d0602283612d6a565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612436603383612d6a565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b600061249c602a83612d6a565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b6000612502601c83612d6a565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b6000612542603b83612d6a565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b60006125a8600083612d4e565b9150600082019050919050565b60006125c2600083612d5f565b9150600082019050919050565b60006125dc603783612d6a565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b6000612642603983612d6a565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b6126a481612de3565b82525050565b6126b381612de3565b82525050565b6126ca6126c582612de3565b612e65565b82525050565b60006126dc8285611e37565b6040820191506126ec8284611fb1565b6080820191508190509392505050565b60006127088284612044565b915081905092915050565b600061271e826125b5565b9150819050919050565b6000612734828a6126b9565b60208201915061274482896120ae565b915061275082886120ae565b915061275c8287611f5a565b60408201915061276c8286611fb1565b60808201915061277c8285611f5a565b60408201915061278c8284611f03565b6101408201915081905098975050505050505050565b60006020820190506127b76000830184611dd1565b92915050565b60006080820190506127d26000830186611dc2565b6127df6020830185611dd1565b6127ec604083018461269b565b81810360608301526127fd8161259b565b9050949350505050565b600060608201905061281c6000830185611dc2565b612829602083018461269b565b818103604083015261283a8161259b565b90509392505050565b60006020820190506128586000830184612017565b92915050565b60006020820190506128736000830184612035565b92915050565b60006020820190508181036000830152612892816120df565b9050919050565b600060208201905081810360008301526128b28161211f565b9050919050565b600060208201905081810360008301526128d281612185565b9050919050565b600060208201905081810360008301526128f2816121c5565b9050919050565b6000602082019050818103600083015261291281612205565b9050919050565b600060208201905081810360008301526129328161226b565b9050919050565b60006020820190508181036000830152612952816122d1565b9050919050565b6000602082019050818103600083015261297281612337565b9050919050565b60006020820190508181036000830152612992816123c3565b9050919050565b600060208201905081810360008301526129b281612429565b9050919050565b600060208201905081810360008301526129d28161248f565b9050919050565b600060208201905081810360008301526129f2816124f5565b9050919050565b60006020820190508181036000830152612a1281612535565b9050919050565b60006020820190508181036000830152612a32816125cf565b9050919050565b60006020820190508181036000830152612a5281612635565b9050919050565b6000602082019050612a6e600083018461269b565b92915050565b600060e082019050612a89600083018861269b565b612a966020830187612017565b612aa36040830186611de0565b612ab06080830185611de0565b81810360c0830152612ac28184611e8e565b90509695505050505050565b6000604082019050612ae3600083018561269b565b612af0602083018461269b565b9392505050565b6000606082019050612b0c600083018661269b565b612b19602083018561269b565b612b26604083018461269b565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612b5157600080fd5b8060405250919050565b600067ffffffffffffffff821115612b7257600080fd5b602082029050919050565b600067ffffffffffffffff821115612b9457600080fd5b602082029050919050565b600067ffffffffffffffff821115612bb657600080fd5b602082029050919050565b600067ffffffffffffffff821115612bd857600080fd5b602082029050919050565b600067ffffffffffffffff821115612bfa57600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612c2657600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612d8682612dc3565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612df882612dff565b9050919050565b6000612e0a82612e11565b9050919050565b6000612e1c82612dc3565b9050919050565b82818337600083830152505050565b60005b83811015612e50578082015181840152602081019050612e35565b83811115612e5f576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612e8981612d7b565b8114612e9457600080fd5b50565b612ea081612d8d565b8114612eab57600080fd5b50565b612eb781612de3565b8114612ec257600080fd5b5056fea365627a7a72315820938b02d39b473f4d2c65b95966ebbf726ca50a45b53bfbf1027eb498a127fd8e6c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file +6080604052600080553480156200001557600080fd5b5060405162003d3338038062003d3383398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b61312b8062000c086000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611e77565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612c43565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611d92565b61031e565b604051610114929190612cb8565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611d92565b61039a565b6040516101519190612a4d565b60405180910390f35b610174600480360361016f9190810190611dbc565b6103c2565b005b34801561018257600080fd5b5061019d60048036036101989190810190611ef2565b6105e8565b6040516101aa9190612a4d565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611d17565b610654565b6040516101e79190612a68565b60405180910390f35b3480156101fc57600080fd5b50610205610668565b60405161021493929190612ce1565b60405180910390f35b34801561022957600080fd5b5061023261068b565b60405161023f919061298a565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806106b1565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c090612b03565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103af57fe5b602002015190508060001b915050919050565b6103ca611999565b6103d585848361086c565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106103fd57fe5b60200201518560016002811061040f57fe5b60200201518c8c8c8a60405160200161042e9796959493929190612910565b60405160208183030381529060405260405161044a91906128e4565b602060405180830381855afa158015610467573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061048a9190810190611ea0565b90506104de8660006004811061049c57fe5b6020020151876001600481106104ae57fe5b6020020151886002600481106104c057fe5b6020020151896003600481106104d257fe5b60200201518986610a55565b61051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051490612be3565b60405180910390fd5b61052989898987610b2c565b610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612b83565b60405180910390fd5b610570611999565b61057a8582610d33565b60006105866002610d8f565b905061059181610e04565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7600054828685896040516105ca959493929190612c5e565b60405180910390a16105db86610e45565b5050505050505050505050565b60006002831061062d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062490612a83565b60405180910390fd5b600082846002800101600a811061064057fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106106e357fe5b018190555060006002600560020a816106f857fe5b0490505b600081111561086857606060026040519080825280602002602001820160405280156107375781602001602082028038833980820191505090505b5090508260001c8160008151811061074b57fe5b6020026020010181815250508260001c8160018151811061076857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016107cf9190612a2b565b60206040518083038186803b1580156107e757600080fd5b505afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061081f9190810190611ec9565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f811061084f57fe5b01819055506002838161085e57fe5b04925050506106fc565b5050565b610875826111fd565b6108b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ab90612b23565b60405180910390fd5b60008090505b60028110156109825760006108cf82856105e8565b90506005600082815260200190815260200160002060009054906101000a900460ff1615610932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092990612aa3565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061096b57fe5b6020020181815250505080806001019150506108ba565b5060006002828560405160200161099a9291906128b8565b6040516020818303038152906040526040516109b691906128e4565b602060405180830381855afa1580156109d3573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109f69190810190611ea0565b9050600381901c90506000610a0a8461039a565b9050808214610a4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4590612b43565b60405180910390fd5b5050505050565b6000610a5f6119bb565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ada57fe5b602002015181600060058110610aec57fe5b6020020151148015610b1f575080600360058110610b0657fe5b602002015181600160058110610b1857fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b5a6119dd565b86600060028110610b6757fe5b602002015181600001818152505086600160028110610b8257fe5b602002015181602001818152505085600060048110610b9d57fe5b602002015181604001818152505085600160048110610bb857fe5b602002015181606001818152505085600260048110610bd357fe5b602002015181608001818152505085600360048110610bee57fe5b60200201518160a001818152505084600060028110610c0957fe5b60200201518160c001818152505084600160028110610c2457fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c715781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d1857838682600a8110610c9d57fe5b602002015110610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612bc3565b60405180910390fd5b8581600a8110610cee57fe5b6020020151828281518110610cff57fe5b6020026020010181815250508080600101915050610c7a565b50610d2381836112e8565b6001149350505050949350505050565b60008090505b6002811015610d8a5760008382600201600a8110610d5357fe5b602002015160001b905080838360028110610d6a57fe5b602002018181525050610d7c81610248565b508080600101915050610d39565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dd857610dbe818385611604565b809450819350505060028181610dd057fe5b049050610daa565b60016000805481526020019081526020016000206000603f8110610df857fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e518361031e565b915091506000821115610f9857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f50576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f18939291906129a5565b600060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b5050505050610f93565b813414610f92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990612ba3565b60405180910390fd5b5b611050565b600034111561104f5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fc7906128fb565b60006040518083038185875af1925050503d8060008114611004576040519150601f19603f3d011682016040523d82523d6000602084013e611009565b606091505b505090508061104d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104490612ac3565b60405180910390fd5b505b5b60008111156111f857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016111119291906129ef565b600060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b50505050506111f7565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161116f906128fb565b60006040518083038185875af1925050503d80600081146111ac576040519150601f19603f3d011682016040523d82523d6000602084013e6111b1565b606091505b50509050806111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612ae3565b60405180910390fd5b505b5b505050565b6000806000905060008090505b60005481116112dc57600460008281526020019081526020016000206000856000600a811061123557fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112675781806001019250505b600460008281526020019081526020016000206000856001600a811061128957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112bb5781806001019250505b60028214156112cf576001925050506112e3565b808060010191505061120a565b5060009150505b919050565b60006007600a0180549050600184510114611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f90612b63565b60405180910390fd5b611340611a22565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156113c957835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf180821688169750505060028401935060208301925061137a565b50505050508061140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140590612c23565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f192505050806115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115df90612c03565b60405180910390fd5b816000601881106115f557fe5b60200201519250505092915050565b6000806000600186039050600060011986168201905060008060018716146117c5576001868401039050606060026040519080825280602002602001820160405280156116605781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061168257fe5b015460001c8160008151811061169457fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f81106116c257fe5b015460001c816001815181106116d457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161173b9190612a2b565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061178b9190810190611ec9565b60001b6001600080548152602001908152602001600020600260018503816117af57fe5b04603f81106117ba57fe5b0181905550506117cb565b85830190505b5b81811115611971576002810390506060600260405190808252806020026020018201604052801561180c5781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061182e57fe5b015460001c8160008151811061184057fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f811061186e57fe5b015460001c8160018151811061188057fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016118e79190612a2b565b60206040518083038186803b1580156118ff57600080fd5b505afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119379190810190611ec9565b60001b60016000805481526020019081526020016000206002600185038161195b57fe5b04603f811061196657fe5b0181905550506117cc565b6002878161197b57fe5b046002600188018161198957fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611a54816130a3565b92915050565b600082601f830112611a6b57600080fd5b6002611a7e611a7982612d45565b612d18565b9150818360005b83811015611ab55781358601611a9b8882611c45565b845260208401935060208301925050600181019050611a85565b5050505092915050565b600082601f830112611ad057600080fd5b600a611ae3611ade82612d67565b612d18565b91508183856020840282011115611af957600080fd5b60005b83811015611b295781611b0f8882611ced565b845260208401935060208301925050600181019050611afc565b5050505092915050565b600082601f830112611b4457600080fd5b6002611b57611b5282612d89565b612d18565b91508183856020840282011115611b6d57600080fd5b60005b83811015611b9d5781611b838882611ced565b845260208401935060208301925050600181019050611b70565b5050505092915050565b600082601f830112611bb857600080fd5b6004611bcb611bc682612dab565b612d18565b91508183856020840282011115611be157600080fd5b60005b83811015611c115781611bf78882611ced565b845260208401935060208301925050600181019050611be4565b5050505092915050565b600081359050611c2a816130ba565b92915050565b600081519050611c3f816130ba565b92915050565b600082601f830112611c5657600080fd5b8135611c69611c6482612dcd565b612d18565b91508082526020830160208301858383011115611c8557600080fd5b611c90838284613046565b50505092915050565b600082601f830112611caa57600080fd5b8135611cbd611cb882612df9565b612d18565b91508082526020830160208301858383011115611cd957600080fd5b611ce4838284613046565b50505092915050565b600081359050611cfc816130d1565b92915050565b600081519050611d11816130d1565b92915050565b60008060008060808587031215611d2d57600080fd5b6000611d3b87828801611a45565b9450506020611d4c87828801611a45565b9350506040611d5d87828801611ced565b925050606085013567ffffffffffffffff811115611d7a57600080fd5b611d8687828801611c99565b91505092959194509250565b60006101408284031215611da557600080fd5b6000611db384828501611abf565b91505092915050565b6000806000806000806000610300888a031215611dd857600080fd5b6000611de68a828b01611b33565b9750506040611df78a828b01611ba7565b96505060c0611e088a828b01611b33565b955050610100611e1a8a828b01611ba7565b945050610180611e2c8a828b01611ced565b9350506101a0611e3e8a828b01611abf565b9250506102e088013567ffffffffffffffff811115611e5c57600080fd5b611e688a828b01611a5a565b91505092959891949750929550565b600060208284031215611e8957600080fd5b6000611e9784828501611c1b565b91505092915050565b600060208284031215611eb257600080fd5b6000611ec084828501611c30565b91505092915050565b600060208284031215611edb57600080fd5b6000611ee984828501611d02565b91505092915050565b6000806101608385031215611f0657600080fd5b6000611f1485828601611ced565b9250506020611f2585828601611abf565b9150509250929050565b6000611f3b8383612247565b60208301905092915050565b6000611f538383612265565b60208301905092915050565b6000611f6b83836122b4565b905092915050565b6000611f7f8383612874565b60208301905092915050565b6000611f978383612892565b60208301905092915050565b611fac81613010565b82525050565b611fbb81612f9e565b82525050565b611fca81612e67565b611fd48184612f0d565b9250611fdf82612e25565b8060005b83811015612010578151611ff78782611f2f565b965061200283612ebf565b925050600181019050611fe3565b505050505050565b61202181612e67565b61202b8184612f18565b925061203682612e25565b8060005b8381101561206757815161204e8782611f47565b965061205983612ebf565b92505060018101905061203a565b505050505050565b600061207a82612e72565b6120848185612f23565b93508360208202850161209685612e2f565b8060005b858110156120d257848403895281516120b38582611f5f565b94506120be83612ecc565b925060208a0199505060018101905061209a565b50829750879550505050505092915050565b6120ed81612e7d565b6120f78184612f2e565b925061210282612e39565b8060005b8381101561213357815161211a8782611f8b565b965061212583612ed9565b925050600181019050612106565b505050505050565b61214481612e88565b61214e8184612f39565b925061215982612e43565b8060005b8381101561218a5781516121718782611f8b565b965061217c83612ee6565b92505060018101905061215d565b505050505050565b61219b81612e93565b6121a58184612f44565b92506121b082612e4d565b8060005b838110156121e15781516121c88782611f8b565b96506121d383612ef3565b9250506001810190506121b4565b505050505050565b60006121f482612e9e565b6121fe8185612f4f565b935061220983612e57565b8060005b8381101561223a5781516122218882611f73565b975061222c83612f00565b92505060018101905061220d565b5085935050505092915050565b61225081612fb0565b82525050565b61225f81612fb0565b82525050565b61226e81612fb0565b82525050565b61227d81612fba565b82525050565b600061228e82612eb4565b6122988185612f82565b93506122a8818560208601613055565b80840191505092915050565b60006122bf82612ea9565b6122c98185612f60565b93506122d9818560208601613055565b6122e281613092565b840191505092915050565b60006122f882612ea9565b6123028185612f82565b9350612312818560208601613055565b80840191505092915050565b600061232b601883612f8d565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061236b603783612f8d565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b60006123d1601e83612f8d565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612411601883612f8d565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612451602783612f8d565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124b7602583612f8d565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061251d604983612f8d565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006125a9602283612f8d565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061260f603383612f8d565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b6000612675602a83612f8d565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b60006126db601c83612f8d565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b600061271b603b83612f8d565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b6000612781600083612f71565b9150600082019050919050565b600061279b600083612f82565b9150600082019050919050565b60006127b5603783612f8d565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b600061281b603983612f8d565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61287d81613006565b82525050565b61288c81613006565b82525050565b61289b81613006565b82525050565b6128b26128ad82613006565b613088565b82525050565b60006128c48285612018565b6040820191506128d48284612192565b6080820191508190509392505050565b60006128f08284612283565b915081905092915050565b60006129068261278e565b9150819050919050565b600061291c828a6128a1565b60208201915061292c82896122ed565b915061293882886122ed565b9150612944828761213b565b6040820191506129548286612192565b608082019150612964828561213b565b60408201915061297482846120e4565b6101408201915081905098975050505050505050565b600060208201905061299f6000830184611fb2565b92915050565b60006080820190506129ba6000830186611fa3565b6129c76020830185611fb2565b6129d46040830184612883565b81810360608301526129e581612774565b9050949350505050565b6000606082019050612a046000830185611fa3565b612a116020830184612883565b8181036040830152612a2281612774565b90509392505050565b60006020820190508181036000830152612a4581846121e9565b905092915050565b6000602082019050612a626000830184612256565b92915050565b6000602082019050612a7d6000830184612274565b92915050565b60006020820190508181036000830152612a9c8161231e565b9050919050565b60006020820190508181036000830152612abc8161235e565b9050919050565b60006020820190508181036000830152612adc816123c4565b9050919050565b60006020820190508181036000830152612afc81612404565b9050919050565b60006020820190508181036000830152612b1c81612444565b9050919050565b60006020820190508181036000830152612b3c816124aa565b9050919050565b60006020820190508181036000830152612b5c81612510565b9050919050565b60006020820190508181036000830152612b7c8161259c565b9050919050565b60006020820190508181036000830152612b9c81612602565b9050919050565b60006020820190508181036000830152612bbc81612668565b9050919050565b60006020820190508181036000830152612bdc816126ce565b9050919050565b60006020820190508181036000830152612bfc8161270e565b9050919050565b60006020820190508181036000830152612c1c816127a8565b9050919050565b60006020820190508181036000830152612c3c8161280e565b9050919050565b6000602082019050612c586000830184612883565b92915050565b600060e082019050612c736000830188612883565b612c806020830187612256565b612c8d6040830186611fc1565b612c9a6080830185611fc1565b81810360c0830152612cac818461206f565b90509695505050505050565b6000604082019050612ccd6000830185612883565b612cda6020830184612883565b9392505050565b6000606082019050612cf66000830186612883565b612d036020830185612883565b612d106040830184612883565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612d3b57600080fd5b8060405250919050565b600067ffffffffffffffff821115612d5c57600080fd5b602082029050919050565b600067ffffffffffffffff821115612d7e57600080fd5b602082029050919050565b600067ffffffffffffffff821115612da057600080fd5b602082029050919050565b600067ffffffffffffffff821115612dc257600080fd5b602082029050919050565b600067ffffffffffffffff821115612de457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612e1057600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612fa982612fe6565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061301b82613022565b9050919050565b600061302d82613034565b9050919050565b600061303f82612fe6565b9050919050565b82818337600083830152505050565b60005b83811015613073578082015181840152602081019050613058565b83811115613082576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6130ac81612f9e565b81146130b757600080fd5b50565b6130c381612fb0565b81146130ce57600080fd5b50565b6130da81613006565b81146130e557600080fd5b5056fea365627a7a723158200681dad9a2468c04d3031ae3856b4cd273e5060b0dcbefd4ceea6ed749f9fe746c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file diff --git a/contract/poseidon/Poseidon.sol b/contract/poseidon/Poseidon.sol new file mode 100644 index 0000000..a88de4b --- /dev/null +++ b/contract/poseidon/Poseidon.sol @@ -0,0 +1,5 @@ +pragma solidity ^0.5.0; + +contract Poseidon { + function poseidon(uint256[] memory input) public pure returns(uint256) ; +} \ No newline at end of file diff --git a/contract/poseidon/abi/Poseidon.abi b/contract/poseidon/abi/Poseidon.abi new file mode 100644 index 0000000..ce10133 --- /dev/null +++ b/contract/poseidon/abi/Poseidon.abi @@ -0,0 +1 @@ +[{"constant": true, "inputs": [{"internalType": "uint256[]", "name": "input", "type": "uint256[]"}], "name": "poseidon", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}] \ No newline at end of file diff --git a/contract/poseidon/abi/Poseidon.bin b/contract/poseidon/abi/Poseidon.bin new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt index cd94254..5e9efd0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -56,3 +56,4 @@ urllib3==1.24.2 web3==4.8.2 websockets==6.0 wrapt==1.11.2 +ethsnarks==0.0.1 \ No newline at end of file diff --git a/test_commands/test_poseidon.py b/test_commands/test_poseidon.py new file mode 100644 index 0000000..4feedbc --- /dev/null +++ b/test_commands/test_poseidon.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2015-2020 Clearmatics Technologies Ltd +# +# SPDX-License-Identifier: LGPL-3.0+ + +import shutil +from os.path import join, exists +from typing import Dict, List + +from ethsnarks.poseidon import poseidon + +import test_commands.mock as mock +import test_commands.scenario as scenario +import zeth.constants as constants +import zeth.merkle_tree +import zeth.utils +from contract.Poseidon import Poseidon +from python_web3.client.bcosclient import BcosClient +from test_commands.deploy_test_token import mint_token +from zeth.contracts import MixOutputEvents +from zeth.mixer_client import MixerClient, write_verification_key +from zeth.prover_client import ProverClient +from zeth.wallet import Wallet, ZethNoteDescription +from zeth.zeth_address import ZethAddressPriv + +abi = [{'inputs': [{'internalType': 'uint256', 'name': 'mk_depth', 'type': 'uint256'}, {'internalType': 'address', 'name': 'token', 'type': 'address'}, {'internalType': 'uint256[2]', 'name': 'Alpha', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Beta1', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Beta2', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Delta1', 'type': 'uint256[2]'}, {'internalType': 'uint256[2]', 'name': 'Delta2', 'type': 'uint256[2]'}, {'internalType': 'uint256[]', 'name': 'ABC_coords', 'type': 'uint256[]'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'string', 'name': 'message', 'type': 'string'}], 'name': 'LogDebug', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'bytes32', 'name': 'message', 'type': 'bytes32'}], 'name': 'LogDebug', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'bytes32', 'name': 'root', 'type': 'bytes32'}, {'indexed': False, 'internalType': 'bytes32[2]', 'name': 'nullifiers', 'type': 'bytes32[2]'}, {'indexed': False, 'internalType': 'bytes32[2]', 'name': 'commitments', 'type': 'bytes32[2]'}, {'indexed': False, 'internalType': 'bytes[2]', 'name': 'ciphertexts', 'type': 'bytes[2]'}], 'name': 'LogMix', 'type': 'event'}, {'constant': True, 'inputs': [{'internalType': 'uint256[9]', 'name': 'primary_inputs', 'type': 'uint256[9]'}], 'name': 'assemble_hsig', 'outputs': [{'internalType': 'bytes32', 'name': 'hsig', 'type': 'bytes32'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [{'internalType': 'uint256', 'name': 'index', 'type': 'uint256'}, {'internalType': 'uint256[9]', 'name': 'primary_inputs', 'type': 'uint256[9]'}], 'name': 'assemble_nullifier', 'outputs': [{'internalType': 'bytes32', 'name': 'nf', 'type': 'bytes32'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [{'internalType': 'uint256[9]', 'name': 'primary_inputs', 'type': 'uint256[9]'}], 'name': 'assemble_public_values', 'outputs': [{'internalType': 'uint256', 'name': 'vpub_in', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'vpub_out', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': True, 'inputs': [], 'name': 'get_constants', 'outputs': [{'internalType': 'uint256', 'name': 'js_in', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'js_out', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'num_inputs', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}, {'constant': False, 'inputs': [{'internalType': 'bytes32', 'name': 'commitment', 'type': 'bytes32'}], 'name': 'insert', 'outputs': [], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': False, 'inputs': [{'internalType': 'uint256[2]', 'name': 'a', 'type': 'uint256[2]'}, {'internalType': 'uint256[4]', 'name': 'b', 'type': 'uint256[4]'}, {'internalType': 'uint256[2]', 'name': 'c', 'type': 'uint256[2]'}, {'internalType': 'uint256[4]', 'name': 'vk', 'type': 'uint256[4]'}, {'internalType': 'uint256', 'name': 'sigma', 'type': 'uint256'}, {'internalType': 'uint256[9]', 'name': 'input', 'type': 'uint256[9]'}, {'internalType': 'bytes[2]', 'name': 'ciphertexts', 'type': 'bytes[2]'}], 'name': 'mix', 'outputs': [], 'payable': True, 'stateMutability': 'payable', 'type': 'function'}, {'constant': True, 'inputs': [], 'name': 'token', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'payable': False, 'stateMutability': 'view', 'type': 'function'}, {'constant': True, 'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}, {'internalType': 'bytes', 'name': 'data', 'type': 'bytes'}], 'name': 'tokenFallback', 'outputs': [], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}] +bin = "60806040523480156200001157600080fd5b50604051620037d3380380620037d3833981810160405262000037919081019062000685565b878781806005811462000081576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620008ba565b60405180910390fd5b50620000926200040360201b60201c565b506000806000603f8110620000a357fe5b0154905060016040600083815260200190815260200160002060006101000a81548160ff02191690831515021790555081604260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd106200015c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001539062000876565b60405180910390fd5b60fd6002800260010160fd610100030260406002020110620001b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001ac9062000898565b60405180910390fd5b505050604051806040016040528087600060028110620001d157fe5b6020020151815260200187600160028110620001e957fe5b6020020151815250604360000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200022657fe5b60200201518152602001866001600281106200023e57fe5b60200201518152602001856000600281106200025657fe5b60200201518152602001856001600281106200026e57fe5b6020020151815250604360020160008201518160000155602082015181600101556040820151816002015560608201518160030155905050604051806080016040528084600060028110620002bf57fe5b6020020151815260200184600160028110620002d757fe5b6020020151815260200183600060028110620002ef57fe5b60200201518152602001836001600281106200030757fe5b602002015181525060436006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b60028251816200035157fe5b046043600a018054905014620003f4576043600a0160405180604001604052808484815181106200037e57fe5b602002602001015181526020018460018501815181106200039b57fe5b602002602001015181525090806001815401808255809150509060018203906000526020600020906002020160009091929091909150600082015181600001556020820151816001015550505060028101905062000345565b505050505050505050620009d9565b60008060001b90508060006002600560020a60020203603f81106200042457fe5b018190555060006002600560020a816200043a57fe5b0490505b600081111562000495576200045f82836200049960201b620016c61760201c565b9150600060028260020203905082600082603f81106200047b57fe5b0181905550600282816200048b57fe5b049150506200043e565b5050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a8112156200053457602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050620004f9565b508484868a8888880808089550505050505092915050565b6000815190506200055d81620009a5565b92915050565b600082601f8301126200057557600080fd5b60026200058c62000586826200090a565b620008dc565b91508183856020840282011115620005a357600080fd5b60005b83811015620005d75781620005bc88826200066e565b845260208401935060208301925050600181019050620005a6565b5050505092915050565b600082601f830112620005f357600080fd5b81516200060a62000604826200092d565b620008dc565b915081818352602084019350602081019050838560208402820111156200063057600080fd5b60005b838110156200066457816200064988826200066e565b84526020840193506020830192505060018101905062000633565b5050505092915050565b6000815190506200067f81620009bf565b92915050565b6000806000806000806000806101a0898b031215620006a357600080fd5b6000620006b38b828c016200066e565b9850506020620006c68b828c016200054c565b9750506040620006d98b828c0162000563565b9650506080620006ec8b828c0162000563565b95505060c0620006ff8b828c0162000563565b945050610100620007138b828c0162000563565b935050610140620007278b828c0162000563565b92505061018089015167ffffffffffffffff8111156200074657600080fd5b620007548b828c01620005e1565b9150509295985092959890939650565b600062000773602d8362000956565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b6000620007db602b8362000956565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b600062000843601f8362000956565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b60006020820190508181036000830152620008918162000764565b9050919050565b60006020820190508181036000830152620008b381620007cc565b9050919050565b60006020820190508181036000830152620008d58162000834565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156200090057600080fd5b8060405250919050565b600067ffffffffffffffff8211156200092257600080fd5b602082029050919050565b600067ffffffffffffffff8211156200094557600080fd5b602082029050602081019050919050565b600082825260208201905092915050565b600062000974826200097b565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620009b08162000967565b8114620009bc57600080fd5b50565b620009ca816200099b565b8114620009d657600080fd5b50565b612dea80620009e96000396000f3fe60806040526004361061007b5760003560e01c806397e004891161004e57806397e0048914610161578063c0ee0b8a1461017d578063f9eb943f146101a6578063fc0c546a146101d35761007b565b806305ceb93c146100805780631f40927c146100bd5780632d287e43146100fb578063354d06fd14610124575b600080fd5b34801561008c57600080fd5b506100a760048036036100a29190810190611cdb565b6101fe565b6040516100b491906127a6565b60405180910390f35b3480156100c957600080fd5b506100e460048036036100df9190810190611c5f565b61031e565b6040516100f29291906129ed565b60405180910390f35b34801561010757600080fd5b50610122600480360361011d9190810190611c89565b61039b565b005b34801561013057600080fd5b5061014b60048036036101469190810190611c5f565b610420565b60405161015891906127a6565b60405180910390f35b61017b60048036036101769190810190611ba4565b61049e565b005b34801561018957600080fd5b506101a4600480360361019f9190810190611b3d565b6106c0565b005b3480156101b257600080fd5b506101bb6108cb565b6040516101ca93929190612a16565b60405180910390f35b3480156101df57600080fd5b506101e86108ef565b6040516101f5919061272b565b60405180910390f35b600060028310610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023a9061280d565b60405180910390fd5b600060fd610100038460010102604060020201905060fd61010003810160fd10156102a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029a906128ad565b60405180910390fd5b600060fd826002800260010160fd610100030260406002020161010003018560028002600101600260010101600981106102d957fe5b602002015160001b901b901c9050600060fd6101000385876002600101016009811061030157fe5b6020020151901b90508160001c810160001b935050505092915050565b600080600083600280026001016002600101016009811061033b57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b600560020a603f54106103e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103da9061288d565b60405180910390fd5b6000603f549050603f60008154600101919050819055506000816001600560020a0301905082600082603f811061041657fe5b0181905550505050565b60008060fd60406002026002800260010160fd6101000302604060020201610100030184600280026001016002600101016009811061045b57fe5b602002015160001b901b901c9050600060fd6101000384600280600101016009811061048357fe5b6020020151901b90508160001c810160001b92505050919050565b6104a6611777565b6104b1858483610915565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106104d957fe5b6020020151856001600281106104eb57fe5b60200201518c8c8c8a60405160200161050a97969594939291906126b1565b6040516020818303038152906040526040516105269190612685565b602060405180830381855afa158015610543573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506105669190810190611cb2565b90506105ba8660006004811061057857fe5b60200201518760016004811061058a57fe5b60200201518860026004811061059c57fe5b6020020151896003600481106105ae57fe5b60200201518986610b23565b6105f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f09061298d565b60405180910390fd5b61060589898987610bfa565b610644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063b9061292d565b60405180910390fd5b61064c611777565b6106568582610e03565b60006106626002610e5f565b905061066d81610ec1565b7f36ed7c3f2ecfb5a5226c478b034d33144c060afe361be291e948f861dcddc618818584886040516106a294939291906127c1565b60405180910390a16106b386610ef0565b5050505050505050505050565b6106c8611799565b83816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816020018181525050818160400181905250600060188360038151811061072457fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60e01c60108460028151811061078457fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60e01c6008856001815181106107e457fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60e01c8560008151811061084257fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660e01c01010190508060e01b82606001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815250505050505050565b60008060006002925060029150600160028002600101600260010101019050909192565b604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604060008360006009811061092657fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16610989576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610980906128cd565b60405180910390fd5b60008090505b6002811015610a575760006109a482856101fe565b90506041600082815260200190815260200160002060009054906101000a900460ff1615610a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fe9061282d565b60405180910390fd5b60016041600083815260200190815260200160002060006101000a81548160ff02191690831515021790555080838360028110610a4057fe5b60200201818152505050808060010191505061098f565b50600060028285604051602001610a6f929190612659565b604051602081830303815290604052604051610a8b9190612685565b602060405180830381855afa158015610aa8573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250610acb9190810190611cb2565b90506000610ad884610420565b9050808214610b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b13906128ed565b60405180910390fd5b5050505050565b6000610b2d6117f6565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ba857fe5b602002015181600060058110610bba57fe5b6020020151148015610bed575080600360058110610bd457fe5b602002015181600160058110610be657fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610c28611818565b86600060028110610c3557fe5b602002015181600001818152505086600160028110610c5057fe5b602002015181602001818152505085600060048110610c6b57fe5b602002015181604001818152505085600160048110610c8657fe5b602002015181606001818152505085600260048110610ca157fe5b602002015181608001818152505085600360048110610cbc57fe5b60200201518160a001818152505084600060028110610cd757fe5b60200201518160c001818152505084600160028110610cf257fe5b60200201518160e0018181525050606060016002800260010160026001010101604051908082528060200260200182016040528015610d405781602001602082028038833980820191505090505b50905060008090505b60016002800260010160026001010101811015610de85783868260098110610d6d57fe5b602002015110610db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da99061296d565b60405180910390fd5b858160098110610dbe57fe5b6020020151828281518110610dcf57fe5b6020026020010181815250508080600101915050610d49565b50610df381836112a8565b6001149350505050949350505050565b60008090505b6002811015610e5a576000838260010160098110610e2357fe5b602002015160001b905080838360028110610e3a57fe5b602002018181525050610e4c8161039b565b508080600101915050610e09565b505050565b600080603f549050600083603f540390506000600560020a90505b6001811115610ea857610e8e8183856115c5565b809450819350505060028181610ea057fe5b049050610e7a565b600080603f8110610eb557fe5b01549350505050919050565b60016040600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610efc8361031e565b91509150600082111561104357600073ffffffffffffffffffffffffffffffffffffffff16604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ffb576000604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401610fc393929190612746565b600060405180830381600087803b158015610fdd57600080fd5b505af1158015610ff1573d6000803e3d6000fd5b505050505061103e565b81341461103d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110349061294d565b60405180910390fd5b5b6110fb565b60003411156110fa5760003373ffffffffffffffffffffffffffffffffffffffff16346040516110729061269c565b60006040518083038185875af1925050503d80600081146110af576040519150601f19603f3d011682016040523d82523d6000602084013e6110b4565b606091505b50509050806110f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ef9061284d565b60405180910390fd5b505b5b60008111156112a357600073ffffffffffffffffffffffffffffffffffffffff16604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111f4576000604260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b81526004016111bc92919061277d565b600060405180830381600087803b1580156111d657600080fd5b505af11580156111ea573d6000803e3d6000fd5b50505050506112a2565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161121a9061269c565b60006040518083038185875af1925050503d8060008114611257576040519150601f19603f3d011682016040523d82523d6000602084013e61125c565b606091505b50509050806112a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112979061286d565b60405180910390fd5b505b5b505050565b60006043600a01805490506001845101146112f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ef9061290d565b60405180910390fd5b61130061185d565b6000600190506107d05a03600a60430183526020832060208701875160200281018254865260018301546020870152600283019250604086015b8183101561138957835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf180821688169750505060028401935060208301925061133a565b5050505050806113ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c5906129cd565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260435460c083015260016043015460e083015260026043015461010083015260036043015461012083015260046043015461014083015260056043015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e08601516102608501526006604301546102808501526007604301546102a08501526008604301546102c08501526009604301546102e085015260208461030086600060086107d05a03f192505050806115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a0906129ad565b60405180910390fd5b816000601881106115b657fe5b60200201519250505092915050565b60008060006001860390506000600119861682019050600080600187161461163c576001868401039050611618600082603f81106115ff57fe5b0154600085600202603f811061161157fe5b01546116c6565b60006002600184038161162757fe5b04603f811061163257fe5b0181905550611642565b85830190505b5b8181111561169e5760028103905061167a600082603f811061166157fe5b0154600060018401603f811061167357fe5b01546116c6565b60006002600184038161168957fe5b04603f811061169457fe5b0181905550611643565b600287816116a857fe5b04600260018801816116b657fe5b0494509450505050935093915050565b60007fdec937b7fa8db3de380427a8cc947bfab68514522c3439cfa2e99655098368146000527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284828282088381820984858383098683840909925060005b605a81121561175f57602060002080600052868688838808089350868485099250868488858a8788090909945050600181019050611726565b508484868a8888880808089550505050505092915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016060815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b60008135905061188f81612d62565b92915050565b600082601f8301126118a657600080fd5b60026118b96118b482612a7a565b612a4d565b9150818360005b838110156118f057813586016118d68882611a80565b8452602084019350602083019250506001810190506118c0565b5050505092915050565b600082601f83011261190b57600080fd5b600261191e61191982612a9c565b612a4d565b9150818385602084028201111561193457600080fd5b60005b83811015611964578161194a8882611b28565b845260208401935060208301925050600181019050611937565b5050505092915050565b600082601f83011261197f57600080fd5b600461199261198d82612abe565b612a4d565b915081838560208402820111156119a857600080fd5b60005b838110156119d857816119be8882611b28565b8452602084019350602083019250506001810190506119ab565b5050505092915050565b600082601f8301126119f357600080fd5b6009611a06611a0182612ae0565b612a4d565b91508183856020840282011115611a1c57600080fd5b60005b83811015611a4c5781611a328882611b28565b845260208401935060208301925050600181019050611a1f565b5050505092915050565b600081359050611a6581612d79565b92915050565b600081519050611a7a81612d79565b92915050565b600082601f830112611a9157600080fd5b8135611aa4611a9f82612b02565b612a4d565b91508082526020830160208301858383011115611ac057600080fd5b611acb838284612d05565b50505092915050565b600082601f830112611ae557600080fd5b8135611af8611af382612b2e565b612a4d565b91508082526020830160208301858383011115611b1457600080fd5b611b1f838284612d05565b50505092915050565b600081359050611b3781612d90565b92915050565b600080600060608486031215611b5257600080fd5b6000611b6086828701611880565b9350506020611b7186828701611b28565b925050604084013567ffffffffffffffff811115611b8e57600080fd5b611b9a86828701611ad4565b9150509250925092565b60008060008060008060006102e0888a031215611bc057600080fd5b6000611bce8a828b016118fa565b9750506040611bdf8a828b0161196e565b96505060c0611bf08a828b016118fa565b955050610100611c028a828b0161196e565b945050610180611c148a828b01611b28565b9350506101a0611c268a828b016119e2565b9250506102c088013567ffffffffffffffff811115611c4457600080fd5b611c508a828b01611895565b91505092959891949750929550565b60006101208284031215611c7257600080fd5b6000611c80848285016119e2565b91505092915050565b600060208284031215611c9b57600080fd5b6000611ca984828501611a56565b91505092915050565b600060208284031215611cc457600080fd5b6000611cd284828501611a6b565b91505092915050565b6000806101408385031215611cef57600080fd5b6000611cfd85828601611b28565b9250506020611d0e858286016119e2565b9150509250929050565b6000611d248383611fba565b60208301905092915050565b6000611d3c8383611fd8565b60208301905092915050565b6000611d548383612018565b905092915050565b6000611d688383612633565b60208301905092915050565b611d7d81612ccf565b82525050565b611d8c81612c89565b82525050565b611d9b81612b8c565b611da58184612c1a565b9250611db082612b5a565b8060005b83811015611de1578151611dc88782611d18565b9650611dd383612bd9565b925050600181019050611db4565b505050505050565b611df281612b8c565b611dfc8184612c25565b9250611e0782612b5a565b8060005b83811015611e38578151611e1f8782611d30565b9650611e2a83612bd9565b925050600181019050611e0b565b505050505050565b6000611e4b82612b97565b611e558185612c30565b935083602082028501611e6785612b64565b8060005b85811015611ea35784840389528151611e848582611d48565b9450611e8f83612be6565b925060208a01995050600181019050611e6b565b50829750879550505050505092915050565b611ebe81612ba2565b611ec88184612c3b565b9250611ed382612b6e565b8060005b83811015611f04578151611eeb8782611d5c565b9650611ef683612bf3565b925050600181019050611ed7565b505050505050565b611f1581612bad565b611f1f8184612c46565b9250611f2a82612b78565b8060005b83811015611f5b578151611f428782611d5c565b9650611f4d83612c00565b925050600181019050611f2e565b505050505050565b611f6c81612bb8565b611f768184612c51565b9250611f8182612b82565b8060005b83811015611fb2578151611f998782611d5c565b9650611fa483612c0d565b925050600181019050611f85565b505050505050565b611fc381612c9b565b82525050565b611fd281612c9b565b82525050565b611fe181612c9b565b82525050565b6000611ff282612bce565b611ffc8185612c6d565b935061200c818560208601612d14565b80840191505092915050565b600061202382612bc3565b61202d8185612c5c565b935061203d818560208601612d14565b61204681612d51565b840191505092915050565b600061205c82612bc3565b6120668185612c6d565b9350612076818560208601612d14565b80840191505092915050565b600061208f601883612c78565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b60006120cf603783612c78565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b6000612135601e83612c78565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612175601883612c78565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b60006121b5602783612c78565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061221b603083612c78565b91507f6e756c6c6966696572207772697474656e20696e20646966666572656e74207260008301527f6573696475616c2062697420662e652e000000000000000000000000000000006020830152604082019050919050565b6000612281602583612c78565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006122e7604983612c78565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b6000612373602283612c78565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006123d9603383612c78565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b600061243f602a83612c78565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b60006124a5601c83612c78565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b60006124e5603b83612c78565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b600061254b600083612c6d565b9150600082019050919050565b6000612565603783612c78565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b60006125cb603983612c78565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61262d81612cc5565b82525050565b61263c81612cc5565b82525050565b61265361264e82612cc5565b612d47565b82525050565b60006126658285611de9565b6040820191506126758284611f0c565b6080820191508190509392505050565b60006126918284611fe7565b915081905092915050565b60006126a78261253e565b9150819050919050565b60006126bd828a612642565b6020820191506126cd8289612051565b91506126d98288612051565b91506126e58287611eb5565b6040820191506126f58286611f0c565b6080820191506127058285611eb5565b6040820191506127158284611f63565b6101208201915081905098975050505050505050565b60006020820190506127406000830184611d83565b92915050565b600060608201905061275b6000830186611d74565b6127686020830185611d83565b6127756040830184612624565b949350505050565b60006040820190506127926000830185611d74565b61279f6020830184612624565b9392505050565b60006020820190506127bb6000830184611fc9565b92915050565b600060c0820190506127d66000830187611fc9565b6127e36020830186611d92565b6127f06060830185611d92565b81810360a08301526128028184611e40565b905095945050505050565b6000602082019050818103600083015261282681612082565b9050919050565b60006020820190508181036000830152612846816120c2565b9050919050565b6000602082019050818103600083015261286681612128565b9050919050565b6000602082019050818103600083015261288681612168565b9050919050565b600060208201905081810360008301526128a6816121a8565b9050919050565b600060208201905081810360008301526128c68161220e565b9050919050565b600060208201905081810360008301526128e681612274565b9050919050565b60006020820190508181036000830152612906816122da565b9050919050565b6000602082019050818103600083015261292681612366565b9050919050565b60006020820190508181036000830152612946816123cc565b9050919050565b6000602082019050818103600083015261296681612432565b9050919050565b6000602082019050818103600083015261298681612498565b9050919050565b600060208201905081810360008301526129a6816124d8565b9050919050565b600060208201905081810360008301526129c681612558565b9050919050565b600060208201905081810360008301526129e6816125be565b9050919050565b6000604082019050612a026000830185612624565b612a0f6020830184612624565b9392505050565b6000606082019050612a2b6000830186612624565b612a386020830185612624565b612a456040830184612624565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612a7057600080fd5b8060405250919050565b600067ffffffffffffffff821115612a9157600080fd5b602082029050919050565b600067ffffffffffffffff821115612ab357600080fd5b602082029050919050565b600067ffffffffffffffff821115612ad557600080fd5b602082029050919050565b600067ffffffffffffffff821115612af757600080fd5b602082029050919050565b600067ffffffffffffffff821115612b1957600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612b4557600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060029050919050565b600060029050919050565b600060029050919050565b600060049050919050565b600060099050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612c9482612ca5565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612cda82612ce1565b9050919050565b6000612cec82612cf3565b9050919050565b6000612cfe82612ca5565b9050919050565b82818337600083830152505050565b60005b83811015612d32578082015181840152602081019050612d17565b83811115612d41576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612d6b81612c89565b8114612d7657600080fd5b50565b612d8281612c9b565b8114612d8d57600080fd5b50565b612d9981612cc5565b8114612da457600080fd5b5056fea365627a7a72315820581195eb613966cd593b726868fc28cf68f8daa35097a7bd66193af259e0d6006c6578706572696d656e74616cf564736f6c63430005110040" + +def template() -> None: + print("***********************") + + poseidonContractSi = Poseidon("") + transactionReceipt = poseidonContractSi.deploy("contract/poseidon/abi/Poseidon.bin") + contractAddress = transactionReceipt['contractAddress'] + print("contractAddress: ", contractAddress) + poseidonContract = Poseidon(contractAddress) + inputs = [1,2] + python_result = poseidon(inputs) + print(python_result) + contract_result = poseidonContract.poseidon(inputs) + print(contract_result) + + +def deploy() -> None: + print("***********************") + + client = BcosClient() + abi = [{'constant': True, 'inputs': [{'name': 'input', 'type': 'uint256[]'}], 'name': 'poseidon', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'pure', 'type': 'function'}] + bin = "0x6120f4808038036000396000f37c01000000000000000000000000000000000000000000000000000000006000350463c4420fb4146200002e57fe5b7f2a605eab3c12c29701b9a8944a16ff3d64c199efa7c857c65e4c0560ab3b0ca16020527f25a8fb283934520d61862db42ab5fbbf21a13613f7e99cae00232a61959d468f60e0527f29f93e7ee3e09f10c2b577ab2056fa0b2694d164866d49122ce17818e2277ec16101a0527f2a101efc715f13fe15729e91c076536903f8718ffac65a04a1fff47e51ed0d6d610260527f23d3d70151df81f917113a847d8e61f4929b7edcc6ba0dfe6bd0116713834d61610320527f2185e429a96435c62e21e7091f4262685769e43fa49c9d40f88c41016c588ada6103e0527f1f5b500f1c0f88bcca0d51538b1a787ccd014eeb3831cecc5752dbb1a5732e756040527f063052928cdf6319a5cb946c2becbe0e4ebc9cc6244c9903a123707e595ebcad610100527f1321691a1c7edf2cdabb0bd4558d82ff697277299f7fec56406566faefd20d246101c0527f141194b8fa596f801dcbd27cd0a1fa45aa8d7a1db367e8f495dc906962b60750610280527f125bcfe7de4c761bea5cc5f06d853f39840c8648e0e321d5ab7dc779252d32a6610340527f1d583a5b54b566e83a38a7667d0a979327e66a3bf403f589b5f24c617d6f1aee610400527f140c27dca8225f48f74d55391032c02a2677a34a51cf8f329b6b1a0076a186316060527f057ccb8d91f4a1fa9e5039cf4f457e364f940cf575259be35c614030535293c6610120527f022588e3bcf16d2f9583ff188e2455e4d77e570a01366b13c3b0e9d1cd3dea276101e0527f0a8bef1519e2b7cc844b0714b71fe093a73334505b6b8e71d731aa1a6a63e9b26102a0527f2cb31f422481e106c8cf448eaa6b61fe07544eff879951baefb03cb91dbc1e3e610360527f14d180bf4c3bb4c109918b8bed15f0f781bfec0e0d63bed877c5ba8d21d78184610420527f2435feebb56e56c96b4d8a90637235e4f769cca19ee5cc0e1c84b4f74490cee36080527f249e9f24440c84e77026b8e111f2e6ca6d124556505b4e5bd5215983b445cbec610140527f2ae7c8d8341fc04509d31c5c3caf7b182cbadd6e89bd80e2a8dd438740a1400c610200527f0980e6aa5e105658acd1eddde95a92ffa1556f142a596b401f48395d47dc5a516102c0527f03c96fb68f083dfafb98c5e09181baf2f94dce618fbc78264bcc6ac102cd6f55610380527f11c3c8fdf6c7cfa26046d59ad05834c854f7f4324fe53f4abfbc9437b3d13082610440527f1cabef035d32194e6327ccafed62049f16340bd6522d0e0cfc04c1f3eb6cb8a460a0527f17250b02a83957b0d036d216114793fe53ef92d12ce1b91666546ac818e40c74610160527f25b1e032d89662f0666956c34f323c344278f370e4ca56409d7acc9098797797610220527f0f4461f42060b27d3b34a34d8a0a2d3d6a3d812f3756dcb19e5b04c689a83a5b6102e0527f1cbe64ac49aebf693279d246b2c8e257e99612512afdb30635f5b99ce579f92e6103a0527f2fd9287af078462bc14f7f1da959e7df7e9a1598b833d3e98cc3552456f8e985610460527f0809febd6b71b85af68e97b3a334b8240e138d95bdec10f96757b1972c74c70360c0527f075c1923454f6b1f87f00b238dbda2323e5ed5885a07d6681c8148aacbc32df8610180527f0af9bf6e54a040be1910bcab732d2a5451e356c9b0e54f196bc962bfa37a5784610240527f0a9346be53c2fa9f7907c52cbf7204de8c1c5dc8b90e2a800c6c1d290ae62c00610300527f2375201a368412e3c2046d85fae310971047afe12b973a429b097e44843eef636103c0527f2ccb8565240997047bef4989cf92c3d2017eb0fa368b135d2d2941c13ddcd324610480527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160e43560c43560a4356084356064356044357f1fd4a35e68f0946f8f5dfd2ac9d7882ce2466ec1c9766f69b5a14c3f84a17be2878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990508682818082800980090991508683818082800980090992508684818082800980090993508685818082800980090994508686818082800980090995506200062960005262001f94565b7f170118300987f2aa8128c6893a7691621b7dd210af7f412385f8d6663782490887818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050868281808280098009099150868381808280098009099250868481808280098009099350868581808280098009099450868681808280098009099550620006c460005262001f94565b7f0b734ac64dd2198297d67aab5b9f2dd61ae0a5e169692c8802760c97c1b7b0ed878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990508682818082800980090991508683818082800980090992508684818082800980090993508685818082800980090994508686818082800980090995506200075f60005262001f94565b7f1430e42a7b4242b4586f06e9885a444ea4920fac92e2dfbc3cc16ebc2bc3416787818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050868281808280098009099150868381808280098009099250868481808280098009099350868581808280098009099450868681808280098009099550620007fa60005262001f94565b7f2d03cefd44927bbfa58fb8a8f22a0686c99db6ea9673e5ae2e3f51016b4d7812878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200085960005262001f94565b7f27a60ef60d51be502cad8248a0f6ddc28f49ce9e174032bb1a054503691a99b387818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620008b860005262001f94565b7f080a061bb2bc9ebb8c05ecf71fc842c7a09a85d48f5147fdd3bafc8d63a61801878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200091760005262001f94565b7f0470cb196b0b31dcf0f998c08fd4a2d3784c84625d3d23cd9959c8df3d61a850878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200097660005262001f94565b7f236a18fd797bcde8ceefd41745367450d80ecaf8fa5da304af8dd07d6c9c4a2f87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620009d560005262001f94565b7f2da94346d74ec77c4e5f937d2d595070636e2fcdb9349ce0e2c789c9e9d41ae78781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000a3460005262001f94565b7f278c16574216dd6780c4233d2e8bc1f90a76442f4fed1678d91a38f26a169f1d8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000a9360005262001f94565b7f0aba88ce0a5f3f57c82b73cc72d86f0182a5ebbf61236cf2d67e3903428f105c8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000af260005262001f94565b7f13d45f17ebd7bd267612d1c7d028c3ef2380ee77838b1809039156e45ea399da8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000b5160005262001f94565b7f2d7a5202c14dd920b8382ce02653223d81eeeba9e2a27473af50810482e01dd78781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000bb060005262001f94565b7f245a0767c5b055812467f081108f7dfee5dcfc10f80079da8e941c77cc13db688781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000c0f60005262001f94565b7f2c59e967a2d4ea6770593f65039451741d23b5da99dc8042070a39907478b66e8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000c6e60005262001f94565b7f24c85e48d7afe1001e8f66c6dd31213b4288933a0ad379864f16743df2c980038781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000ccd60005262001f94565b7f227cd523af710c598ecab087c2843100f7a9738c3d488c007e428d91b1f337668781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000d2c60005262001f94565b7f2559fff5296c533ad4c7c6e1c88b9c69980b197513e317db5402d492799eeb9f8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000d8b60005262001f94565b7f02a601bfc4da9459e9718fe6b926c0e175e63aa2217abf643dc9e0757d7ef1548781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000dea60005262001f94565b7f0da58042d5874668e8e0f3a278dfc8c8b08ccfbf5b4257ed2832affb60cb41128781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000e4960005262001f94565b7f2e6fdd26eac7bf454187dee626ab4b3f421739e8318796503f16da5691f1bed98781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000ea860005262001f94565b7f21be0174899457628eb771a9505580d1e4ef36ffb502219a2f43351b18d2784e8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000f0760005262001f94565b7f2133b63278501b60e86883b00a54619ccf4a7cf07702dea240f53b19005f5a368781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000f6660005262001f94565b7f21841c731a220c4817edefba29768e949c0b519bb8e320fab91d0c18a102bc188781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062000fc560005262001f94565b7f18b6901831fde10bda86893ae8cbd9f9da5af120dc44c89f5152926c28f2ed2f878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200102460005262001f94565b7f2ec53e23654ad18aca5c584b2eac05eb7d4db203b23ca6620ec475a8795d4202878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200108360005262001f94565b7f2c939494de2138a2ca5e19ce4b67cdffce49ed1107248aa5edb6e12c7d28df7787818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620010e260005262001f94565b7f0623ee7891199514435ad1ff285fb74fd43a7bb0dae62dbbdb36aff96e508972878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200114160005262001f94565b7f22c8292e61a9bddf3d205cb50a7a4d29b06c431e53ec8fbaad8a73dd4104c64a87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620011a060005262001f94565b7f0d51b55ec1f59f569076ecff66ba152b07679bc50dad6cd703b46b95e1cbd7e287818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620011ff60005262001f94565b7f27154bbfb0588b6f36300701b00213556cb869bb368c63d1ded2a8416e273c0d878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200125e60005262001f94565b7f17b1370ccffe479909b0c1f7dc671b344494342940019105b90562cc4228eb5c87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620012bd60005262001f94565b7f20ff783c31f906b9d0a4ae973600ee91e99e4565100c310065c27d0127059074878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200131c60005262001f94565b7f13c45ba44e91db74e719b45a15914640283f1db32e1a4304667bcf67230c615b878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200137b60005262001f94565b7f29cfab68a5620b3760e361caac37294ec856607f2729f2403af22ae485fe48ba87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620013da60005262001f94565b7f1380cf7791392e856692cd802e0820e89d319fe8b262dffb8abd00cc83d10f27878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200143960005262001f94565b7f2d9d9fdcac77dd461f1b159edc18eac9e53a01172733e042fe4ab39f76d4939b878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200149860005262001f94565b7e28701c995d998357f61aae3b02a6764caf807a024ba0478965be12256d62a087818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620014f660005262001f94565b7f06268de0019eb6197fd8b34ca05a250aa2215a169f66b89acc7c70bbbdd26591878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200155560005262001f94565b7f1b8191c81911bb23fd08d9f32c9cfc39d498d937c2cf2b4a286ce463f735e1b587818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620015b460005262001f94565b7f05a7f29c502bbc907f811b53e6901a4598539d0b2404c2c0f998bdc51d877216878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200161360005262001f94565b7f164d0f7cbcdfd7c008c3ad541f1eb04374cdce427af07abbd20abb3c5f47e322878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200167260005262001f94565b7f096f6dad4af11aef93cd170b131dc5ca907f1554edb860a2183b8f387bbfc49387818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620016d160005262001f94565b7f0aef194b2253cc03deb323029aa3d280cfc3bba70dbe35ebc76c4e5efb28f44c878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200173060005262001f94565b7f2739ce523e8ac7040f41978fcb09a61fc893f489a7ac63b7dc2b666a0450b8b7878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200178f60005262001f94565b7f0dda954b88b4662b7228ea53dfc0035cf1c3e54a3eff951ed20eddf50abd007087818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620017ee60005262001f94565b7f06013c9903173cc6bf78d659ddc7ddde597add8f66b4adf14fd0fdd2aea80b42878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200184d60005262001f94565b7f2a44a05caa05df06a56f318ae930c0f5b1238eff2cc641442940c42125e3b1d887818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620018ac60005262001f94565b7f14c09ffabca71eaed84af10167d78bb3e29f0bbbf2d4a7537e046b0b81a560c4878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200190b60005262001f94565b7f142aaa6de3cf63bb4172a80f539bf5ecd9a42802d39bce5d3728e9bcde35a55a878183089150878184089250878185089350878186089450878187089550878188089650508681818082800980090990506200196a60005262001f94565b7f06cea3644ef4942b5b898426b6c4845162e327a2ba7660cf2dca68f1ea3ab82a87818308915087818408925087818508935087818608945087818708955087818808965050868181808280098009099050620019c960005262001f94565b7f0fd2f28081191b6e436ee90785b22c924bc5936d6ff57c6e5d58f30a83dd46378781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001a2860005262001f94565b7f1f138e07b3bd619267c920f1b52bf311de510f7b04b7c6575bc19dac05286c858781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001a8760005262001f94565b7f1f3a2010c0091c2bf3cdd2834b1480186f4e474b4178af042d82122a69ee1b698781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001ae660005262001f94565b7f1a33927f88bde3319be2cc152435e2ca4b055462321224031404d350be0d03d48781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001b4560005262001f94565b7f15aa17ff60cb072ec045ab101d2eaf64a7ad4cb59493994b4354eef81e7841bf8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001ba460005262001f94565b7f16742ccf030b475a60958dc351e00eb04c088b74d90ba19cd0dc52ff1d8f71788781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001c0360005262001f94565b7f2c03e4f03286941a2ce351f9aad0db78cc42c0b4047849321162da82970b7bd58781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001c6260005262001f94565b7f1a03612ed3fe94958cf4f636e636b4742f8a967ef0d897fe140581ff2107ee4f8781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001cc160005262001f94565b7f1852fd3c50e032d8cb1185165dd9f4c38d6a43094d5686e2eec4d8dbc62966178781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905062001d2060005262001f94565b7ea0d0c4017ec6d8e48c88026c5574218b85ca4bb416fe7dd5301f0cf4963a638781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001dba60005262001f94565b7f2aff97dafead01e68ee8bfcbdb0079f19483cb551634d05dcc52344a35695e608781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001e5560005262001f94565b7f1fe380a3a0814b5ec3bd91dfa1d95992cffdd77ec0341b95b8f6b3509d2670018781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001ef060005262001f94565b7f1783668830df79d79707da6a0e7c023c5f54a112be7ee3f7d49b420213ab7f648781830891508781840892508781850893508781860894508781870895508781880896505086818180828009800909905086828180828009800909915086838180828009800909925086848180828009800909935086858180828009800909945086868180828009800909955062001f8b60005262001f94565b60005260206000f35b8660205182098760405184098891088760605185098891088760805186098891088760a05187098891088760c05188098891088760e05183098861010051850989910888610120518609899108886101405187098991088861016051880989910888610180518909899108886101a0518409896101c05186098a9108896101e05187098a9108896102005188098a9108896102205189098a910889610240518a098a9108896102605185098a6102805187098b91088a6102a05188098b91088a6102c05189098b91088a6102e0518a098b91088a610300518b098b91088a6103205186098b6103405188098c91088b6103605189098c91088b610380518a098c91088b6103a0518b098c91088b6103c0518c098c91088b6103e05187098c6104005189098d91088c610420518a098d91088c610440518b098d91088c610460518c098d91088c610480518d098d91089a509850965094509250905060005156" + + mixerTransactionRecipient = client.sendRawTransactionGetReceipt("", abi, None, None, bin) + mixer_address = mixerTransactionRecipient['contractAddress'] + print(f"deploy: mixer_address={mixer_address}") + inputs = [1, 2] + python_result = poseidon(inputs) + print(python_result) + poseidonContract = Poseidon(mixer_address) + contract_result = poseidonContract.poseidon(inputs) + print(contract_result) + + +if __name__ == '__main__': + deploy() diff --git a/test_commands/test_two_tree_mixer.py b/test_commands/test_two_tree_mixer.py index cf379ae..96d3440 100644 --- a/test_commands/test_two_tree_mixer.py +++ b/test_commands/test_two_tree_mixer.py @@ -16,6 +16,7 @@ import zeth.merkle_tree import zeth.utils from commands.constants import PROVER_SERVER_ENDPOINT_DEFAULT +from commands.poseidon_deploy import deployPoseidon from commands.zeth_deploy import deploy from commands.zeth_token_deploy import deploy_asset from contract.BAC001 import BAC001 @@ -116,7 +117,10 @@ def main() -> None: asset_address = deploy_asset("AAAA", "AAA", 18, 100000000) token_instance = BAC001(asset_address) - mixer_address = deploy(asset_address) + + poseidon_address = deployPoseidon() + + mixer_address = deploy(asset_address,poseidon_address) mixer_instance = Groth16Mixer(mixer_address) mixer_instance.client.ecdsa_account = deployer_ac mixer_instance.client.keypair = deployer_keypair diff --git a/user.md b/user.md new file mode 100644 index 0000000..26e1245 --- /dev/null +++ b/user.md @@ -0,0 +1,77 @@ +yum install python-devel mysql-devel +## 用户手册 + 此服务提供BAC的匿名转账功能; + 1 导入/或生成fisco地址 + 2 生成ZKBAC地址(匿名转账所需的地址) + 3 存入资产,获取utxo + 4 转账 + 5 取出资产 + + ## 转账原理 + 转账为两入两出模型; + inputs1 ---|------output1 + inputs2 ---|------output2 + (zethaddress:value) utxo模型 + + ``` + def joinsplit( + self, + mk_tree: MerkleTree, + sender_ownership_keypair: OwnershipKeyPair, + sender_eth_address: str, + inputs: List[Tuple[int, ZethNote]], + outputs: List[Tuple[ZethAddressPub, EtherValue]], + v_in: EtherValue, + v_out: EtherValue, + tx_value: Optional[EtherValue] = None, + compute_h_sig_cb: Optional[ComputeHSigCB] = None) -> str: + ``` +``` +function mix( + uint256[2] memory a, + uint256[4] memory b, + uint256[2] memory c, + uint256[4] memory vk, + uint256 sigma, + uint256[nbInputs] memory input, + bytes[jsOut] memory ciphertexts) +``` + +solidity input +``` + // ====================================================================== // + // Reminder: Remember that the primary inputs are ordered as follows: + // + // [Root, CommitmentS, NullifierS, h_sig, h_iS, Residual Field Element(S)] + // + // ie, below is the index mapping of the primary input elements on the + // protoboard: + // + // - Index of the "Root" field elements: {0} + // - Index of the "CommitmentS" field elements: [1, 1 + NumOutputs[ + // - Index of the "NullifierS" field elements: + // [1 + NumOutputs, 1 + NumOutputs + NumInputs[ + // - Index of the "h_sig" field element: {1 + NumOutputs + NumInputs} + // - Index of the "Message Authentication TagS" (h_i) field elements: + // [1 + NumOutputs + NumInputs + 1, + // 1 + NumOutputs + NumInputs + 1 + NumInputs[ + // - Index of the "Residual Field Element(s)" field elements: + // [1 + NumOutputs + NumInputs + 1 + NumInputs, + // 1 + NumOutputs + NumInputs + 1 + NumInputs + nb_field_residual[ + // + + // digest_length=256 field_capacity=253 public_value_length = 64 + // The Residual field elements are structured as follows: + // - v_pub_in [0, public_value_length[ 0-64 + // - v_pub_out [public_value_length, 2*public_value_length[ 64-128 + // - h_sig remaining bits + // [2*public_value_length, 128 - 131 + // 2*public_value_length + (digest_length-field_capacity)[ + // - nullifierS remaining bits: 131-137 + // [2*public_value_length + (digest_length-field_capacity), + // 2*public_value_length + (1+NumInputs)*(digest_length-field_capacity)[ + // - message authentication tagS remaining bits: 137 -143 + // [2*public_value_length + (1+NumInputs)*(digest_length-field_capacity), + // 2*public_value_length + (1+2*NumInputs)*(digest_length-field_capacity)] + // ============================================================================================ // +``` \ No newline at end of file diff --git "a/\347\224\250\346\210\267\346\211\213\345\206\214.md" "b/\347\224\250\346\210\267\346\211\213\345\206\214.md" deleted file mode 100644 index 208fd35..0000000 --- "a/\347\224\250\346\210\267\346\211\213\345\206\214.md" +++ /dev/null @@ -1,39 +0,0 @@ -yum install python-devel mysql-devel -## 用户手册 - 此服务提供BAC的匿名转账功能; - 1 导入/或生成fisco地址 - 2 生成ZKBAC地址(匿名转账所需的地址) - 3 存入资产,获取utxo - 4 转账 - 5 取出资产 - - ## 转账原理 - 转账为两入两出模型; - inputs1 ---|------output1 - inputs2 ---|------output2 - (zethaddress:value) utxo模型 - - ``` - def joinsplit( - self, - mk_tree: MerkleTree, - sender_ownership_keypair: OwnershipKeyPair, - sender_eth_address: str, - inputs: List[Tuple[int, ZethNote]], - outputs: List[Tuple[ZethAddressPub, EtherValue]], - v_in: EtherValue, - v_out: EtherValue, - tx_value: Optional[EtherValue] = None, - compute_h_sig_cb: Optional[ComputeHSigCB] = None) -> str: - ``` -``` -function mix( - uint256[2] memory a, - uint256[4] memory b, - uint256[2] memory c, - uint256[4] memory vk, - uint256 sigma, - uint256[nbInputs] memory input, - bytes[jsOut] memory ciphertexts) -``` -input: \ No newline at end of file