diff --git a/commands/zeth_deploy.py b/commands/zeth_deploy.py index d9e4411..f2c990e 100644 --- a/commands/zeth_deploy.py +++ b/commands/zeth_deploy.py @@ -53,9 +53,9 @@ def deploy( f1.close() ''' - 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"}] + 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": False, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}, {"internalType": "bytes32[2]", "name": "nfs", "type": "bytes32[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": False, "stateMutability": "nonpayable", "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 = "6080604052600080553480156200001557600080fd5b5060405162003d3338038062003d3383398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b61312b8062000c086000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611e77565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612c43565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611d92565b61031e565b604051610114929190612cb8565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611d92565b61039a565b6040516101519190612a4d565b60405180910390f35b610174600480360361016f9190810190611dbc565b6103c2565b005b34801561018257600080fd5b5061019d60048036036101989190810190611ef2565b6105e8565b6040516101aa9190612a4d565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611d17565b610654565b6040516101e79190612a68565b60405180910390f35b3480156101fc57600080fd5b50610205610668565b60405161021493929190612ce1565b60405180910390f35b34801561022957600080fd5b5061023261068b565b60405161023f919061298a565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806106b1565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c090612b03565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103af57fe5b602002015190508060001b915050919050565b6103ca611999565b6103d585848361086c565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106103fd57fe5b60200201518560016002811061040f57fe5b60200201518c8c8c8a60405160200161042e9796959493929190612910565b60405160208183030381529060405260405161044a91906128e4565b602060405180830381855afa158015610467573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061048a9190810190611ea0565b90506104de8660006004811061049c57fe5b6020020151876001600481106104ae57fe5b6020020151886002600481106104c057fe5b6020020151896003600481106104d257fe5b60200201518986610a55565b61051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051490612be3565b60405180910390fd5b61052989898987610b2c565b610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612b83565b60405180910390fd5b610570611999565b61057a8582610d33565b60006105866002610d8f565b905061059181610e04565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7600054828685896040516105ca959493929190612c5e565b60405180910390a16105db86610e45565b5050505050505050505050565b60006002831061062d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062490612a83565b60405180910390fd5b600082846002800101600a811061064057fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106106e357fe5b018190555060006002600560020a816106f857fe5b0490505b600081111561086857606060026040519080825280602002602001820160405280156107375781602001602082028038833980820191505090505b5090508260001c8160008151811061074b57fe5b6020026020010181815250508260001c8160018151811061076857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016107cf9190612a2b565b60206040518083038186803b1580156107e757600080fd5b505afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061081f9190810190611ec9565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f811061084f57fe5b01819055506002838161085e57fe5b04925050506106fc565b5050565b610875826111fd565b6108b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ab90612b23565b60405180910390fd5b60008090505b60028110156109825760006108cf82856105e8565b90506005600082815260200190815260200160002060009054906101000a900460ff1615610932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092990612aa3565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061096b57fe5b6020020181815250505080806001019150506108ba565b5060006002828560405160200161099a9291906128b8565b6040516020818303038152906040526040516109b691906128e4565b602060405180830381855afa1580156109d3573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109f69190810190611ea0565b9050600381901c90506000610a0a8461039a565b9050808214610a4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4590612b43565b60405180910390fd5b5050505050565b6000610a5f6119bb565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610ada57fe5b602002015181600060058110610aec57fe5b6020020151148015610b1f575080600360058110610b0657fe5b602002015181600160058110610b1857fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b5a6119dd565b86600060028110610b6757fe5b602002015181600001818152505086600160028110610b8257fe5b602002015181602001818152505085600060048110610b9d57fe5b602002015181604001818152505085600160048110610bb857fe5b602002015181606001818152505085600260048110610bd357fe5b602002015181608001818152505085600360048110610bee57fe5b60200201518160a001818152505084600060028110610c0957fe5b60200201518160c001818152505084600160028110610c2457fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610c715781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d1857838682600a8110610c9d57fe5b602002015110610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612bc3565b60405180910390fd5b8581600a8110610cee57fe5b6020020151828281518110610cff57fe5b6020026020010181815250508080600101915050610c7a565b50610d2381836112e8565b6001149350505050949350505050565b60008090505b6002811015610d8a5760008382600201600a8110610d5357fe5b602002015160001b905080838360028110610d6a57fe5b602002018181525050610d7c81610248565b508080600101915050610d39565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610dd857610dbe818385611604565b809450819350505060028181610dd057fe5b049050610daa565b60016000805481526020019081526020016000206000603f8110610df857fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e518361031e565b915091506000821115610f9857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f50576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f18939291906129a5565b600060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b5050505050610f93565b813414610f92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990612ba3565b60405180910390fd5b5b611050565b600034111561104f5760003373ffffffffffffffffffffffffffffffffffffffff1634604051610fc7906128fb565b60006040518083038185875af1925050503d8060008114611004576040519150601f19603f3d011682016040523d82523d6000602084013e611009565b606091505b505090508061104d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104490612ac3565b60405180910390fd5b505b5b60008111156111f857600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b81526004016111119291906129ef565b600060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b50505050506111f7565b60003373ffffffffffffffffffffffffffffffffffffffff168260405161116f906128fb565b60006040518083038185875af1925050503d80600081146111ac576040519150601f19603f3d011682016040523d82523d6000602084013e6111b1565b606091505b50509050806111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612ae3565b60405180910390fd5b505b5b505050565b6000806000905060008090505b60005481116112dc57600460008281526020019081526020016000206000856000600a811061123557fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112675781806001019250505b600460008281526020019081526020016000206000856001600a811061128957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112bb5781806001019250505b60028214156112cf576001925050506112e3565b808060010191505061120a565b5060009150505b919050565b60006007600a0180549050600184510114611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f90612b63565b60405180910390fd5b611340611a22565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156113c957835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf180821688169750505060028401935060208301925061137a565b50505050508061140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140590612c23565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f192505050806115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115df90612c03565b60405180910390fd5b816000601881106115f557fe5b60200201519250505092915050565b6000806000600186039050600060011986168201905060008060018716146117c5576001868401039050606060026040519080825280602002602001820160405280156116605781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061168257fe5b015460001c8160008151811061169457fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f81106116c257fe5b015460001c816001815181106116d457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161173b9190612a2b565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061178b9190810190611ec9565b60001b6001600080548152602001908152602001600020600260018503816117af57fe5b04603f81106117ba57fe5b0181905550506117cb565b85830190505b5b81811115611971576002810390506060600260405190808252806020026020018201604052801561180c5781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061182e57fe5b015460001c8160008151811061184057fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f811061186e57fe5b015460001c8160018151811061188057fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016118e79190612a2b565b60206040518083038186803b1580156118ff57600080fd5b505afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119379190810190611ec9565b60001b60016000805481526020019081526020016000206002600185038161195b57fe5b04603f811061196657fe5b0181905550506117cc565b6002878161197b57fe5b046002600188018161198957fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611a54816130a3565b92915050565b600082601f830112611a6b57600080fd5b6002611a7e611a7982612d45565b612d18565b9150818360005b83811015611ab55781358601611a9b8882611c45565b845260208401935060208301925050600181019050611a85565b5050505092915050565b600082601f830112611ad057600080fd5b600a611ae3611ade82612d67565b612d18565b91508183856020840282011115611af957600080fd5b60005b83811015611b295781611b0f8882611ced565b845260208401935060208301925050600181019050611afc565b5050505092915050565b600082601f830112611b4457600080fd5b6002611b57611b5282612d89565b612d18565b91508183856020840282011115611b6d57600080fd5b60005b83811015611b9d5781611b838882611ced565b845260208401935060208301925050600181019050611b70565b5050505092915050565b600082601f830112611bb857600080fd5b6004611bcb611bc682612dab565b612d18565b91508183856020840282011115611be157600080fd5b60005b83811015611c115781611bf78882611ced565b845260208401935060208301925050600181019050611be4565b5050505092915050565b600081359050611c2a816130ba565b92915050565b600081519050611c3f816130ba565b92915050565b600082601f830112611c5657600080fd5b8135611c69611c6482612dcd565b612d18565b91508082526020830160208301858383011115611c8557600080fd5b611c90838284613046565b50505092915050565b600082601f830112611caa57600080fd5b8135611cbd611cb882612df9565b612d18565b91508082526020830160208301858383011115611cd957600080fd5b611ce4838284613046565b50505092915050565b600081359050611cfc816130d1565b92915050565b600081519050611d11816130d1565b92915050565b60008060008060808587031215611d2d57600080fd5b6000611d3b87828801611a45565b9450506020611d4c87828801611a45565b9350506040611d5d87828801611ced565b925050606085013567ffffffffffffffff811115611d7a57600080fd5b611d8687828801611c99565b91505092959194509250565b60006101408284031215611da557600080fd5b6000611db384828501611abf565b91505092915050565b6000806000806000806000610300888a031215611dd857600080fd5b6000611de68a828b01611b33565b9750506040611df78a828b01611ba7565b96505060c0611e088a828b01611b33565b955050610100611e1a8a828b01611ba7565b945050610180611e2c8a828b01611ced565b9350506101a0611e3e8a828b01611abf565b9250506102e088013567ffffffffffffffff811115611e5c57600080fd5b611e688a828b01611a5a565b91505092959891949750929550565b600060208284031215611e8957600080fd5b6000611e9784828501611c1b565b91505092915050565b600060208284031215611eb257600080fd5b6000611ec084828501611c30565b91505092915050565b600060208284031215611edb57600080fd5b6000611ee984828501611d02565b91505092915050565b6000806101608385031215611f0657600080fd5b6000611f1485828601611ced565b9250506020611f2585828601611abf565b9150509250929050565b6000611f3b8383612247565b60208301905092915050565b6000611f538383612265565b60208301905092915050565b6000611f6b83836122b4565b905092915050565b6000611f7f8383612874565b60208301905092915050565b6000611f978383612892565b60208301905092915050565b611fac81613010565b82525050565b611fbb81612f9e565b82525050565b611fca81612e67565b611fd48184612f0d565b9250611fdf82612e25565b8060005b83811015612010578151611ff78782611f2f565b965061200283612ebf565b925050600181019050611fe3565b505050505050565b61202181612e67565b61202b8184612f18565b925061203682612e25565b8060005b8381101561206757815161204e8782611f47565b965061205983612ebf565b92505060018101905061203a565b505050505050565b600061207a82612e72565b6120848185612f23565b93508360208202850161209685612e2f565b8060005b858110156120d257848403895281516120b38582611f5f565b94506120be83612ecc565b925060208a0199505060018101905061209a565b50829750879550505050505092915050565b6120ed81612e7d565b6120f78184612f2e565b925061210282612e39565b8060005b8381101561213357815161211a8782611f8b565b965061212583612ed9565b925050600181019050612106565b505050505050565b61214481612e88565b61214e8184612f39565b925061215982612e43565b8060005b8381101561218a5781516121718782611f8b565b965061217c83612ee6565b92505060018101905061215d565b505050505050565b61219b81612e93565b6121a58184612f44565b92506121b082612e4d565b8060005b838110156121e15781516121c88782611f8b565b96506121d383612ef3565b9250506001810190506121b4565b505050505050565b60006121f482612e9e565b6121fe8185612f4f565b935061220983612e57565b8060005b8381101561223a5781516122218882611f73565b975061222c83612f00565b92505060018101905061220d565b5085935050505092915050565b61225081612fb0565b82525050565b61225f81612fb0565b82525050565b61226e81612fb0565b82525050565b61227d81612fba565b82525050565b600061228e82612eb4565b6122988185612f82565b93506122a8818560208601613055565b80840191505092915050565b60006122bf82612ea9565b6122c98185612f60565b93506122d9818560208601613055565b6122e281613092565b840191505092915050565b60006122f882612ea9565b6123028185612f82565b9350612312818560208601613055565b80840191505092915050565b600061232b601883612f8d565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061236b603783612f8d565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b60006123d1601e83612f8d565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612411601883612f8d565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612451602783612f8d565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124b7602583612f8d565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061251d604983612f8d565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006125a9602283612f8d565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061260f603383612f8d565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b6000612675602a83612f8d565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b60006126db601c83612f8d565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b600061271b603b83612f8d565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b6000612781600083612f71565b9150600082019050919050565b600061279b600083612f82565b9150600082019050919050565b60006127b5603783612f8d565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b600061281b603983612f8d565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b61287d81613006565b82525050565b61288c81613006565b82525050565b61289b81613006565b82525050565b6128b26128ad82613006565b613088565b82525050565b60006128c48285612018565b6040820191506128d48284612192565b6080820191508190509392505050565b60006128f08284612283565b915081905092915050565b60006129068261278e565b9150819050919050565b600061291c828a6128a1565b60208201915061292c82896122ed565b915061293882886122ed565b9150612944828761213b565b6040820191506129548286612192565b608082019150612964828561213b565b60408201915061297482846120e4565b6101408201915081905098975050505050505050565b600060208201905061299f6000830184611fb2565b92915050565b60006080820190506129ba6000830186611fa3565b6129c76020830185611fb2565b6129d46040830184612883565b81810360608301526129e581612774565b9050949350505050565b6000606082019050612a046000830185611fa3565b612a116020830184612883565b8181036040830152612a2281612774565b90509392505050565b60006020820190508181036000830152612a4581846121e9565b905092915050565b6000602082019050612a626000830184612256565b92915050565b6000602082019050612a7d6000830184612274565b92915050565b60006020820190508181036000830152612a9c8161231e565b9050919050565b60006020820190508181036000830152612abc8161235e565b9050919050565b60006020820190508181036000830152612adc816123c4565b9050919050565b60006020820190508181036000830152612afc81612404565b9050919050565b60006020820190508181036000830152612b1c81612444565b9050919050565b60006020820190508181036000830152612b3c816124aa565b9050919050565b60006020820190508181036000830152612b5c81612510565b9050919050565b60006020820190508181036000830152612b7c8161259c565b9050919050565b60006020820190508181036000830152612b9c81612602565b9050919050565b60006020820190508181036000830152612bbc81612668565b9050919050565b60006020820190508181036000830152612bdc816126ce565b9050919050565b60006020820190508181036000830152612bfc8161270e565b9050919050565b60006020820190508181036000830152612c1c816127a8565b9050919050565b60006020820190508181036000830152612c3c8161280e565b9050919050565b6000602082019050612c586000830184612883565b92915050565b600060e082019050612c736000830188612883565b612c806020830187612256565b612c8d6040830186611fc1565b612c9a6080830185611fc1565b81810360c0830152612cac818461206f565b90509695505050505050565b6000604082019050612ccd6000830185612883565b612cda6020830184612883565b9392505050565b6000606082019050612cf66000830186612883565b612d036020830185612883565b612d106040830184612883565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612d3b57600080fd5b8060405250919050565b600067ffffffffffffffff821115612d5c57600080fd5b602082029050919050565b600067ffffffffffffffff821115612d7e57600080fd5b602082029050919050565b600067ffffffffffffffff821115612da057600080fd5b602082029050919050565b600067ffffffffffffffff821115612dc257600080fd5b602082029050919050565b600067ffffffffffffffff821115612de457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612e1057600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612fa982612fe6565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061301b82613022565b9050919050565b600061302d82613034565b9050919050565b600061303f82612fe6565b9050919050565b82818337600083830152505050565b60005b83811015613073578082015181840152602081019050613058565b83811115613082576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6130ac81612f9e565b81146130b757600080fd5b50565b6130c381612fb0565b81146130ce57600080fd5b50565b6130da81613006565b81146130e557600080fd5b5056fea365627a7a723158200681dad9a2468c04d3031ae3856b4cd273e5060b0dcbefd4ceea6ed749f9fe746c6578706572696d656e74616cf564736f6c63430005110040" + binstr = "6080604052600080553480156200001557600080fd5b5060405162003e9e38038062003e9e83398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b6132968062000c086000396000f3fe6080604052600436106100915760003560e01c80639e198018116100595780639e19801814610181578063a52f1ea8146101be578063c73d16ae146101fb578063f9eb943f14610238578063fc0c546a1461026557610091565b80632d287e43146100965780632e94420f146100bf5780633e49ba65146100ea57806346deb341146101285780634773862d14610165575b600080fd5b3480156100a257600080fd5b506100bd60048036036100b89190810190611fc0565b610290565b005b3480156100cb57600080fd5b506100d4610360565b6040516100e19190612d8c565b60405180910390f35b3480156100f657600080fd5b50610111600480360361010c9190810190611e8a565b610366565b60405161011f929190612e01565b60405180910390f35b34801561013457600080fd5b5061014f600480360361014a9190810190611e8a565b6103e2565b60405161015c9190612b96565b60405180910390f35b61017f600480360361017a9190810190611eb4565b61040a565b005b34801561018d57600080fd5b506101a860048036036101a39190810190611f6f565b610631565b6040516101b59190612d8c565b60405180910390f35b3480156101ca57600080fd5b506101e560048036036101e0919081019061203b565b610855565b6040516101f29190612b96565b60405180910390f35b34801561020757600080fd5b50610222600480360361021d9190810190611e0f565b6108c1565b60405161022f9190612bb1565b60405180910390f35b34801561024457600080fd5b5061024d6108d5565b60405161025c93929190612e2a565b60405180910390f35b34801561027157600080fd5b5061027a6108f8565b6040516102879190612ad3565b60405180910390f35b600560020a60025414156102c957600160005401600081905550600560020a600254816102b957fe5b066002819055506102c861091e565b5b600560020a60025410610311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030890612c4c565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061035657fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061038257fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103f757fe5b602002015190508060001b915050919050565b610412611a1d565b61041d858483610631565b50600060023373ffffffffffffffffffffffffffffffffffffffff168460006002811061044657fe5b60200201518560016002811061045857fe5b60200201518c8c8c8a6040516020016104779796959493929190612a59565b6040516020818303038152906040526040516104939190612a2d565b602060405180830381855afa1580156104b0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506104d39190810190611fe9565b9050610527866000600481106104e557fe5b6020020151876001600481106104f757fe5b60200201518860026004811061050957fe5b60200201518960036004811061051b57fe5b60200201518986610ad9565b610566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055d90612d2c565b60405180910390fd5b61057289898987610bb0565b6105b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a890612ccc565b60405180910390fd5b6105b9611a1d565b6105c38582610db7565b60006105cf6002610e13565b90506105da81610e88565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf760005482868589604051610613959493929190612da7565b60405180910390a161062486610ec9565b5050505050505050505050565b600061063c83611281565b61067b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067290612c6c565b60405180910390fd5b60008090505b60028110156107495760006106968286610855565b90506005600082815260200190815260200160002060009054906101000a900460ff16156106f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f090612bec565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508084836002811061073257fe5b602002018181525050508080600101915050610681565b50600060028386604051602001610761929190612a01565b60405160208183030381529060405260405161077d9190612a2d565b602060405180830381855afa15801561079a573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506107bd9190810190611fe9565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190506000818360001c816107f257fe5b0690506000610800876103e2565b90508060001c8214610847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083e90612c8c565b60405180910390fd5b819450505050509392505050565b60006002831061089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089190612bcc565b60405180910390fd5b600082846002800101600a81106108ad57fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f811061095057fe5b018190555060006002600560020a8161096557fe5b0490505b6000811115610ad557606060026040519080825280602002602001820160405280156109a45781602001602082028038833980820191505090505b5090508260001c816000815181106109b857fe5b6020026020010181815250508260001c816001815181106109d557fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b8152600401610a3c9190612b74565b60206040518083038186803b158015610a5457600080fd5b505afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a8c9190810190612012565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f8110610abc57fe5b018190555060028381610acb57fe5b0492505050610969565b5050565b6000610ae3611a3f565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610b5e57fe5b602002015181600060058110610b7057fe5b6020020151148015610ba3575080600360058110610b8a57fe5b602002015181600160058110610b9c57fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610bde611a61565b86600060028110610beb57fe5b602002015181600001818152505086600160028110610c0657fe5b602002015181602001818152505085600060048110610c2157fe5b602002015181604001818152505085600160048110610c3c57fe5b602002015181606001818152505085600260048110610c5757fe5b602002015181608001818152505085600360048110610c7257fe5b60200201518160a001818152505084600060028110610c8d57fe5b60200201518160c001818152505084600160028110610ca857fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610cf55781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d9c57838682600a8110610d2157fe5b602002015110610d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5d90612d0c565b60405180910390fd5b8581600a8110610d7257fe5b6020020151828281518110610d8357fe5b6020026020010181815250508080600101915050610cfe565b50610da7818361136c565b6001149350505050949350505050565b60008090505b6002811015610e0e5760008382600201600a8110610dd757fe5b602002015160001b905080838360028110610dee57fe5b602002018181525050610e0081610290565b508080600101915050610dbd565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610e5c57610e42818385611688565b809450819350505060028181610e5457fe5b049050610e2e565b60016000805481526020019081526020016000206000603f8110610e7c57fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610ed583610366565b91509150600082111561101c57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fd4576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f9c93929190612aee565b600060405180830381600087803b158015610fb657600080fd5b505af1158015610fca573d6000803e3d6000fd5b5050505050611017565b813414611016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100d90612cec565b60405180910390fd5b5b6110d4565b60003411156110d35760003373ffffffffffffffffffffffffffffffffffffffff163460405161104b90612a44565b60006040518083038185875af1925050503d8060008114611088576040519150601f19603f3d011682016040523d82523d6000602084013e61108d565b606091505b50509050806110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c890612c0c565b60405180910390fd5b505b5b600081111561127c57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111cd576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b8152600401611195929190612b38565b600060405180830381600087803b1580156111af57600080fd5b505af11580156111c3573d6000803e3d6000fd5b505050505061127b565b60003373ffffffffffffffffffffffffffffffffffffffff16826040516111f390612a44565b60006040518083038185875af1925050503d8060008114611230576040519150601f19603f3d011682016040523d82523d6000602084013e611235565b606091505b5050905080611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127090612c2c565b60405180910390fd5b505b5b505050565b6000806000905060008090505b600054811161136057600460008281526020019081526020016000206000856000600a81106112b957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112eb5781806001019250505b600460008281526020019081526020016000206000856001600a811061130d57fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff161561133f5781806001019250505b600282141561135357600192505050611367565b808060010191505061128e565b5060009150505b919050565b60006007600a01805490506001845101146113bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b390612cac565b60405180910390fd5b6113c4611aa6565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b8183101561144d57835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf18082168816975050506002840193506020830192506113fe565b505050505080611492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148990612d6c565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f1925050508061166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166390612d4c565b60405180910390fd5b8160006018811061167957fe5b60200201519250505092915050565b600080600060018603905060006001198616820190506000806001871614611849576001868401039050606060026040519080825280602002602001820160405280156116e45781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061170657fe5b015460001c8160008151811061171857fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f811061174657fe5b015460001c8160018151811061175857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016117bf9190612b74565b60206040518083038186803b1580156117d757600080fd5b505afa1580156117eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061180f9190810190612012565b60001b60016000805481526020019081526020016000206002600185038161183357fe5b04603f811061183e57fe5b01819055505061184f565b85830190505b5b818111156119f557600281039050606060026040519080825280602002602001820160405280156118905781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f81106118b257fe5b015460001c816000815181106118c457fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f81106118f257fe5b015460001c8160018151811061190457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161196b9190612b74565b60206040518083038186803b15801561198357600080fd5b505afa158015611997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119bb9190810190612012565b60001b6001600080548152602001908152602001600020600260018503816119df57fe5b04603f81106119ea57fe5b018190555050611850565b600287816119ff57fe5b0460026001880181611a0d57fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611ad88161320e565b92915050565b600082601f830112611aef57600080fd5b6002611b02611afd82612e8e565b612e61565b91508183856020840282011115611b1857600080fd5b60005b83811015611b485781611b2e8882611d13565b845260208401935060208301925050600181019050611b1b565b5050505092915050565b600082601f830112611b6357600080fd5b6002611b76611b7182612eb0565b612e61565b9150818360005b83811015611bad5781358601611b938882611d3d565b845260208401935060208301925050600181019050611b7d565b5050505092915050565b600082601f830112611bc857600080fd5b600a611bdb611bd682612ed2565b612e61565b91508183856020840282011115611bf157600080fd5b60005b83811015611c215781611c078882611de5565b845260208401935060208301925050600181019050611bf4565b5050505092915050565b600082601f830112611c3c57600080fd5b6002611c4f611c4a82612ef4565b612e61565b91508183856020840282011115611c6557600080fd5b60005b83811015611c955781611c7b8882611de5565b845260208401935060208301925050600181019050611c68565b5050505092915050565b600082601f830112611cb057600080fd5b6004611cc3611cbe82612f16565b612e61565b91508183856020840282011115611cd957600080fd5b60005b83811015611d095781611cef8882611de5565b845260208401935060208301925050600181019050611cdc565b5050505092915050565b600081359050611d2281613225565b92915050565b600081519050611d3781613225565b92915050565b600082601f830112611d4e57600080fd5b8135611d61611d5c82612f38565b612e61565b91508082526020830160208301858383011115611d7d57600080fd5b611d888382846131b1565b50505092915050565b600082601f830112611da257600080fd5b8135611db5611db082612f64565b612e61565b91508082526020830160208301858383011115611dd157600080fd5b611ddc8382846131b1565b50505092915050565b600081359050611df48161323c565b92915050565b600081519050611e098161323c565b92915050565b60008060008060808587031215611e2557600080fd5b6000611e3387828801611ac9565b9450506020611e4487828801611ac9565b9350506040611e5587828801611de5565b925050606085013567ffffffffffffffff811115611e7257600080fd5b611e7e87828801611d91565b91505092959194509250565b60006101408284031215611e9d57600080fd5b6000611eab84828501611bb7565b91505092915050565b6000806000806000806000610300888a031215611ed057600080fd5b6000611ede8a828b01611c2b565b9750506040611eef8a828b01611c9f565b96505060c0611f008a828b01611c2b565b955050610100611f128a828b01611c9f565b945050610180611f248a828b01611de5565b9350506101a0611f368a828b01611bb7565b9250506102e088013567ffffffffffffffff811115611f5457600080fd5b611f608a828b01611b52565b91505092959891949750929550565b60008060006102008486031215611f8557600080fd5b6000611f9386828701611c9f565b9350506080611fa486828701611bb7565b9250506101c0611fb686828701611ade565b9150509250925092565b600060208284031215611fd257600080fd5b6000611fe084828501611d13565b91505092915050565b600060208284031215611ffb57600080fd5b600061200984828501611d28565b91505092915050565b60006020828403121561202457600080fd5b600061203284828501611dfa565b91505092915050565b600080610160838503121561204f57600080fd5b600061205d85828601611de5565b925050602061206e85828601611bb7565b9150509250929050565b60006120848383612390565b60208301905092915050565b600061209c83836123ae565b60208301905092915050565b60006120b483836123fd565b905092915050565b60006120c883836129bd565b60208301905092915050565b60006120e083836129db565b60208301905092915050565b6120f58161317b565b82525050565b61210481613109565b82525050565b61211381612fd2565b61211d8184613078565b925061212882612f90565b8060005b838110156121595781516121408782612078565b965061214b8361302a565b92505060018101905061212c565b505050505050565b61216a81612fd2565b6121748184613083565b925061217f82612f90565b8060005b838110156121b05781516121978782612090565b96506121a28361302a565b925050600181019050612183565b505050505050565b60006121c382612fdd565b6121cd818561308e565b9350836020820285016121df85612f9a565b8060005b8581101561221b57848403895281516121fc85826120a8565b945061220783613037565b925060208a019950506001810190506121e3565b50829750879550505050505092915050565b61223681612fe8565b6122408184613099565b925061224b82612fa4565b8060005b8381101561227c57815161226387826120d4565b965061226e83613044565b92505060018101905061224f565b505050505050565b61228d81612ff3565b61229781846130a4565b92506122a282612fae565b8060005b838110156122d35781516122ba87826120d4565b96506122c583613051565b9250506001810190506122a6565b505050505050565b6122e481612ffe565b6122ee81846130af565b92506122f982612fb8565b8060005b8381101561232a57815161231187826120d4565b965061231c8361305e565b9250506001810190506122fd565b505050505050565b600061233d82613009565b61234781856130ba565b935061235283612fc2565b8060005b8381101561238357815161236a88826120bc565b97506123758361306b565b925050600181019050612356565b5085935050505092915050565b6123998161311b565b82525050565b6123a88161311b565b82525050565b6123b78161311b565b82525050565b6123c681613125565b82525050565b60006123d78261301f565b6123e181856130ed565b93506123f18185602086016131c0565b80840191505092915050565b600061240882613014565b61241281856130cb565b93506124228185602086016131c0565b61242b816131fd565b840191505092915050565b600061244182613014565b61244b81856130ed565b935061245b8185602086016131c0565b80840191505092915050565b60006124746018836130f8565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b60006124b46037836130f8565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b600061251a601e836130f8565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b600061255a6018836130f8565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b600061259a6027836130f8565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006126006025836130f8565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006126666049836130f8565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006126f26022836130f8565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006127586033836130f8565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b60006127be602a836130f8565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b6000612824601c836130f8565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b6000612864603b836130f8565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b60006128ca6000836130dc565b9150600082019050919050565b60006128e46000836130ed565b9150600082019050919050565b60006128fe6037836130f8565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b60006129646039836130f8565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b6129c681613171565b82525050565b6129d581613171565b82525050565b6129e481613171565b82525050565b6129fb6129f682613171565b6131f3565b82525050565b6000612a0d8285612161565b604082019150612a1d82846122db565b6080820191508190509392505050565b6000612a3982846123cc565b915081905092915050565b6000612a4f826128d7565b9150819050919050565b6000612a65828a6129ea565b602082019150612a758289612436565b9150612a818288612436565b9150612a8d8287612284565b604082019150612a9d82866122db565b608082019150612aad8285612284565b604082019150612abd828461222d565b6101408201915081905098975050505050505050565b6000602082019050612ae860008301846120fb565b92915050565b6000608082019050612b0360008301866120ec565b612b1060208301856120fb565b612b1d60408301846129cc565b8181036060830152612b2e816128bd565b9050949350505050565b6000606082019050612b4d60008301856120ec565b612b5a60208301846129cc565b8181036040830152612b6b816128bd565b90509392505050565b60006020820190508181036000830152612b8e8184612332565b905092915050565b6000602082019050612bab600083018461239f565b92915050565b6000602082019050612bc660008301846123bd565b92915050565b60006020820190508181036000830152612be581612467565b9050919050565b60006020820190508181036000830152612c05816124a7565b9050919050565b60006020820190508181036000830152612c258161250d565b9050919050565b60006020820190508181036000830152612c458161254d565b9050919050565b60006020820190508181036000830152612c658161258d565b9050919050565b60006020820190508181036000830152612c85816125f3565b9050919050565b60006020820190508181036000830152612ca581612659565b9050919050565b60006020820190508181036000830152612cc5816126e5565b9050919050565b60006020820190508181036000830152612ce58161274b565b9050919050565b60006020820190508181036000830152612d05816127b1565b9050919050565b60006020820190508181036000830152612d2581612817565b9050919050565b60006020820190508181036000830152612d4581612857565b9050919050565b60006020820190508181036000830152612d65816128f1565b9050919050565b60006020820190508181036000830152612d8581612957565b9050919050565b6000602082019050612da160008301846129cc565b92915050565b600060e082019050612dbc60008301886129cc565b612dc9602083018761239f565b612dd6604083018661210a565b612de3608083018561210a565b81810360c0830152612df581846121b8565b90509695505050505050565b6000604082019050612e1660008301856129cc565b612e2360208301846129cc565b9392505050565b6000606082019050612e3f60008301866129cc565b612e4c60208301856129cc565b612e5960408301846129cc565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612e8457600080fd5b8060405250919050565b600067ffffffffffffffff821115612ea557600080fd5b602082029050919050565b600067ffffffffffffffff821115612ec757600080fd5b602082029050919050565b600067ffffffffffffffff821115612ee957600080fd5b602082029050919050565b600067ffffffffffffffff821115612f0b57600080fd5b602082029050919050565b600067ffffffffffffffff821115612f2d57600080fd5b602082029050919050565b600067ffffffffffffffff821115612f4f57600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612f7b57600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061311482613151565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006131868261318d565b9050919050565b60006131988261319f565b9050919050565b60006131aa82613151565b9050919050565b82818337600083830152505050565b60005b838110156131de5780820151818401526020810190506131c3565b838111156131ed576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b61321781613109565b811461322257600080fd5b50565b61322e8161311b565b811461323957600080fd5b50565b61324581613171565b811461325057600080fd5b5056fea365627a7a7231582029fceb0a40fcca95084a6e673cac355b88cdf0e6b91d2ec92955287657ae8ebc6c6578706572696d656e74616cf564736f6c63430005110040" # with open("./contract/mixer/abi/Groth16Mixer.abi", "r") as abistring: # abistr = abistring.readlines()[0] diff --git a/compile.py b/compile.py index d766598..1aa4a71 100644 --- a/compile.py +++ b/compile.py @@ -65,7 +65,7 @@ def compile_mixer() -> Interface: def compile_token(): - zeth_dir = "/Users/ruanyang/works/snark-project/zeth/zeth/client" + zeth_dir = "/Users/ruanyang/works/snark-project/zk-client" print("***********", zeth_dir) allowed_path = join( zeth_dir, @@ -73,13 +73,13 @@ def compile_token(): path_to_token = join( zeth_dir, "contract", - "bac/BAC001.sol") + "test1.sol") # Compilation set_solc_version(SOL_COMPILER_VERSION) compiled_sol = compile_files([path_to_token], allow_paths=allowed_path) - token_interface = compiled_sol[path_to_token + ":BAC001"] - fo = open("./contract/bac/abi/BAC001.abi", "w") - fo1 = open("./contract/bac/abi/BAC001.bin", "w") + token_interface = compiled_sol[path_to_token + ":Test1"] + fo = open("./contract/Test1.abi", "w") + fo1 = open("./contract/Test1.bin", "w") fo.write(str(token_interface["abi"])) fo.close() fo1.write(str(token_interface["bin"])) @@ -91,4 +91,4 @@ def compile_token(): if __name__ == "__main__": - compile_mixer() # pylint: disable=no-value-for-parameter + compile_token() # pylint: disable=no-value-for-parameter diff --git a/contract/Groth16Mixer.py b/contract/Groth16Mixer.py index 1ce0b7d..f02626b 100644 --- a/contract/Groth16Mixer.py +++ b/contract/Groth16Mixer.py @@ -8,7 +8,7 @@ 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": "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_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": false, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}, {"internalType": "bytes32[2]", "name": "nfs", "type": "bytes32[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "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 @@ -45,6 +45,14 @@ def assemble_public_values(self, primary_inputs): result = self.client.call(self.address, self.contract_abi, func_name, args) return result + # ------------------------------------------ + def check_mkroot_nullifiers_hsig_append_nullifiers_state(self, vk, primary_inputs, nfs): + func_name = 'check_mkroot_nullifiers_hsig_append_nullifiers_state' + args = [vk, primary_inputs, nfs] + receipt = self.client.sendRawTransactionGetReceipt(self.address, self.contract_abi, func_name, args) + outputresult = self.data_parser.parse_receipt_output(func_name, receipt['output']) + return outputresult, receipt + # ------------------------------------------ def get_constants(self): func_name = 'get_constants' @@ -75,7 +83,6 @@ def mix(self, a, b, c, vk, sigma, input, ciphertexts): outputresult = self.data_parser.parse_receipt_output(func_name, receipt['output']) return outputresult, receipt - # ------------------------------------------ def token(self): func_name = 'token' args = [] diff --git a/contract/Test1.abi b/contract/Test1.abi new file mode 100644 index 0000000..873cfa0 --- /dev/null +++ b/contract/Test1.abi @@ -0,0 +1 @@ +[{"constant": false, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "nfs", "type": "uint256[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}] \ No newline at end of file diff --git a/contract/Test1.bin b/contract/Test1.bin new file mode 100644 index 0000000..a4672ae --- /dev/null +++ b/contract/Test1.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50610313806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639cab510014610030575b600080fd5b6100d4600480360360c081101561004657600080fd5b8101908080608001906004806020026040519081016040528092919082600460200280828437600081840152601f19601f820116905080830192505050505050919291929080604001906002806020026040519081016040528092919082600260200280828437600081840152601f19601f82011690508083019250505050505091929192905050506100ea565b6040518082815260200191505060405180910390f35b60006060600260405190808252806020026020018201604052801561011e5781602001602082028038833980820191505090505b5090508260006002811061012e57fe5b602002015160001b8160008151811061014357fe5b6020026020010181815250508260016002811061015c57fe5b602002015160001b8160018151811061017157fe5b60200260200101818152505060006002828660405160200180838051906020019060200280838360005b838110156101b657808201518184015260208101905061019b565b5050505090500182600460200280838360005b838110156101e45780820151818401526020810190506101c9565b50505050905001925050506040516020818303038152906040526040518082805190602001908083835b60208310610231578051825260208201915060208101905060208303925061020e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610273573d6000803e3d6000fd5b5050506040513d602081101561028857600080fd5b8101908080519060200190929190505050905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190506000818360001c816102ce57fe5b069050809450505050509291505056fea265627a7a72315820bf74a6ac9ceb0fa0d11c95916dd42c3e08f27f8a94c9a4169e1f000465c7089164736f6c63430005110032 \ No newline at end of file diff --git a/contract/Test1.py b/contract/Test1.py new file mode 100644 index 0000000..c84bb09 --- /dev/null +++ b/contract/Test1.py @@ -0,0 +1,33 @@ +# template for codegen +from python_web3.client.bcosclient import ( + BcosClient +) +from python_web3.client.datatype_parser import DatatypeParser +import json + + +class Test1: # name of abi + address = None + contract_abi_string = '''[{"constant": false, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "nfs", "type": "uint256[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "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 check_mkroot_nullifiers_hsig_append_nullifiers_state(self, vk, nfs): + func_name = 'check_mkroot_nullifiers_hsig_append_nullifiers_state' + args = [vk, nfs] + receipt = self.client.sendRawTransactionGetReceipt(self.address, self.contract_abi, func_name, args) + outputresult = self.data_parser.parse_receipt_output(func_name, receipt['output']) + return outputresult, receipt diff --git a/contract/mixer/BaseMixer.sol b/contract/mixer/BaseMixer.sol index e4a1b1a..b490ff4 100644 --- a/contract/mixer/BaseMixer.sol +++ b/contract/mixer/BaseMixer.sol @@ -230,18 +230,12 @@ contract BaseMixer is MerkleTreePos, BAC001Holder { // combine them with the nullifier field element function assemble_nullifier( uint256 index, uint256[nbInputs] memory primary_inputs) - public pure - returns (bytes32 nf) { - + public pure returns (bytes32 nf) { // We first check that the nullifier we want to retrieve exists require( index < jsIn, "nullifier index overflow" ); - - // 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( @@ -256,12 +250,7 @@ contract BaseMixer is MerkleTreePos, BAC001Holder { // 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) - // We retrieve the field element corresponding to the `field_capacity` - // 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)); @@ -278,7 +267,7 @@ contract BaseMixer is MerkleTreePos, BAC001Holder { uint256[4] memory vk, uint256[nbInputs] memory primary_inputs, bytes32[jsIn] memory nfs) - internal { + public returns (uint256 ){ // 1. We re-assemble the full root digest and check it is in the tree require( checkRoot(primary_inputs), @@ -312,6 +301,7 @@ contract BaseMixer is MerkleTreePos, BAC001Holder { expected_hsig_mod == uint256(hsig), "Invalid hsig: This hsig does not correspond to the hash of vk and the nfs" ); + return expected_hsig_mod; } function checkRoot(uint256[nbInputs] memory primary_inputs) internal returns (bool){ diff --git a/contract/mixer/abi/Groth16Mixer.abi b/contract/mixer/abi/Groth16Mixer.abi index 94b0783..48c4fd8 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": "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 +[{"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": false, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[10]", "name": "primary_inputs", "type": "uint256[10]"}, {"internalType": "bytes32[2]", "name": "nfs", "type": "bytes32[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "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 65f419a..52549df 100644 --- a/contract/mixer/abi/Groth16Mixer.bin +++ b/contract/mixer/abi/Groth16Mixer.bin @@ -1 +1 @@ -6080604052600080553480156200001557600080fd5b5060405162003d6738038062003d6783398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b61315f8062000c086000396000f3fe6080604052600436106100865760003560e01c80634773862d116100595780634773862d1461015a578063a52f1ea814610176578063c73d16ae146101b3578063f9eb943f146101f0578063fc0c546a1461021d57610086565b80632d287e431461008b5780632e94420f146100b45780633e49ba65146100df57806346deb3411461011d575b600080fd5b34801561009757600080fd5b506100b260048036036100ad9190810190611eab565b610248565b005b3480156100c057600080fd5b506100c9610318565b6040516100d69190612c77565b60405180910390f35b3480156100eb57600080fd5b5061010660048036036101019190810190611dc6565b61031e565b604051610114929190612cec565b60405180910390f35b34801561012957600080fd5b50610144600480360361013f9190810190611dc6565b61039a565b6040516101519190612a81565b60405180910390f35b610174600480360361016f9190810190611df0565b6103c2565b005b34801561018257600080fd5b5061019d60048036036101989190810190611f26565b6105e8565b6040516101aa9190612a81565b60405180910390f35b3480156101bf57600080fd5b506101da60048036036101d59190810190611d4b565b610654565b6040516101e79190612a9c565b60405180910390f35b3480156101fc57600080fd5b50610205610668565b60405161021493929190612d15565b60405180910390f35b34801561022957600080fd5b5061023261068b565b60405161023f91906129be565b60405180910390f35b600560020a600254141561028157600160005401600081905550600560020a6002548161027157fe5b066002819055506102806106b1565b5b600560020a600254106102c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c090612b37565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061030e57fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061033a57fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103af57fe5b602002015190508060001b915050919050565b6103ca6119cd565b6103d585848361086c565b600060023373ffffffffffffffffffffffffffffffffffffffff16846000600281106103fd57fe5b60200201518560016002811061040f57fe5b60200201518c8c8c8a60405160200161042e9796959493929190612944565b60405160208183030381529060405260405161044a9190612918565b602060405180830381855afa158015610467573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525061048a9190810190611ed4565b90506104de8660006004811061049c57fe5b6020020151876001600481106104ae57fe5b6020020151886002600481106104c057fe5b6020020151896003600481106104d257fe5b60200201518986610a89565b61051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051490612c17565b60405180910390fd5b61052989898987610b60565b610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612bb7565b60405180910390fd5b6105706119cd565b61057a8582610d67565b60006105866002610dc3565b905061059181610e38565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf7600054828685896040516105ca959493929190612c92565b60405180910390a16105db86610e79565b5050505050505050505050565b60006002831061062d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062490612ab7565b60405180910390fd5b600082846002800101600a811061064057fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f81106106e357fe5b018190555060006002600560020a816106f857fe5b0490505b600081111561086857606060026040519080825280602002602001820160405280156107375781602001602082028038833980820191505090505b5090508260001c8160008151811061074b57fe5b6020026020010181815250508260001c8160018151811061076857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016107cf9190612a5f565b60206040518083038186803b1580156107e757600080fd5b505afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061081f9190810190611efd565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f811061084f57fe5b01819055506002838161085e57fe5b04925050506106fc565b5050565b61087582611231565b6108b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ab90612b57565b60405180910390fd5b60008090505b60028110156109825760006108cf82856105e8565b90506005600082815260200190815260200160002060009054906101000a900460ff1615610932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092990612ad7565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508083836002811061096b57fe5b6020020181815250505080806001019150506108ba565b5060006002828560405160200161099a9291906128ec565b6040516020818303038152906040526040516109b69190612918565b602060405180830381855afa1580156109d3573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506109f69190810190611ed4565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190506000818360001c81610a2b57fe5b0690506000610a398661039a565b90508060001c8214610a80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7790612b77565b60405180910390fd5b50505050505050565b6000610a936119ef565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610b0e57fe5b602002015181600060058110610b2057fe5b6020020151148015610b53575080600360058110610b3a57fe5b602002015181600160058110610b4c57fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610b8e611a11565b86600060028110610b9b57fe5b602002015181600001818152505086600160028110610bb657fe5b602002015181602001818152505085600060048110610bd157fe5b602002015181604001818152505085600160048110610bec57fe5b602002015181606001818152505085600260048110610c0757fe5b602002015181608001818152505085600360048110610c2257fe5b60200201518160a001818152505084600060028110610c3d57fe5b60200201518160c001818152505084600160028110610c5857fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610ca55781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d4c57838682600a8110610cd157fe5b602002015110610d16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0d90612bf7565b60405180910390fd5b8581600a8110610d2257fe5b6020020151828281518110610d3357fe5b6020026020010181815250508080600101915050610cae565b50610d57818361131c565b6001149350505050949350505050565b60008090505b6002811015610dbe5760008382600201600a8110610d8757fe5b602002015160001b905080838360028110610d9e57fe5b602002018181525050610db081610248565b508080600101915050610d6d565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610e0c57610df2818385611638565b809450819350505060028181610e0457fe5b049050610dde565b60016000805481526020019081526020016000206000603f8110610e2c57fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610e858361031e565b915091506000821115610fcc57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f84576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f4c939291906129d9565b600060405180830381600087803b158015610f6657600080fd5b505af1158015610f7a573d6000803e3d6000fd5b5050505050610fc7565b813414610fc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbd90612bd7565b60405180910390fd5b5b611084565b60003411156110835760003373ffffffffffffffffffffffffffffffffffffffff1634604051610ffb9061292f565b60006040518083038185875af1925050503d8060008114611038576040519150601f19603f3d011682016040523d82523d6000602084013e61103d565b606091505b5050905080611081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107890612af7565b60405180910390fd5b505b5b600081111561122c57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461117d576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b8152600401611145929190612a23565b600060405180830381600087803b15801561115f57600080fd5b505af1158015611173573d6000803e3d6000fd5b505050505061122b565b60003373ffffffffffffffffffffffffffffffffffffffff16826040516111a39061292f565b60006040518083038185875af1925050503d80600081146111e0576040519150601f19603f3d011682016040523d82523d6000602084013e6111e5565b606091505b5050905080611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122090612b17565b60405180910390fd5b505b5b505050565b6000806000905060008090505b600054811161131057600460008281526020019081526020016000206000856000600a811061126957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff161561129b5781806001019250505b600460008281526020019081526020016000206000856001600a81106112bd57fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112ef5781806001019250505b600282141561130357600192505050611317565b808060010191505061123e565b5060009150505b919050565b60006007600a018054905060018451011461136c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136390612b97565b60405180910390fd5b611374611a56565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b818310156113fd57835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf18082168816975050506002840193506020830192506113ae565b505050505080611442576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143990612c57565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f1925050508061161c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161390612c37565b60405180910390fd5b8160006018811061162957fe5b60200201519250505092915050565b6000806000600186039050600060011986168201905060008060018716146117f9576001868401039050606060026040519080825280602002602001820160405280156116945781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f81106116b657fe5b015460001c816000815181106116c857fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f81106116f657fe5b015460001c8160018151811061170857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161176f9190612a5f565b60206040518083038186803b15801561178757600080fd5b505afa15801561179b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117bf9190810190611efd565b60001b6001600080548152602001908152602001600020600260018503816117e357fe5b04603f81106117ee57fe5b0181905550506117ff565b85830190505b5b818111156119a557600281039050606060026040519080825280602002602001820160405280156118405781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061186257fe5b015460001c8160008151811061187457fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f81106118a257fe5b015460001c816001815181106118b457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161191b9190612a5f565b60206040518083038186803b15801561193357600080fd5b505afa158015611947573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061196b9190810190611efd565b60001b60016000805481526020019081526020016000206002600185038161198f57fe5b04603f811061199a57fe5b018190555050611800565b600287816119af57fe5b04600260018801816119bd57fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611a88816130d7565b92915050565b600082601f830112611a9f57600080fd5b6002611ab2611aad82612d79565b612d4c565b9150818360005b83811015611ae95781358601611acf8882611c79565b845260208401935060208301925050600181019050611ab9565b5050505092915050565b600082601f830112611b0457600080fd5b600a611b17611b1282612d9b565b612d4c565b91508183856020840282011115611b2d57600080fd5b60005b83811015611b5d5781611b438882611d21565b845260208401935060208301925050600181019050611b30565b5050505092915050565b600082601f830112611b7857600080fd5b6002611b8b611b8682612dbd565b612d4c565b91508183856020840282011115611ba157600080fd5b60005b83811015611bd15781611bb78882611d21565b845260208401935060208301925050600181019050611ba4565b5050505092915050565b600082601f830112611bec57600080fd5b6004611bff611bfa82612ddf565b612d4c565b91508183856020840282011115611c1557600080fd5b60005b83811015611c455781611c2b8882611d21565b845260208401935060208301925050600181019050611c18565b5050505092915050565b600081359050611c5e816130ee565b92915050565b600081519050611c73816130ee565b92915050565b600082601f830112611c8a57600080fd5b8135611c9d611c9882612e01565b612d4c565b91508082526020830160208301858383011115611cb957600080fd5b611cc483828461307a565b50505092915050565b600082601f830112611cde57600080fd5b8135611cf1611cec82612e2d565b612d4c565b91508082526020830160208301858383011115611d0d57600080fd5b611d1883828461307a565b50505092915050565b600081359050611d3081613105565b92915050565b600081519050611d4581613105565b92915050565b60008060008060808587031215611d6157600080fd5b6000611d6f87828801611a79565b9450506020611d8087828801611a79565b9350506040611d9187828801611d21565b925050606085013567ffffffffffffffff811115611dae57600080fd5b611dba87828801611ccd565b91505092959194509250565b60006101408284031215611dd957600080fd5b6000611de784828501611af3565b91505092915050565b6000806000806000806000610300888a031215611e0c57600080fd5b6000611e1a8a828b01611b67565b9750506040611e2b8a828b01611bdb565b96505060c0611e3c8a828b01611b67565b955050610100611e4e8a828b01611bdb565b945050610180611e608a828b01611d21565b9350506101a0611e728a828b01611af3565b9250506102e088013567ffffffffffffffff811115611e9057600080fd5b611e9c8a828b01611a8e565b91505092959891949750929550565b600060208284031215611ebd57600080fd5b6000611ecb84828501611c4f565b91505092915050565b600060208284031215611ee657600080fd5b6000611ef484828501611c64565b91505092915050565b600060208284031215611f0f57600080fd5b6000611f1d84828501611d36565b91505092915050565b6000806101608385031215611f3a57600080fd5b6000611f4885828601611d21565b9250506020611f5985828601611af3565b9150509250929050565b6000611f6f838361227b565b60208301905092915050565b6000611f878383612299565b60208301905092915050565b6000611f9f83836122e8565b905092915050565b6000611fb383836128a8565b60208301905092915050565b6000611fcb83836128c6565b60208301905092915050565b611fe081613044565b82525050565b611fef81612fd2565b82525050565b611ffe81612e9b565b6120088184612f41565b925061201382612e59565b8060005b8381101561204457815161202b8782611f63565b965061203683612ef3565b925050600181019050612017565b505050505050565b61205581612e9b565b61205f8184612f4c565b925061206a82612e59565b8060005b8381101561209b5781516120828782611f7b565b965061208d83612ef3565b92505060018101905061206e565b505050505050565b60006120ae82612ea6565b6120b88185612f57565b9350836020820285016120ca85612e63565b8060005b8581101561210657848403895281516120e78582611f93565b94506120f283612f00565b925060208a019950506001810190506120ce565b50829750879550505050505092915050565b61212181612eb1565b61212b8184612f62565b925061213682612e6d565b8060005b8381101561216757815161214e8782611fbf565b965061215983612f0d565b92505060018101905061213a565b505050505050565b61217881612ebc565b6121828184612f6d565b925061218d82612e77565b8060005b838110156121be5781516121a58782611fbf565b96506121b083612f1a565b925050600181019050612191565b505050505050565b6121cf81612ec7565b6121d98184612f78565b92506121e482612e81565b8060005b838110156122155781516121fc8782611fbf565b965061220783612f27565b9250506001810190506121e8565b505050505050565b600061222882612ed2565b6122328185612f83565b935061223d83612e8b565b8060005b8381101561226e5781516122558882611fa7565b975061226083612f34565b925050600181019050612241565b5085935050505092915050565b61228481612fe4565b82525050565b61229381612fe4565b82525050565b6122a281612fe4565b82525050565b6122b181612fee565b82525050565b60006122c282612ee8565b6122cc8185612fb6565b93506122dc818560208601613089565b80840191505092915050565b60006122f382612edd565b6122fd8185612f94565b935061230d818560208601613089565b612316816130c6565b840191505092915050565b600061232c82612edd565b6123368185612fb6565b9350612346818560208601613089565b80840191505092915050565b600061235f601883612fc1565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b600061239f603783612fc1565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b6000612405601e83612fc1565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b6000612445601883612fc1565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b6000612485602783612fc1565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124eb602583612fc1565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612551604983612fc1565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006125dd602283612fc1565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612643603383612fc1565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b60006126a9602a83612fc1565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b600061270f601c83612fc1565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b600061274f603b83612fc1565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b60006127b5600083612fa5565b9150600082019050919050565b60006127cf600083612fb6565b9150600082019050919050565b60006127e9603783612fc1565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b600061284f603983612fc1565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b6128b18161303a565b82525050565b6128c08161303a565b82525050565b6128cf8161303a565b82525050565b6128e66128e18261303a565b6130bc565b82525050565b60006128f8828561204c565b60408201915061290882846121c6565b6080820191508190509392505050565b600061292482846122b7565b915081905092915050565b600061293a826127c2565b9150819050919050565b6000612950828a6128d5565b6020820191506129608289612321565b915061296c8288612321565b9150612978828761216f565b60408201915061298882866121c6565b608082019150612998828561216f565b6040820191506129a88284612118565b6101408201915081905098975050505050505050565b60006020820190506129d36000830184611fe6565b92915050565b60006080820190506129ee6000830186611fd7565b6129fb6020830185611fe6565b612a0860408301846128b7565b8181036060830152612a19816127a8565b9050949350505050565b6000606082019050612a386000830185611fd7565b612a4560208301846128b7565b8181036040830152612a56816127a8565b90509392505050565b60006020820190508181036000830152612a79818461221d565b905092915050565b6000602082019050612a96600083018461228a565b92915050565b6000602082019050612ab160008301846122a8565b92915050565b60006020820190508181036000830152612ad081612352565b9050919050565b60006020820190508181036000830152612af081612392565b9050919050565b60006020820190508181036000830152612b10816123f8565b9050919050565b60006020820190508181036000830152612b3081612438565b9050919050565b60006020820190508181036000830152612b5081612478565b9050919050565b60006020820190508181036000830152612b70816124de565b9050919050565b60006020820190508181036000830152612b9081612544565b9050919050565b60006020820190508181036000830152612bb0816125d0565b9050919050565b60006020820190508181036000830152612bd081612636565b9050919050565b60006020820190508181036000830152612bf08161269c565b9050919050565b60006020820190508181036000830152612c1081612702565b9050919050565b60006020820190508181036000830152612c3081612742565b9050919050565b60006020820190508181036000830152612c50816127dc565b9050919050565b60006020820190508181036000830152612c7081612842565b9050919050565b6000602082019050612c8c60008301846128b7565b92915050565b600060e082019050612ca760008301886128b7565b612cb4602083018761228a565b612cc16040830186611ff5565b612cce6080830185611ff5565b81810360c0830152612ce081846120a3565b90509695505050505050565b6000604082019050612d0160008301856128b7565b612d0e60208301846128b7565b9392505050565b6000606082019050612d2a60008301866128b7565b612d3760208301856128b7565b612d4460408301846128b7565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612d6f57600080fd5b8060405250919050565b600067ffffffffffffffff821115612d9057600080fd5b602082029050919050565b600067ffffffffffffffff821115612db257600080fd5b602082029050919050565b600067ffffffffffffffff821115612dd457600080fd5b602082029050919050565b600067ffffffffffffffff821115612df657600080fd5b602082029050919050565b600067ffffffffffffffff821115612e1857600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612e4457600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612fdd8261301a565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061304f82613056565b9050919050565b600061306182613068565b9050919050565b60006130738261301a565b9050919050565b82818337600083830152505050565b60005b838110156130a757808201518184015260208101905061308c565b838111156130b6576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6130e081612fd2565b81146130eb57600080fd5b50565b6130f781612fe4565b811461310257600080fd5b50565b61310e8161303a565b811461311957600080fd5b5056fea365627a7a723158205ddef818f9f20c757b1acd768b5e3e81921c3d1c3bc2f4da9d221349b539fb156c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file +6080604052600080553480156200001557600080fd5b5060405162003e9e38038062003e9e83398181016040526200003b91908101906200079d565b888888828180600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060058214620000c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000be9062000aa0565b60405180910390fd5b620000d76200046e60201b60201c565b50506000600160008081526020019081526020016000206000603f8110620000fb57fe5b01549050600160046000808152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061010060fd10620001c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001bc9062000a5c565b60405180910390fd5b60fd6002800260010160fd6101000302604060020201106200021e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002159062000a7e565b60405180910390fd5b505050506040518060400160405280876000600281106200023b57fe5b60200201518152602001876001600281106200025357fe5b6020020151815250600760000160008201518160000155602082015181600101559050506040518060800160405280866000600281106200029057fe5b6020020151815260200186600160028110620002a857fe5b6020020151815260200185600060028110620002c057fe5b6020020151815260200185600160028110620002d857fe5b60200201518152506007600201600082015181600001556020820151816001015560408201518160020155606082015181600301559050506040518060800160405280846000600281106200032957fe5b60200201518152602001846001600281106200034157fe5b60200201518152602001836000600281106200035957fe5b60200201518152602001836001600281106200037157fe5b602002015181525060076006016000820151816000015560208201518160010155604082015181600201556060820151816003015590505060008090505b6002825181620003bb57fe5b046007600a0180549050146200045e576007600a016040518060400160405280848481518110620003e857fe5b602002602001015181526020018460018501815181106200040557fe5b6020026020010151815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050600281019050620003af565b5050505050505050505062000bf8565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f8110620004a157fe5b018190555060006002600560020a81620004b757fe5b0490505b6000811115620006345760606002604051908082528060200260200182016040528015620004f85781602001602082028038833980820191505090505b5090508260001c816000815181106200050d57fe5b6020026020010181815250508260001c816001815181106200052b57fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040162000594919062000a38565b60206040518083038186803b158015620005ad57600080fd5b505afa158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620005e8919081019062000771565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f81106200061957fe5b0181905550600283816200062957fe5b0492505050620004bb565b5050565b600081519050620006498162000bc4565b92915050565b600082601f8301126200066157600080fd5b600262000678620006728262000af0565b62000ac2565b915081838560208402820111156200068f57600080fd5b60005b83811015620006c35781620006a888826200075a565b84526020840193506020830192505060018101905062000692565b5050505092915050565b600082601f830112620006df57600080fd5b8151620006f6620006f08262000b13565b62000ac2565b915081818352602084019350602081019050838560208402820111156200071c57600080fd5b60005b838110156200075057816200073588826200075a565b8452602084019350602083019250506001810190506200071f565b5050505092915050565b6000815190506200076b8162000bde565b92915050565b6000602082840312156200078457600080fd5b600062000794848285016200075a565b91505092915050565b60008060008060008060008060006101c08a8c031215620007bd57600080fd5b6000620007cd8c828d016200075a565b9950506020620007e08c828d0162000638565b9850506040620007f38c828d0162000638565b9750506060620008068c828d016200064f565b96505060a0620008198c828d016200064f565b95505060e06200082c8c828d016200064f565b945050610120620008408c828d016200064f565b935050610160620008548c828d016200064f565b9250506101a08a015167ffffffffffffffff8111156200087357600080fd5b620008818c828d01620006cd565b9150509295985092959850929598565b60006200089f838362000a27565b60208301905092915050565b6000620008b88262000b4c565b620008c4818562000b64565b9350620008d18362000b3c565b8060005b8381101562000908578151620008ec888262000891565b9750620008f98362000b57565b925050600181019050620008d5565b5085935050505092915050565b600062000924602d8362000b75565b91507f41206861736820646967657374206669747320696e20612073696e676c65206660008301527f69656c6420656c656d656e742e000000000000000000000000000000000000006020830152604082019050919050565b60006200098c602b8362000b75565b91507f546f6f206d616e7920696e70757420616e64206f7574707574206e6f7465732060008301527f636f6e736964657265642e0000000000000000000000000000000000000000006020830152604082019050919050565b6000620009f4601f8362000b75565b91507f496e76616c696420646570746820696e20426173654d65726b6c6554726565006000830152602082019050919050565b62000a328162000bba565b82525050565b6000602082019050818103600083015262000a548184620008ab565b905092915050565b6000602082019050818103600083015262000a778162000915565b9050919050565b6000602082019050818103600083015262000a99816200097d565b9050919050565b6000602082019050818103600083015262000abb81620009e5565b9050919050565b6000604051905081810181811067ffffffffffffffff8211171562000ae657600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b0857600080fd5b602082029050919050565b600067ffffffffffffffff82111562000b2b57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600062000b938262000b9a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b62000bcf8162000b86565b811462000bdb57600080fd5b50565b62000be98162000bba565b811462000bf557600080fd5b50565b6132968062000c086000396000f3fe6080604052600436106100915760003560e01c80639e198018116100595780639e19801814610181578063a52f1ea8146101be578063c73d16ae146101fb578063f9eb943f14610238578063fc0c546a1461026557610091565b80632d287e43146100965780632e94420f146100bf5780633e49ba65146100ea57806346deb341146101285780634773862d14610165575b600080fd5b3480156100a257600080fd5b506100bd60048036036100b89190810190611fc0565b610290565b005b3480156100cb57600080fd5b506100d4610360565b6040516100e19190612d8c565b60405180910390f35b3480156100f657600080fd5b50610111600480360361010c9190810190611e8a565b610366565b60405161011f929190612e01565b60405180910390f35b34801561013457600080fd5b5061014f600480360361014a9190810190611e8a565b6103e2565b60405161015c9190612b96565b60405180910390f35b61017f600480360361017a9190810190611eb4565b61040a565b005b34801561018d57600080fd5b506101a860048036036101a39190810190611f6f565b610631565b6040516101b59190612d8c565b60405180910390f35b3480156101ca57600080fd5b506101e560048036036101e0919081019061203b565b610855565b6040516101f29190612b96565b60405180910390f35b34801561020757600080fd5b50610222600480360361021d9190810190611e0f565b6108c1565b60405161022f9190612bb1565b60405180910390f35b34801561024457600080fd5b5061024d6108d5565b60405161025c93929190612e2a565b60405180910390f35b34801561027157600080fd5b5061027a6108f8565b6040516102879190612ad3565b60405180910390f35b600560020a60025414156102c957600160005401600081905550600560020a600254816102b957fe5b066002819055506102c861091e565b5b600560020a60025410610311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030890612c4c565b60405180910390fd5b60006002549050600260008154600101919050819055506000816001600560020a0301905082600160008054815260200190815260200160002082603f811061035657fe5b0181905550505050565b60005481565b600080600083600280026001016002800101600a811061038257fe5b602002015190506002800260010160fd610100030281901c905064e8d4a5100067ffffffffffffffff168167ffffffffffffffff1602915064e8d4a5100067ffffffffffffffff16604082901c67ffffffffffffffff1602925050915091565b6000808260028060020101600a81106103f757fe5b602002015190508060001b915050919050565b610412611a1d565b61041d858483610631565b50600060023373ffffffffffffffffffffffffffffffffffffffff168460006002811061044657fe5b60200201518560016002811061045857fe5b60200201518c8c8c8a6040516020016104779796959493929190612a59565b6040516020818303038152906040526040516104939190612a2d565b602060405180830381855afa1580156104b0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506104d39190810190611fe9565b9050610527866000600481106104e557fe5b6020020151876001600481106104f757fe5b60200201518860026004811061050957fe5b60200201518960036004811061051b57fe5b60200201518986610ad9565b610566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055d90612d2c565b60405180910390fd5b61057289898987610bb0565b6105b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a890612ccc565b60405180910390fd5b6105b9611a1d565b6105c38582610db7565b60006105cf6002610e13565b90506105da81610e88565b7f5b20d7b970f991ad433adaa73d15ec55f2dc64ddfecb9505eb1f94e330ecddf760005482868589604051610613959493929190612da7565b60405180910390a161062486610ec9565b5050505050505050505050565b600061063c83611281565b61067b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067290612c6c565b60405180910390fd5b60008090505b60028110156107495760006106968286610855565b90506005600082815260200190815260200160002060009054906101000a900460ff16156106f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f090612bec565b60405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508084836002811061073257fe5b602002018181525050508080600101915050610681565b50600060028386604051602001610761929190612a01565b60405160208183030381529060405260405161077d9190612a2d565b602060405180830381855afa15801561079a573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506107bd9190810190611fe9565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190506000818360001c816107f257fe5b0690506000610800876103e2565b90508060001c8214610847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083e90612c8c565b60405180910390fd5b819450505050509392505050565b60006002831061089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089190612bcc565b60405180910390fd5b600082846002800101600a81106108ad57fe5b602002015190508060001b91505092915050565b600063c73d16ae60e01b9050949350505050565b600080600060029250600291506001600280026001016002800101019050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060001b90508060016000805481526020019081526020016000206002600560020a60020203603f811061095057fe5b018190555060006002600560020a8161096557fe5b0490505b6000811115610ad557606060026040519080825280602002602001820160405280156109a45781602001602082028038833980820191505090505b5090508260001c816000815181106109b857fe5b6020026020010181815250508260001c816001815181106109d557fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b8152600401610a3c9190612b74565b60206040518083038186803b158015610a5457600080fd5b505afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a8c9190810190612012565b60001b9250600060028360020203905083600160008054815260200190815260200160002082603f8110610abc57fe5b018190555060028381610acb57fe5b0492505050610969565b5050565b6000610ae3611a3f565b6107d05a038682528560208301528360408301526020608083016060846000600286f150604082018981528860208201526040816060836000600787f1506040836080856000600687f15060016040840152600260608401528560808401526040816060836000600787f150505080600260058110610b5e57fe5b602002015181600060058110610b7057fe5b6020020151148015610ba3575080600360058110610b8a57fe5b602002015181600160058110610b9c57fe5b6020020151145b9150509695505050505050565b6000807f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019050610bde611a61565b86600060028110610beb57fe5b602002015181600001818152505086600160028110610c0657fe5b602002015181602001818152505085600060048110610c2157fe5b602002015181604001818152505085600160048110610c3c57fe5b602002015181606001818152505085600260048110610c5757fe5b602002015181608001818152505085600360048110610c7257fe5b60200201518160a001818152505084600060028110610c8d57fe5b60200201518160c001818152505084600160028110610ca857fe5b60200201518160e00181815250506060600160028002600101600280010101604051908082528060200260200182016040528015610cf55781602001602082028038833980820191505090505b50905060008090505b600160028002600101600280010101811015610d9c57838682600a8110610d2157fe5b602002015110610d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5d90612d0c565b60405180910390fd5b8581600a8110610d7257fe5b6020020151828281518110610d8357fe5b6020026020010181815250508080600101915050610cfe565b50610da7818361136c565b6001149350505050949350505050565b60008090505b6002811015610e0e5760008382600201600a8110610dd757fe5b602002015160001b905080838360028110610dee57fe5b602002018181525050610e0081610290565b508080600101915050610dbd565b505050565b60008060025490506000836002540390506000600560020a90505b6001811115610e5c57610e42818385611688565b809450819350505060028181610e5457fe5b049050610e2e565b60016000805481526020019081526020016000206000603f8110610e7c57fe5b01549350505050919050565b60016004600080548152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080610ed583610366565b91509150600082111561101c57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fd4576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d0e7d6113330866040518463ffffffff1660e01b8152600401610f9c93929190612aee565b600060405180830381600087803b158015610fb657600080fd5b505af1158015610fca573d6000803e3d6000fd5b5050505050611017565b813414611016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100d90612cec565b60405180910390fd5b5b6110d4565b60003411156110d35760003373ffffffffffffffffffffffffffffffffffffffff163460405161104b90612a44565b60006040518083038185875af1925050503d8060008114611088576040519150601f19603f3d011682016040523d82523d6000602084013e61108d565b606091505b50509050806110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c890612c0c565b60405180910390fd5b505b5b600081111561127c57600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111cd576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639bd9bbc633846040518363ffffffff1660e01b8152600401611195929190612b38565b600060405180830381600087803b1580156111af57600080fd5b505af11580156111c3573d6000803e3d6000fd5b505050505061127b565b60003373ffffffffffffffffffffffffffffffffffffffff16826040516111f390612a44565b60006040518083038185875af1925050503d8060008114611230576040519150601f19603f3d011682016040523d82523d6000602084013e611235565b606091505b5050905080611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127090612c2c565b60405180910390fd5b505b5b505050565b6000806000905060008090505b600054811161136057600460008281526020019081526020016000206000856000600a81106112b957fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff16156112eb5781806001019250505b600460008281526020019081526020016000206000856001600a811061130d57fe5b602002015160001b815260200190815260200160002060009054906101000a900460ff161561133f5781806001019250505b600282141561135357600192505050611367565b808060010191505061128e565b5060009150505b919050565b60006007600a01805490506001845101146113bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b390612cac565b60405180910390fd5b6113c4611aa6565b6000600190506107d05a03600a60070183526020832060208701875160200281018254865260018301546020870152600283019250604086015b8183101561144d57835481526001840154602082015282516040820152604081606083600060078af160408860808a600060068bf18082168816975050506002840193506020830192506113fe565b505050505080611492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148990612d6c565b60405180910390fd5b7f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408301527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608301527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808301527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a083015260075460c083015260016007015460e083015260026007015461010083015260036007015461012083015260046007015461014083015260056007015461016083015283516101808301527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47602085015181810682036101a085015260408601516101c085015260608601516101e0850152608086015161020085015260a086015161022085015260c086015161024085015260e086015161026085015260066007015461028085015260078001546102a08501526008600701546102c08501526009600701546102e085015260208461030086600060086107d05a03f1925050508061166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166390612d4c565b60405180910390fd5b8160006018811061167957fe5b60200201519250505092915050565b600080600060018603905060006001198616820190506000806001871614611849576001868401039050606060026040519080825280602002602001820160405280156116e45781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f811061170657fe5b015460001c8160008151811061171857fe5b602002602001018181525050600160008054815260200190815260200160002084600202603f811061174657fe5b015460001c8160018151811061175857fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b81526004016117bf9190612b74565b60206040518083038186803b1580156117d757600080fd5b505afa1580156117eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061180f9190810190612012565b60001b60016000805481526020019081526020016000206002600185038161183357fe5b04603f811061183e57fe5b01819055505061184f565b85830190505b5b818111156119f557600281039050606060026040519080825280602002602001820160405280156118905781602001602082028038833980820191505090505b509050600160008054815260200190815260200160002082603f81106118b257fe5b015460001c816000815181106118c457fe5b602002602001018181525050600160008054815260200190815260200160002060018301603f81106118f257fe5b015460001c8160018151811061190457fe5b602002602001018181525050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c4420fb4826040518263ffffffff1660e01b815260040161196b9190612b74565b60206040518083038186803b15801561198357600080fd5b505afa158015611997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119bb9190810190612012565b60001b6001600080548152602001908152602001600020600260018503816119df57fe5b04603f81106119ea57fe5b018190555050611850565b600287816119ff57fe5b0460026001880181611a0d57fe5b0494509450505050935093915050565b6040518060400160405280600290602082028038833980820191505090505090565b6040518060a00160405280600590602082028038833980820191505090505090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806103000160405280601890602082028038833980820191505090505090565b600081359050611ad88161320e565b92915050565b600082601f830112611aef57600080fd5b6002611b02611afd82612e8e565b612e61565b91508183856020840282011115611b1857600080fd5b60005b83811015611b485781611b2e8882611d13565b845260208401935060208301925050600181019050611b1b565b5050505092915050565b600082601f830112611b6357600080fd5b6002611b76611b7182612eb0565b612e61565b9150818360005b83811015611bad5781358601611b938882611d3d565b845260208401935060208301925050600181019050611b7d565b5050505092915050565b600082601f830112611bc857600080fd5b600a611bdb611bd682612ed2565b612e61565b91508183856020840282011115611bf157600080fd5b60005b83811015611c215781611c078882611de5565b845260208401935060208301925050600181019050611bf4565b5050505092915050565b600082601f830112611c3c57600080fd5b6002611c4f611c4a82612ef4565b612e61565b91508183856020840282011115611c6557600080fd5b60005b83811015611c955781611c7b8882611de5565b845260208401935060208301925050600181019050611c68565b5050505092915050565b600082601f830112611cb057600080fd5b6004611cc3611cbe82612f16565b612e61565b91508183856020840282011115611cd957600080fd5b60005b83811015611d095781611cef8882611de5565b845260208401935060208301925050600181019050611cdc565b5050505092915050565b600081359050611d2281613225565b92915050565b600081519050611d3781613225565b92915050565b600082601f830112611d4e57600080fd5b8135611d61611d5c82612f38565b612e61565b91508082526020830160208301858383011115611d7d57600080fd5b611d888382846131b1565b50505092915050565b600082601f830112611da257600080fd5b8135611db5611db082612f64565b612e61565b91508082526020830160208301858383011115611dd157600080fd5b611ddc8382846131b1565b50505092915050565b600081359050611df48161323c565b92915050565b600081519050611e098161323c565b92915050565b60008060008060808587031215611e2557600080fd5b6000611e3387828801611ac9565b9450506020611e4487828801611ac9565b9350506040611e5587828801611de5565b925050606085013567ffffffffffffffff811115611e7257600080fd5b611e7e87828801611d91565b91505092959194509250565b60006101408284031215611e9d57600080fd5b6000611eab84828501611bb7565b91505092915050565b6000806000806000806000610300888a031215611ed057600080fd5b6000611ede8a828b01611c2b565b9750506040611eef8a828b01611c9f565b96505060c0611f008a828b01611c2b565b955050610100611f128a828b01611c9f565b945050610180611f248a828b01611de5565b9350506101a0611f368a828b01611bb7565b9250506102e088013567ffffffffffffffff811115611f5457600080fd5b611f608a828b01611b52565b91505092959891949750929550565b60008060006102008486031215611f8557600080fd5b6000611f9386828701611c9f565b9350506080611fa486828701611bb7565b9250506101c0611fb686828701611ade565b9150509250925092565b600060208284031215611fd257600080fd5b6000611fe084828501611d13565b91505092915050565b600060208284031215611ffb57600080fd5b600061200984828501611d28565b91505092915050565b60006020828403121561202457600080fd5b600061203284828501611dfa565b91505092915050565b600080610160838503121561204f57600080fd5b600061205d85828601611de5565b925050602061206e85828601611bb7565b9150509250929050565b60006120848383612390565b60208301905092915050565b600061209c83836123ae565b60208301905092915050565b60006120b483836123fd565b905092915050565b60006120c883836129bd565b60208301905092915050565b60006120e083836129db565b60208301905092915050565b6120f58161317b565b82525050565b61210481613109565b82525050565b61211381612fd2565b61211d8184613078565b925061212882612f90565b8060005b838110156121595781516121408782612078565b965061214b8361302a565b92505060018101905061212c565b505050505050565b61216a81612fd2565b6121748184613083565b925061217f82612f90565b8060005b838110156121b05781516121978782612090565b96506121a28361302a565b925050600181019050612183565b505050505050565b60006121c382612fdd565b6121cd818561308e565b9350836020820285016121df85612f9a565b8060005b8581101561221b57848403895281516121fc85826120a8565b945061220783613037565b925060208a019950506001810190506121e3565b50829750879550505050505092915050565b61223681612fe8565b6122408184613099565b925061224b82612fa4565b8060005b8381101561227c57815161226387826120d4565b965061226e83613044565b92505060018101905061224f565b505050505050565b61228d81612ff3565b61229781846130a4565b92506122a282612fae565b8060005b838110156122d35781516122ba87826120d4565b96506122c583613051565b9250506001810190506122a6565b505050505050565b6122e481612ffe565b6122ee81846130af565b92506122f982612fb8565b8060005b8381101561232a57815161231187826120d4565b965061231c8361305e565b9250506001810190506122fd565b505050505050565b600061233d82613009565b61234781856130ba565b935061235283612fc2565b8060005b8381101561238357815161236a88826120bc565b97506123758361306b565b925050600181019050612356565b5085935050505092915050565b6123998161311b565b82525050565b6123a88161311b565b82525050565b6123b78161311b565b82525050565b6123c681613125565b82525050565b60006123d78261301f565b6123e181856130ed565b93506123f18185602086016131c0565b80840191505092915050565b600061240882613014565b61241281856130cb565b93506124228185602086016131c0565b61242b816131fd565b840191505092915050565b600061244182613014565b61244b81856130ed565b935061245b8185602086016131c0565b80840191505092915050565b60006124746018836130f8565b91507f6e756c6c696669657220696e646578206f766572666c6f7700000000000000006000830152602082019050919050565b60006124b46037836130f8565b91507f496e76616c6964206e756c6c69666965723a2054686973206e756c6c6966696560008301527f722068617320616c7265616479206265656e20757365640000000000000000006020830152604082019050919050565b600061251a601e836130f8565b91507f767075625f696e2072657475726e207472616e73666572206661696c656400006000830152602082019050919050565b600061255a6018836130f8565b91507f767075625f6f7574207472616e73666572206661696c656400000000000000006000830152602082019050919050565b600061259a6027836130f8565b91507f4d65726b6c6520747265652066756c6c3a2043616e6e6f7420617070656e642060008301527f616e796d6f7265000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006126006025836130f8565b91507f496e76616c696420726f6f743a205468697320726f6f7420646f65736e27742060008301527f65786973740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006126666049836130f8565b91507f496e76616c696420687369673a2054686973206873696720646f6573206e6f7460008301527f20636f72726573706f6e6420746f207468652068617368206f6620766b20616e60208301527f6420746865206e667300000000000000000000000000000000000000000000006040830152606082019050919050565b60006126f26022836130f8565b91507f496e707574206c656e67746820646966666572732066726f6d2065787065637460008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006127586033836130f8565b91507f496e76616c69642070726f6f663a20556e61626c6520746f207665726966792060008301527f7468652070726f6f6620636f72726563746c79000000000000000000000000006020830152604082019050919050565b60006127be602a836130f8565b91507f57726f6e67206d73672e76616c75653a2056616c75652070616964206973206e60008301527f6f7420636f7272656374000000000000000000000000000000000000000000006020830152604082019050919050565b6000612824601c836130f8565b91507f496e707574206973206e6f7420696e207363616c6172206669656c64000000006000830152602082019050919050565b6000612864603b836130f8565b91507f496e76616c6964207369676e61747572653a20556e61626c6520746f2076657260008301527f69667920746865207369676e617475726520636f72726563746c7900000000006020830152604082019050919050565b60006128ca6000836130dc565b9150600082019050919050565b60006128e46000836130ed565b9150600082019050919050565b60006128fe6037836130f8565b91507f43616c6c20746f20626e3235364164642c20626e3235365363616c61724d756c60008301527f206f7220626e32353650616972696e67206661696c65640000000000000000006020830152604082019050919050565b60006129646039836130f8565b91507f43616c6c20746f2074686520626e323536416464206f7220626e32353653636160008301527f6c61724d756c20707265636f6d70696c6564206661696c6564000000000000006020830152604082019050919050565b6129c681613171565b82525050565b6129d581613171565b82525050565b6129e481613171565b82525050565b6129fb6129f682613171565b6131f3565b82525050565b6000612a0d8285612161565b604082019150612a1d82846122db565b6080820191508190509392505050565b6000612a3982846123cc565b915081905092915050565b6000612a4f826128d7565b9150819050919050565b6000612a65828a6129ea565b602082019150612a758289612436565b9150612a818288612436565b9150612a8d8287612284565b604082019150612a9d82866122db565b608082019150612aad8285612284565b604082019150612abd828461222d565b6101408201915081905098975050505050505050565b6000602082019050612ae860008301846120fb565b92915050565b6000608082019050612b0360008301866120ec565b612b1060208301856120fb565b612b1d60408301846129cc565b8181036060830152612b2e816128bd565b9050949350505050565b6000606082019050612b4d60008301856120ec565b612b5a60208301846129cc565b8181036040830152612b6b816128bd565b90509392505050565b60006020820190508181036000830152612b8e8184612332565b905092915050565b6000602082019050612bab600083018461239f565b92915050565b6000602082019050612bc660008301846123bd565b92915050565b60006020820190508181036000830152612be581612467565b9050919050565b60006020820190508181036000830152612c05816124a7565b9050919050565b60006020820190508181036000830152612c258161250d565b9050919050565b60006020820190508181036000830152612c458161254d565b9050919050565b60006020820190508181036000830152612c658161258d565b9050919050565b60006020820190508181036000830152612c85816125f3565b9050919050565b60006020820190508181036000830152612ca581612659565b9050919050565b60006020820190508181036000830152612cc5816126e5565b9050919050565b60006020820190508181036000830152612ce58161274b565b9050919050565b60006020820190508181036000830152612d05816127b1565b9050919050565b60006020820190508181036000830152612d2581612817565b9050919050565b60006020820190508181036000830152612d4581612857565b9050919050565b60006020820190508181036000830152612d65816128f1565b9050919050565b60006020820190508181036000830152612d8581612957565b9050919050565b6000602082019050612da160008301846129cc565b92915050565b600060e082019050612dbc60008301886129cc565b612dc9602083018761239f565b612dd6604083018661210a565b612de3608083018561210a565b81810360c0830152612df581846121b8565b90509695505050505050565b6000604082019050612e1660008301856129cc565b612e2360208301846129cc565b9392505050565b6000606082019050612e3f60008301866129cc565b612e4c60208301856129cc565b612e5960408301846129cc565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612e8457600080fd5b8060405250919050565b600067ffffffffffffffff821115612ea557600080fd5b602082029050919050565b600067ffffffffffffffff821115612ec757600080fd5b602082029050919050565b600067ffffffffffffffff821115612ee957600080fd5b602082029050919050565b600067ffffffffffffffff821115612f0b57600080fd5b602082029050919050565b600067ffffffffffffffff821115612f2d57600080fd5b602082029050919050565b600067ffffffffffffffff821115612f4f57600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115612f7b57600080fd5b601f19601f8301169050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060029050919050565b600060029050919050565b6000600a9050919050565b600060029050919050565b600060049050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061311482613151565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006131868261318d565b9050919050565b60006131988261319f565b9050919050565b60006131aa82613151565b9050919050565b82818337600083830152505050565b60005b838110156131de5780820151818401526020810190506131c3565b838111156131ed576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b61321781613109565b811461322257600080fd5b50565b61322e8161311b565b811461323957600080fd5b50565b61324581613171565b811461325057600080fd5b5056fea365627a7a7231582029fceb0a40fcca95084a6e673cac355b88cdf0e6b91d2ec92955287657ae8ebc6c6578706572696d656e74616cf564736f6c63430005110040 \ No newline at end of file diff --git a/contract/test1.sol b/contract/test1.sol new file mode 100644 index 0000000..40c92da --- /dev/null +++ b/contract/test1.sol @@ -0,0 +1,29 @@ +// Copyright (c) 2015-2020 Clearmatics Technologies Ltd +// +// SPDX-License-Identifier: LGPL-3.0+ + +pragma solidity ^0.5.0; + +contract Test1 { + + function check_mkroot_nullifiers_hsig_append_nullifiers_state( + uint256[4] memory vk, + uint256[2] memory nfs) + public returns (uint256 ){ + // 1. We re-assemble the full root digest and check it is in the tree + + // 3. We re-compute h_sig, re-assemble the expected h_sig and check + // they are equal (i.e. that h_sig re-assembled was correctly generated + // from vk). + bytes32[] memory nfs1 = new bytes32[](2); + nfs1[0] = bytes32(nfs[0]); + nfs1[1] = bytes32(nfs[1]); + bytes32 expected_hsig = sha256(abi.encodePacked(nfs1, vk)); + + //expected_hsig = expected_hsig >> 3; + uint p_mod = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + uint expected_hsig_mod = uint256(expected_hsig) % p_mod; + + return expected_hsig_mod; + } +} diff --git a/test_commands/test_poseidon.py b/test_commands/test_poseidon.py index 345f25d..d3036ab 100644 --- a/test_commands/test_poseidon.py +++ b/test_commands/test_poseidon.py @@ -7,6 +7,7 @@ from ethsnarks.poseidon import poseidon from contract.Poseidon import Poseidon +from contract.Test1 import Test1 from python_web3.client.bcosclient import BcosClient 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'}] @@ -45,5 +46,29 @@ def deploy() -> None: print(contract_result) + +def hash() -> None: + print("***********************") + + client = BcosClient() + abi = [{"constant": False, "inputs": [{"internalType": "uint256[4]", "name": "vk", "type": "uint256[4]"}, {"internalType": "uint256[2]", "name": "nfs", "type": "uint256[2]"}], "name": "check_mkroot_nullifiers_hsig_append_nullifiers_state", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": False, "stateMutability": "nonpayable", "type": "function"}] + bin = "608060405234801561001057600080fd5b50610313806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639cab510014610030575b600080fd5b6100d4600480360360c081101561004657600080fd5b8101908080608001906004806020026040519081016040528092919082600460200280828437600081840152601f19601f820116905080830192505050505050919291929080604001906002806020026040519081016040528092919082600260200280828437600081840152601f19601f82011690508083019250505050505091929192905050506100ea565b6040518082815260200191505060405180910390f35b60006060600260405190808252806020026020018201604052801561011e5781602001602082028038833980820191505090505b5090508260006002811061012e57fe5b602002015160001b8160008151811061014357fe5b6020026020010181815250508260016002811061015c57fe5b602002015160001b8160018151811061017157fe5b60200260200101818152505060006002828660405160200180838051906020019060200280838360005b838110156101b657808201518184015260208101905061019b565b5050505090500182600460200280838360005b838110156101e45780820151818401526020810190506101c9565b50505050905001925050506040516020818303038152906040526040518082805190602001908083835b60208310610231578051825260208201915060208101905060208303925061020e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610273573d6000803e3d6000fd5b5050506040513d602081101561028857600080fd5b8101908080519060200190929190505050905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190506000818360001c816102ce57fe5b069050809450505050509291505056fea265627a7a72315820bf74a6ac9ceb0fa0d11c95916dd42c3e08f27f8a94c9a4169e1f000465c7089164736f6c63430005110032" + + recipient = client.sendRawTransactionGetReceipt("", abi, None, None, bin) + hash = recipient['contractAddress'] + print(f"deploy: poseidon_address={hash}") + vk = [16490016172982318895250255641689678646111655220435163217705828142839516908298, + 8593322015855684017844372616857311881421231960639692489803116242908250885416, + 17151891846937580539654540694280270379771514144416415467970132703521725560628, + 5753342982588249018284459391196328085159940105956096703760156814643156426393 + ] + nf= [5183368789734249374633016313510834427607271590571739629980101256184898118832,9875012179972648051600488252941141048857451706810826586610902358606196865831 +] + testContract = Test1(hash) + out = testContract.check_mkroot_nullifiers_hsig_append_nullifiers_state(vk,nf) + + print(out) + + if __name__ == '__main__': - deploy() + hash()