diff --git a/backend/src/contracts/abi/Summa.json b/backend/src/contracts/abi/Summa.json index ae1309d7..e64dc963 100644 --- a/backend/src/contracts/abi/Summa.json +++ b/backend/src/contracts/abi/Summa.json @@ -1 +1 @@ -{"_format":"hh-sol-artifact-1","contractName":"Summa","sourceName":"src/Summa.sol","abi":[{"inputs":[{"internalType":"contract IVerifier","name":"_inclusionVerifier","type":"address"},{"internalType":"uint16","name":"mstLevels","type":"uint16"},{"internalType":"uint16","name":"balanceCount","type":"uint16"},{"internalType":"uint8","name":"balanceByteRange","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"indexed":false,"internalType":"struct Summa.AddressOwnershipProof[]","name":"addressOwnershipProofs","type":"tuple[]"}],"name":"AddressOwnershipProofSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mstRoot","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"rootBalances","type":"uint256[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"chain","type":"string"}],"indexed":false,"internalType":"struct Summa.Cryptocurrency[]","name":"cryptocurrencies","type":"tuple[]"}],"name":"LiabilitiesCommitmentSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"addressOwnershipProofs","outputs":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"commitments","outputs":[{"internalType":"uint256","name":"mstRoot","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"uint16","name":"mstLevels","type":"uint16"},{"internalType":"uint16","name":"balanceCount","type":"uint16"},{"internalType":"uint8","name":"balanceByteRange","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"addressHash","type":"bytes32"}],"name":"getAddressOwnershipProof","outputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Summa.AddressOwnershipProof","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mstRoot","type":"uint256"},{"internalType":"uint256[]","name":"rootBalances","type":"uint256[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"chain","type":"string"}],"internalType":"struct Summa.Cryptocurrency[]","name":"cryptocurrencies","type":"tuple[]"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"submitCommitment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Summa.AddressOwnershipProof[]","name":"_addressOwnershipProofs","type":"tuple[]"}],"name":"submitProofOfAddressOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"proof","type":"bytes"},{"internalType":"uint256[]","name":"publicInputs","type":"uint256[]"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"verifyInclusionProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"bytecode":"0x60a06040523480156200001157600080fd5b5060405162001cf938038062001cf9833981016040819052620000349162000110565b6200003f33620000a8565b6001600160a01b03939093166080526040805160608101825261ffff938416808252929093166020840181905260ff90941692018290526001805463ffffffff1916909117620100009093029290921760ff60201b191664010000000090910217905562000181565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805161ffff811681146200010b57600080fd5b919050565b600080600080608085870312156200012757600080fd5b84516001600160a01b03811681146200013f57600080fd5b93506200014f60208601620000f8565b92506200015f60408601620000f8565b9150606085015160ff811681146200017657600080fd5b939692955090935050565b608051611b5c6200019d6000396000610b5b0152611b5c6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3c4bcf811610066578063a3c4bcf814610169578063c7ddca0e1461018c578063c8e581471461019f578063da64a750146101c2578063f2fde38b146101d557600080fd5b806319b33968146100a357806349ce8997146100cc578063715018a6146100fa57806379502c55146101045780638da5cb5b1461014e575b600080fd5b6100b66100b13660046111d3565b6101e8565b6040516100c391906112a7565b60405180910390f35b6100ec6100da3660046111d3565b60046020526000908152604090205481565b6040519081526020016100c3565b610102610500565b005b60015461012a9061ffff8082169162010000810490911690640100000000900460ff1683565b6040805161ffff948516815293909216602084015260ff16908201526060016100c3565b6000546040516001600160a01b0390911681526020016100c3565b61017c6101773660046111d3565b610514565b6040516100c394939291906112c1565b61010261019a366004611440565b610774565b6101b26101ad366004611605565b610a15565b60405190151581526020016100c3565b6101026101d0366004611672565b610bdb565b6101026101e33660046117b9565b610fa7565b6102136040518060800160405280606081526020016060815260200160608152602001606081525090565b60008281526003602052604090205461026a5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81b9bdd081d995c9a599a595960621b60448201526064015b60405180910390fd5b600082815260036020526040902054600290610288906001906117f8565b8154811061029857610298611811565b90600052602060002090600402016040518060800160405290816000820180546102c190611827565b80601f01602080910402602001604051908101604052809291908181526020018280546102ed90611827565b801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b5050505050815260200160018201805461035390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461037f90611827565b80156103cc5780601f106103a1576101008083540402835291602001916103cc565b820191906000526020600020905b8154815290600101906020018083116103af57829003601f168201915b505050505081526020016002820180546103e590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461041190611827565b801561045e5780601f106104335761010080835404028352916020019161045e565b820191906000526020600020905b81548152906001019060200180831161044157829003601f168201915b5050505050815260200160038201805461047790611827565b80601f01602080910402602001604051908101604052809291908181526020018280546104a390611827565b80156104f05780601f106104c5576101008083540402835291602001916104f0565b820191906000526020600020905b8154815290600101906020018083116104d357829003601f168201915b5050505050815250509050919050565b610508611020565b610512600061107a565b565b6002818154811061052457600080fd5b906000526020600020906004020160009150905080600001805461054790611827565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611827565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050908060010180546105d590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461060190611827565b801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b50505050509080600201805461066390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461068f90611827565b80156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b5050505050908060030180546106f190611827565b80601f016020809104026020016040519081016040528092919081815260200182805461071d90611827565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b5050505050905084565b61077c611020565b60005b81518110156109da57600082828151811061079c5761079c611811565b6020026020010151600001516040516020016107b89190611861565b60408051601f19818403018152918152815160209283012060008181526003909352912054909150801561082e5760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920766572696669656400000000000000006044820152606401610261565b600284848151811061084257610842611811565b6020908102919091018101518254600181018455600093845291909220825160049092020190819061087490826118cc565b506020820151600182019061088990826118cc565b506040820151600282019061089e90826118cc565b50606082015160038201906108b390826118cc565b50506002546000848152600360205260409020555083518490849081106108dc576108dc611811565b60200260200101516000015151600014158015610918575083838151811061090657610906611811565b60200260200101516020015151600014155b8015610943575083838151811061093157610931611811565b60200260200101516040015151600014155b801561096e575083838151811061095c5761095c611811565b60200260200101516060015151600014155b6109c55760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642070726f6f66206f662061646472657373206f776e65727368604482015261069760f41b6064820152608401610261565b505080806109d29061198c565b91505061077f565b507f382315d4d56a6035e1899bffe77d9becefaf5f2650e4323b27854857a045465881604051610a0a91906119a5565b60405180910390a150565b600082600181518110610a2a57610a2a611811565b6020026020010151600460008481526020019081526020016000206000015414610a895760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b60025b8351811015610b4357838181518110610aa757610aa7611811565b602002602001015160046000858152602001908152602001600020600101600283610ad291906117f8565b81548110610ae257610ae2611811565b906000526020600020015414610b315760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420726f6f742062616c616e636560601b6044820152606401610261565b80610b3b8161198c565b915050610a8c565b50604051630bd205a960e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bd205a9090610b929086908890600401611a42565b602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611a67565b949350505050565b610be3611020565b83600003610c265760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b8151835114610c955760405162461bcd60e51b815260206004820152603560248201527f526f6f74206c696162696c69746965732073756d7320616e64206c696162696c6044820152740d2e8d2cae640dceadac4cae440dad2e6dac2e8c6d605b1b6064820152608401610261565b6000825167ffffffffffffffff811115610cb157610cb1611319565b604051908082528060200260200182016040528015610ce457816020015b6060815260200190600190039081610ccf5790505b5090506000835167ffffffffffffffff811115610d0357610d03611319565b604051908082528060200260200182016040528015610d3657816020015b6060815260200190600190039081610d215790505b50905060005b8451811015610edc57848181518110610d5757610d57611811565b60200260200101516020015151600014158015610d935750848181518110610d8157610d81611811565b60200260200101516000015151600014155b610dd85760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642063727970746f63757272656e637960501b6044820152606401610261565b858181518110610dea57610dea611811565b6020026020010151600003610e535760405162461bcd60e51b815260206004820152602960248201527f416c6c20726f6f742073756d732073686f756c642062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610261565b848181518110610e6557610e65611811565b602002602001015160000151838281518110610e8357610e83611811565b6020026020010181905250848181518110610ea057610ea0611811565b602002602001015160200151828281518110610ebe57610ebe611811565b60200260200101819052508080610ed49061198c565b915050610d3c565b5060408051608081018252878152602080820188815282840186905260608301859052600087815260048352939093208251815592518051929392610f2792600185019201906110ca565b5060408201518051610f43916002840191602090910190611115565b5060608201518051610f5f916003840191602090910190611115565b50905050827f88bfc7389cb831ea0208ff106da6f5c9f88036ba084f1eb008d2788d3d45998d878787604051610f9793929190611a89565b60405180910390a2505050505050565b610faf611020565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610261565b61101d8161107a565b50565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610261565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255906000526020600020908101928215611105579160200282015b828111156111055782518255916020019190600101906110ea565b50611111929150611167565b5090565b82805482825590600052602060002090810192821561115b579160200282015b8281111561115b578251829061114b90826118cc565b5091602001919060010190611135565b5061111192915061117c565b5b808211156111115760008155600101611168565b808211156111115760006111908282611199565b5060010161117c565b5080546111a590611827565b6000825580601f106111b5575050565b601f01602090049060005260206000209081019061101d9190611167565b6000602082840312156111e557600080fd5b5035919050565b60005b838110156112075781810151838201526020016111ef565b50506000910152565b600081518084526112288160208601602086016111ec565b601f01601f19169290920160200192915050565b60008151608084526112516080850182611210565b90506020830151848203602086015261126a8282611210565b915050604083015184820360408601526112848282611210565b9150506060830151848203606086015261129e8282611210565b95945050505050565b6020815260006112ba602083018461123c565b9392505050565b6080815260006112d46080830187611210565b82810360208401526112e68187611210565b905082810360408401526112fa8186611210565b9050828103606084015261130e8185611210565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561135257611352611319565b60405290565b6040805190810167ffffffffffffffff8111828210171561135257611352611319565b604051601f8201601f1916810167ffffffffffffffff811182821017156113a4576113a4611319565b604052919050565b600067ffffffffffffffff8211156113c6576113c6611319565b5060051b60200190565b600082601f8301126113e157600080fd5b813567ffffffffffffffff8111156113fb576113fb611319565b61140e601f8201601f191660200161137b565b81815284602083860101111561142357600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561145357600080fd5b823567ffffffffffffffff8082111561146b57600080fd5b818501915085601f83011261147f57600080fd5b813561149261148d826113ac565b61137b565b81815260059190911b830184019084810190888311156114b157600080fd5b8585015b83811015611592578035858111156114cc57600080fd5b86016080818c03601f190112156114e35760008081fd5b6114eb61132f565b88820135878111156114fd5760008081fd5b61150b8d8b838601016113d0565b825250604080830135888111156115225760008081fd5b6115308e8c838701016113d0565b8b84015250606080840135898111156115495760008081fd5b6115578f8d838801016113d0565b838501525060808401359150888211156115715760008081fd5b61157f8e8c848701016113d0565b90830152508452509186019186016114b5565b5098975050505050505050565b600082601f8301126115b057600080fd5b813560206115c061148d836113ac565b82815260059290921b840181019181810190868411156115df57600080fd5b8286015b848110156115fa57803583529183019183016115e3565b509695505050505050565b60008060006060848603121561161a57600080fd5b833567ffffffffffffffff8082111561163257600080fd5b61163e878388016113d0565b9450602086013591508082111561165457600080fd5b506116618682870161159f565b925050604084013590509250925092565b6000806000806080858703121561168857600080fd5b84359350602085013567ffffffffffffffff808211156116a757600080fd5b6116b38883890161159f565b945060408701359150808211156116c957600080fd5b818701915087601f8301126116dd57600080fd5b6116ea61148d83356113ac565b82358082526020808301929160051b8501018a81111561170957600080fd5b602085015b818110156117a557848135111561172457600080fd5b803586016040818e03601f1901121561173c57600080fd5b611744611358565b60208201358781111561175657600080fd5b6117658f6020838601016113d0565b82525060408201358781111561177a57600080fd5b6117898f6020838601016113d0565b602083015250808652505060208401935060208101905061170e565b50979a969950976060013596505050505050565b6000602082840312156117cb57600080fd5b81356001600160a01b03811681146112ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561180b5761180b6117e2565b92915050565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061183b57607f821691505b60208210810361185b57634e487b7160e01b600052602260045260246000fd5b50919050565b600082516118738184602087016111ec565b9190910192915050565b601f8211156118c757600081815260208120601f850160051c810160208610156118a45750805b601f850160051c820191505b818110156118c3578281556001016118b0565b5050505b505050565b815167ffffffffffffffff8111156118e6576118e6611319565b6118fa816118f48454611827565b8461187d565b602080601f83116001811461192f57600084156119175750858301515b600019600386901b1c1916600185901b1785556118c3565b600085815260208120601f198616915b8281101561195e5788860151825594840194600190910190840161193f565b508582101561197c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161199e5761199e6117e2565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156119fa57603f198886030184526119e885835161123c565b945092850192908501906001016119cc565b5092979650505050505050565b600081518084526020808501945080840160005b83811015611a3757815187529582019590820190600101611a1b565b509495945050505050565b604081526000611a556040830185611a07565b828103602084015261129e8185611210565b600060208284031215611a7957600080fd5b815180151581146112ba57600080fd5b83815260006020606081840152611aa36060840186611a07565b6040848203818601528186518084528484019150848160051b85010185890160005b83811015611b1557868303601f1901855281518051878552611ae988860182611210565b918a0151858303868c0152919050611b018183611210565b968a01969450505090870190600101611ac5565b50909b9a505050505050505050505056fea2646970667358221220e6c62122477ca66199eda556187c636333e09b337b36b6cdea72ff12da83edba64736f6c63430008120033","deployedBytecode":"0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3c4bcf811610066578063a3c4bcf814610169578063c7ddca0e1461018c578063c8e581471461019f578063da64a750146101c2578063f2fde38b146101d557600080fd5b806319b33968146100a357806349ce8997146100cc578063715018a6146100fa57806379502c55146101045780638da5cb5b1461014e575b600080fd5b6100b66100b13660046111d3565b6101e8565b6040516100c391906112a7565b60405180910390f35b6100ec6100da3660046111d3565b60046020526000908152604090205481565b6040519081526020016100c3565b610102610500565b005b60015461012a9061ffff8082169162010000810490911690640100000000900460ff1683565b6040805161ffff948516815293909216602084015260ff16908201526060016100c3565b6000546040516001600160a01b0390911681526020016100c3565b61017c6101773660046111d3565b610514565b6040516100c394939291906112c1565b61010261019a366004611440565b610774565b6101b26101ad366004611605565b610a15565b60405190151581526020016100c3565b6101026101d0366004611672565b610bdb565b6101026101e33660046117b9565b610fa7565b6102136040518060800160405280606081526020016060815260200160608152602001606081525090565b60008281526003602052604090205461026a5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81b9bdd081d995c9a599a595960621b60448201526064015b60405180910390fd5b600082815260036020526040902054600290610288906001906117f8565b8154811061029857610298611811565b90600052602060002090600402016040518060800160405290816000820180546102c190611827565b80601f01602080910402602001604051908101604052809291908181526020018280546102ed90611827565b801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b5050505050815260200160018201805461035390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461037f90611827565b80156103cc5780601f106103a1576101008083540402835291602001916103cc565b820191906000526020600020905b8154815290600101906020018083116103af57829003601f168201915b505050505081526020016002820180546103e590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461041190611827565b801561045e5780601f106104335761010080835404028352916020019161045e565b820191906000526020600020905b81548152906001019060200180831161044157829003601f168201915b5050505050815260200160038201805461047790611827565b80601f01602080910402602001604051908101604052809291908181526020018280546104a390611827565b80156104f05780601f106104c5576101008083540402835291602001916104f0565b820191906000526020600020905b8154815290600101906020018083116104d357829003601f168201915b5050505050815250509050919050565b610508611020565b610512600061107a565b565b6002818154811061052457600080fd5b906000526020600020906004020160009150905080600001805461054790611827565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611827565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050908060010180546105d590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461060190611827565b801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b50505050509080600201805461066390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461068f90611827565b80156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b5050505050908060030180546106f190611827565b80601f016020809104026020016040519081016040528092919081815260200182805461071d90611827565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b5050505050905084565b61077c611020565b60005b81518110156109da57600082828151811061079c5761079c611811565b6020026020010151600001516040516020016107b89190611861565b60408051601f19818403018152918152815160209283012060008181526003909352912054909150801561082e5760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920766572696669656400000000000000006044820152606401610261565b600284848151811061084257610842611811565b6020908102919091018101518254600181018455600093845291909220825160049092020190819061087490826118cc565b506020820151600182019061088990826118cc565b506040820151600282019061089e90826118cc565b50606082015160038201906108b390826118cc565b50506002546000848152600360205260409020555083518490849081106108dc576108dc611811565b60200260200101516000015151600014158015610918575083838151811061090657610906611811565b60200260200101516020015151600014155b8015610943575083838151811061093157610931611811565b60200260200101516040015151600014155b801561096e575083838151811061095c5761095c611811565b60200260200101516060015151600014155b6109c55760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642070726f6f66206f662061646472657373206f776e65727368604482015261069760f41b6064820152608401610261565b505080806109d29061198c565b91505061077f565b507f382315d4d56a6035e1899bffe77d9becefaf5f2650e4323b27854857a045465881604051610a0a91906119a5565b60405180910390a150565b600082600181518110610a2a57610a2a611811565b6020026020010151600460008481526020019081526020016000206000015414610a895760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b60025b8351811015610b4357838181518110610aa757610aa7611811565b602002602001015160046000858152602001908152602001600020600101600283610ad291906117f8565b81548110610ae257610ae2611811565b906000526020600020015414610b315760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420726f6f742062616c616e636560601b6044820152606401610261565b80610b3b8161198c565b915050610a8c565b50604051630bd205a960e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bd205a9090610b929086908890600401611a42565b602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611a67565b949350505050565b610be3611020565b83600003610c265760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b8151835114610c955760405162461bcd60e51b815260206004820152603560248201527f526f6f74206c696162696c69746965732073756d7320616e64206c696162696c6044820152740d2e8d2cae640dceadac4cae440dad2e6dac2e8c6d605b1b6064820152608401610261565b6000825167ffffffffffffffff811115610cb157610cb1611319565b604051908082528060200260200182016040528015610ce457816020015b6060815260200190600190039081610ccf5790505b5090506000835167ffffffffffffffff811115610d0357610d03611319565b604051908082528060200260200182016040528015610d3657816020015b6060815260200190600190039081610d215790505b50905060005b8451811015610edc57848181518110610d5757610d57611811565b60200260200101516020015151600014158015610d935750848181518110610d8157610d81611811565b60200260200101516000015151600014155b610dd85760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642063727970746f63757272656e637960501b6044820152606401610261565b858181518110610dea57610dea611811565b6020026020010151600003610e535760405162461bcd60e51b815260206004820152602960248201527f416c6c20726f6f742073756d732073686f756c642062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610261565b848181518110610e6557610e65611811565b602002602001015160000151838281518110610e8357610e83611811565b6020026020010181905250848181518110610ea057610ea0611811565b602002602001015160200151828281518110610ebe57610ebe611811565b60200260200101819052508080610ed49061198c565b915050610d3c565b5060408051608081018252878152602080820188815282840186905260608301859052600087815260048352939093208251815592518051929392610f2792600185019201906110ca565b5060408201518051610f43916002840191602090910190611115565b5060608201518051610f5f916003840191602090910190611115565b50905050827f88bfc7389cb831ea0208ff106da6f5c9f88036ba084f1eb008d2788d3d45998d878787604051610f9793929190611a89565b60405180910390a2505050505050565b610faf611020565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610261565b61101d8161107a565b50565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610261565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255906000526020600020908101928215611105579160200282015b828111156111055782518255916020019190600101906110ea565b50611111929150611167565b5090565b82805482825590600052602060002090810192821561115b579160200282015b8281111561115b578251829061114b90826118cc565b5091602001919060010190611135565b5061111192915061117c565b5b808211156111115760008155600101611168565b808211156111115760006111908282611199565b5060010161117c565b5080546111a590611827565b6000825580601f106111b5575050565b601f01602090049060005260206000209081019061101d9190611167565b6000602082840312156111e557600080fd5b5035919050565b60005b838110156112075781810151838201526020016111ef565b50506000910152565b600081518084526112288160208601602086016111ec565b601f01601f19169290920160200192915050565b60008151608084526112516080850182611210565b90506020830151848203602086015261126a8282611210565b915050604083015184820360408601526112848282611210565b9150506060830151848203606086015261129e8282611210565b95945050505050565b6020815260006112ba602083018461123c565b9392505050565b6080815260006112d46080830187611210565b82810360208401526112e68187611210565b905082810360408401526112fa8186611210565b9050828103606084015261130e8185611210565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561135257611352611319565b60405290565b6040805190810167ffffffffffffffff8111828210171561135257611352611319565b604051601f8201601f1916810167ffffffffffffffff811182821017156113a4576113a4611319565b604052919050565b600067ffffffffffffffff8211156113c6576113c6611319565b5060051b60200190565b600082601f8301126113e157600080fd5b813567ffffffffffffffff8111156113fb576113fb611319565b61140e601f8201601f191660200161137b565b81815284602083860101111561142357600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561145357600080fd5b823567ffffffffffffffff8082111561146b57600080fd5b818501915085601f83011261147f57600080fd5b813561149261148d826113ac565b61137b565b81815260059190911b830184019084810190888311156114b157600080fd5b8585015b83811015611592578035858111156114cc57600080fd5b86016080818c03601f190112156114e35760008081fd5b6114eb61132f565b88820135878111156114fd5760008081fd5b61150b8d8b838601016113d0565b825250604080830135888111156115225760008081fd5b6115308e8c838701016113d0565b8b84015250606080840135898111156115495760008081fd5b6115578f8d838801016113d0565b838501525060808401359150888211156115715760008081fd5b61157f8e8c848701016113d0565b90830152508452509186019186016114b5565b5098975050505050505050565b600082601f8301126115b057600080fd5b813560206115c061148d836113ac565b82815260059290921b840181019181810190868411156115df57600080fd5b8286015b848110156115fa57803583529183019183016115e3565b509695505050505050565b60008060006060848603121561161a57600080fd5b833567ffffffffffffffff8082111561163257600080fd5b61163e878388016113d0565b9450602086013591508082111561165457600080fd5b506116618682870161159f565b925050604084013590509250925092565b6000806000806080858703121561168857600080fd5b84359350602085013567ffffffffffffffff808211156116a757600080fd5b6116b38883890161159f565b945060408701359150808211156116c957600080fd5b818701915087601f8301126116dd57600080fd5b6116ea61148d83356113ac565b82358082526020808301929160051b8501018a81111561170957600080fd5b602085015b818110156117a557848135111561172457600080fd5b803586016040818e03601f1901121561173c57600080fd5b611744611358565b60208201358781111561175657600080fd5b6117658f6020838601016113d0565b82525060408201358781111561177a57600080fd5b6117898f6020838601016113d0565b602083015250808652505060208401935060208101905061170e565b50979a969950976060013596505050505050565b6000602082840312156117cb57600080fd5b81356001600160a01b03811681146112ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561180b5761180b6117e2565b92915050565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061183b57607f821691505b60208210810361185b57634e487b7160e01b600052602260045260246000fd5b50919050565b600082516118738184602087016111ec565b9190910192915050565b601f8211156118c757600081815260208120601f850160051c810160208610156118a45750805b601f850160051c820191505b818110156118c3578281556001016118b0565b5050505b505050565b815167ffffffffffffffff8111156118e6576118e6611319565b6118fa816118f48454611827565b8461187d565b602080601f83116001811461192f57600084156119175750858301515b600019600386901b1c1916600185901b1785556118c3565b600085815260208120601f198616915b8281101561195e5788860151825594840194600190910190840161193f565b508582101561197c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161199e5761199e6117e2565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156119fa57603f198886030184526119e885835161123c565b945092850192908501906001016119cc565b5092979650505050505050565b600081518084526020808501945080840160005b83811015611a3757815187529582019590820190600101611a1b565b509495945050505050565b604081526000611a556040830185611a07565b828103602084015261129e8185611210565b600060208284031215611a7957600080fd5b815180151581146112ba57600080fd5b83815260006020606081840152611aa36060840186611a07565b6040848203818601528186518084528484019150848160051b85010185890160005b83811015611b1557868303601f1901855281518051878552611ae988860182611210565b918a0151858303868c0152919050611b018183611210565b968a01969450505090870190600101611ac5565b50909b9a505050505050505050505056fea2646970667358221220e6c62122477ca66199eda556187c636333e09b337b36b6cdea72ff12da83edba64736f6c63430008120033","linkReferences":{},"deployedLinkReferences":{}} \ No newline at end of file +{"_format":"hh-sol-artifact-1","contractName":"Summa","sourceName":"src/Summa.sol","abi":[{"inputs":[{"internalType":"contract IVerifier","name":"_inclusionVerifier","type":"address"},{"internalType":"uint16","name":"mstLevels","type":"uint16"},{"internalType":"uint16","name":"assetsCount","type":"uint16"},{"internalType":"uint8","name":"balanceByteRange","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"indexed":false,"internalType":"struct Summa.AddressOwnershipProof[]","name":"addressOwnershipProofs","type":"tuple[]"}],"name":"AddressOwnershipProofSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mstRoot","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"rootBalances","type":"uint256[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"chain","type":"string"}],"indexed":false,"internalType":"struct Summa.Cryptocurrency[]","name":"cryptocurrencies","type":"tuple[]"}],"name":"LiabilitiesCommitmentSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"addressOwnershipProofs","outputs":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"commitments","outputs":[{"internalType":"uint256","name":"mstRoot","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"uint16","name":"mstLevels","type":"uint16"},{"internalType":"uint16","name":"assetsCount","type":"uint16"},{"internalType":"uint8","name":"balanceByteRange","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"addressHash","type":"bytes32"}],"name":"getAddressOwnershipProof","outputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Summa.AddressOwnershipProof","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mstRoot","type":"uint256"},{"internalType":"uint256[]","name":"rootBalances","type":"uint256[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"chain","type":"string"}],"internalType":"struct Summa.Cryptocurrency[]","name":"cryptocurrencies","type":"tuple[]"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"submitCommitment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"cexAddress","type":"string"},{"internalType":"string","name":"chain","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Summa.AddressOwnershipProof[]","name":"_addressOwnershipProofs","type":"tuple[]"}],"name":"submitProofOfAddressOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"proof","type":"bytes"},{"internalType":"uint256[]","name":"publicInputs","type":"uint256[]"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"verifyInclusionProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"bytecode":"0x60a06040523480156200001157600080fd5b5060405162001cf938038062001cf9833981016040819052620000349162000110565b6200003f33620000a8565b6001600160a01b03939093166080526040805160608101825261ffff938416808252929093166020840181905260ff90941692018290526001805463ffffffff1916909117620100009093029290921760ff60201b191664010000000090910217905562000181565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805161ffff811681146200010b57600080fd5b919050565b600080600080608085870312156200012757600080fd5b84516001600160a01b03811681146200013f57600080fd5b93506200014f60208601620000f8565b92506200015f60408601620000f8565b9150606085015160ff811681146200017657600080fd5b939692955090935050565b608051611b5c6200019d6000396000610b5b0152611b5c6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3c4bcf811610066578063a3c4bcf814610169578063c7ddca0e1461018c578063c8e581471461019f578063da64a750146101c2578063f2fde38b146101d557600080fd5b806319b33968146100a357806349ce8997146100cc578063715018a6146100fa57806379502c55146101045780638da5cb5b1461014e575b600080fd5b6100b66100b13660046111d3565b6101e8565b6040516100c391906112a7565b60405180910390f35b6100ec6100da3660046111d3565b60046020526000908152604090205481565b6040519081526020016100c3565b610102610500565b005b60015461012a9061ffff8082169162010000810490911690640100000000900460ff1683565b6040805161ffff948516815293909216602084015260ff16908201526060016100c3565b6000546040516001600160a01b0390911681526020016100c3565b61017c6101773660046111d3565b610514565b6040516100c394939291906112c1565b61010261019a366004611440565b610774565b6101b26101ad366004611605565b610a15565b60405190151581526020016100c3565b6101026101d0366004611672565b610bdb565b6101026101e33660046117b9565b610fa7565b6102136040518060800160405280606081526020016060815260200160608152602001606081525090565b60008281526003602052604090205461026a5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81b9bdd081d995c9a599a595960621b60448201526064015b60405180910390fd5b600082815260036020526040902054600290610288906001906117f8565b8154811061029857610298611811565b90600052602060002090600402016040518060800160405290816000820180546102c190611827565b80601f01602080910402602001604051908101604052809291908181526020018280546102ed90611827565b801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b5050505050815260200160018201805461035390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461037f90611827565b80156103cc5780601f106103a1576101008083540402835291602001916103cc565b820191906000526020600020905b8154815290600101906020018083116103af57829003601f168201915b505050505081526020016002820180546103e590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461041190611827565b801561045e5780601f106104335761010080835404028352916020019161045e565b820191906000526020600020905b81548152906001019060200180831161044157829003601f168201915b5050505050815260200160038201805461047790611827565b80601f01602080910402602001604051908101604052809291908181526020018280546104a390611827565b80156104f05780601f106104c5576101008083540402835291602001916104f0565b820191906000526020600020905b8154815290600101906020018083116104d357829003601f168201915b5050505050815250509050919050565b610508611020565b610512600061107a565b565b6002818154811061052457600080fd5b906000526020600020906004020160009150905080600001805461054790611827565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611827565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050908060010180546105d590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461060190611827565b801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b50505050509080600201805461066390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461068f90611827565b80156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b5050505050908060030180546106f190611827565b80601f016020809104026020016040519081016040528092919081815260200182805461071d90611827565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b5050505050905084565b61077c611020565b60005b81518110156109da57600082828151811061079c5761079c611811565b6020026020010151600001516040516020016107b89190611861565b60408051601f19818403018152918152815160209283012060008181526003909352912054909150801561082e5760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920766572696669656400000000000000006044820152606401610261565b600284848151811061084257610842611811565b6020908102919091018101518254600181018455600093845291909220825160049092020190819061087490826118cc565b506020820151600182019061088990826118cc565b506040820151600282019061089e90826118cc565b50606082015160038201906108b390826118cc565b50506002546000848152600360205260409020555083518490849081106108dc576108dc611811565b60200260200101516000015151600014158015610918575083838151811061090657610906611811565b60200260200101516020015151600014155b8015610943575083838151811061093157610931611811565b60200260200101516040015151600014155b801561096e575083838151811061095c5761095c611811565b60200260200101516060015151600014155b6109c55760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642070726f6f66206f662061646472657373206f776e65727368604482015261069760f41b6064820152608401610261565b505080806109d29061198c565b91505061077f565b507f382315d4d56a6035e1899bffe77d9becefaf5f2650e4323b27854857a045465881604051610a0a91906119a5565b60405180910390a150565b600082600181518110610a2a57610a2a611811565b6020026020010151600460008481526020019081526020016000206000015414610a895760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b60025b8351811015610b4357838181518110610aa757610aa7611811565b602002602001015160046000858152602001908152602001600020600101600283610ad291906117f8565b81548110610ae257610ae2611811565b906000526020600020015414610b315760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420726f6f742062616c616e636560601b6044820152606401610261565b80610b3b8161198c565b915050610a8c565b50604051630bd205a960e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bd205a9090610b929086908890600401611a42565b602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611a67565b949350505050565b610be3611020565b83600003610c265760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b8151835114610c955760405162461bcd60e51b815260206004820152603560248201527f526f6f74206c696162696c69746965732073756d7320616e64206c696162696c6044820152740d2e8d2cae640dceadac4cae440dad2e6dac2e8c6d605b1b6064820152608401610261565b6000825167ffffffffffffffff811115610cb157610cb1611319565b604051908082528060200260200182016040528015610ce457816020015b6060815260200190600190039081610ccf5790505b5090506000835167ffffffffffffffff811115610d0357610d03611319565b604051908082528060200260200182016040528015610d3657816020015b6060815260200190600190039081610d215790505b50905060005b8451811015610edc57848181518110610d5757610d57611811565b60200260200101516020015151600014158015610d935750848181518110610d8157610d81611811565b60200260200101516000015151600014155b610dd85760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642063727970746f63757272656e637960501b6044820152606401610261565b858181518110610dea57610dea611811565b6020026020010151600003610e535760405162461bcd60e51b815260206004820152602960248201527f416c6c20726f6f742073756d732073686f756c642062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610261565b848181518110610e6557610e65611811565b602002602001015160000151838281518110610e8357610e83611811565b6020026020010181905250848181518110610ea057610ea0611811565b602002602001015160200151828281518110610ebe57610ebe611811565b60200260200101819052508080610ed49061198c565b915050610d3c565b5060408051608081018252878152602080820188815282840186905260608301859052600087815260048352939093208251815592518051929392610f2792600185019201906110ca565b5060408201518051610f43916002840191602090910190611115565b5060608201518051610f5f916003840191602090910190611115565b50905050827f88bfc7389cb831ea0208ff106da6f5c9f88036ba084f1eb008d2788d3d45998d878787604051610f9793929190611a89565b60405180910390a2505050505050565b610faf611020565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610261565b61101d8161107a565b50565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610261565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255906000526020600020908101928215611105579160200282015b828111156111055782518255916020019190600101906110ea565b50611111929150611167565b5090565b82805482825590600052602060002090810192821561115b579160200282015b8281111561115b578251829061114b90826118cc565b5091602001919060010190611135565b5061111192915061117c565b5b808211156111115760008155600101611168565b808211156111115760006111908282611199565b5060010161117c565b5080546111a590611827565b6000825580601f106111b5575050565b601f01602090049060005260206000209081019061101d9190611167565b6000602082840312156111e557600080fd5b5035919050565b60005b838110156112075781810151838201526020016111ef565b50506000910152565b600081518084526112288160208601602086016111ec565b601f01601f19169290920160200192915050565b60008151608084526112516080850182611210565b90506020830151848203602086015261126a8282611210565b915050604083015184820360408601526112848282611210565b9150506060830151848203606086015261129e8282611210565b95945050505050565b6020815260006112ba602083018461123c565b9392505050565b6080815260006112d46080830187611210565b82810360208401526112e68187611210565b905082810360408401526112fa8186611210565b9050828103606084015261130e8185611210565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561135257611352611319565b60405290565b6040805190810167ffffffffffffffff8111828210171561135257611352611319565b604051601f8201601f1916810167ffffffffffffffff811182821017156113a4576113a4611319565b604052919050565b600067ffffffffffffffff8211156113c6576113c6611319565b5060051b60200190565b600082601f8301126113e157600080fd5b813567ffffffffffffffff8111156113fb576113fb611319565b61140e601f8201601f191660200161137b565b81815284602083860101111561142357600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561145357600080fd5b823567ffffffffffffffff8082111561146b57600080fd5b818501915085601f83011261147f57600080fd5b813561149261148d826113ac565b61137b565b81815260059190911b830184019084810190888311156114b157600080fd5b8585015b83811015611592578035858111156114cc57600080fd5b86016080818c03601f190112156114e35760008081fd5b6114eb61132f565b88820135878111156114fd5760008081fd5b61150b8d8b838601016113d0565b825250604080830135888111156115225760008081fd5b6115308e8c838701016113d0565b8b84015250606080840135898111156115495760008081fd5b6115578f8d838801016113d0565b838501525060808401359150888211156115715760008081fd5b61157f8e8c848701016113d0565b90830152508452509186019186016114b5565b5098975050505050505050565b600082601f8301126115b057600080fd5b813560206115c061148d836113ac565b82815260059290921b840181019181810190868411156115df57600080fd5b8286015b848110156115fa57803583529183019183016115e3565b509695505050505050565b60008060006060848603121561161a57600080fd5b833567ffffffffffffffff8082111561163257600080fd5b61163e878388016113d0565b9450602086013591508082111561165457600080fd5b506116618682870161159f565b925050604084013590509250925092565b6000806000806080858703121561168857600080fd5b84359350602085013567ffffffffffffffff808211156116a757600080fd5b6116b38883890161159f565b945060408701359150808211156116c957600080fd5b818701915087601f8301126116dd57600080fd5b6116ea61148d83356113ac565b82358082526020808301929160051b8501018a81111561170957600080fd5b602085015b818110156117a557848135111561172457600080fd5b803586016040818e03601f1901121561173c57600080fd5b611744611358565b60208201358781111561175657600080fd5b6117658f6020838601016113d0565b82525060408201358781111561177a57600080fd5b6117898f6020838601016113d0565b602083015250808652505060208401935060208101905061170e565b50979a969950976060013596505050505050565b6000602082840312156117cb57600080fd5b81356001600160a01b03811681146112ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561180b5761180b6117e2565b92915050565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061183b57607f821691505b60208210810361185b57634e487b7160e01b600052602260045260246000fd5b50919050565b600082516118738184602087016111ec565b9190910192915050565b601f8211156118c757600081815260208120601f850160051c810160208610156118a45750805b601f850160051c820191505b818110156118c3578281556001016118b0565b5050505b505050565b815167ffffffffffffffff8111156118e6576118e6611319565b6118fa816118f48454611827565b8461187d565b602080601f83116001811461192f57600084156119175750858301515b600019600386901b1c1916600185901b1785556118c3565b600085815260208120601f198616915b8281101561195e5788860151825594840194600190910190840161193f565b508582101561197c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161199e5761199e6117e2565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156119fa57603f198886030184526119e885835161123c565b945092850192908501906001016119cc565b5092979650505050505050565b600081518084526020808501945080840160005b83811015611a3757815187529582019590820190600101611a1b565b509495945050505050565b604081526000611a556040830185611a07565b828103602084015261129e8185611210565b600060208284031215611a7957600080fd5b815180151581146112ba57600080fd5b83815260006020606081840152611aa36060840186611a07565b6040848203818601528186518084528484019150848160051b85010185890160005b83811015611b1557868303601f1901855281518051878552611ae988860182611210565b918a0151858303868c0152919050611b018183611210565b968a01969450505090870190600101611ac5565b50909b9a505050505050505050505056fea26469706673582212201433ee99272373b6723c253f90ffe01940889b9641f0849319f2f32a36cb145a64736f6c63430008120033","deployedBytecode":"0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3c4bcf811610066578063a3c4bcf814610169578063c7ddca0e1461018c578063c8e581471461019f578063da64a750146101c2578063f2fde38b146101d557600080fd5b806319b33968146100a357806349ce8997146100cc578063715018a6146100fa57806379502c55146101045780638da5cb5b1461014e575b600080fd5b6100b66100b13660046111d3565b6101e8565b6040516100c391906112a7565b60405180910390f35b6100ec6100da3660046111d3565b60046020526000908152604090205481565b6040519081526020016100c3565b610102610500565b005b60015461012a9061ffff8082169162010000810490911690640100000000900460ff1683565b6040805161ffff948516815293909216602084015260ff16908201526060016100c3565b6000546040516001600160a01b0390911681526020016100c3565b61017c6101773660046111d3565b610514565b6040516100c394939291906112c1565b61010261019a366004611440565b610774565b6101b26101ad366004611605565b610a15565b60405190151581526020016100c3565b6101026101d0366004611672565b610bdb565b6101026101e33660046117b9565b610fa7565b6102136040518060800160405280606081526020016060815260200160608152602001606081525090565b60008281526003602052604090205461026a5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81b9bdd081d995c9a599a595960621b60448201526064015b60405180910390fd5b600082815260036020526040902054600290610288906001906117f8565b8154811061029857610298611811565b90600052602060002090600402016040518060800160405290816000820180546102c190611827565b80601f01602080910402602001604051908101604052809291908181526020018280546102ed90611827565b801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b5050505050815260200160018201805461035390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461037f90611827565b80156103cc5780601f106103a1576101008083540402835291602001916103cc565b820191906000526020600020905b8154815290600101906020018083116103af57829003601f168201915b505050505081526020016002820180546103e590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461041190611827565b801561045e5780601f106104335761010080835404028352916020019161045e565b820191906000526020600020905b81548152906001019060200180831161044157829003601f168201915b5050505050815260200160038201805461047790611827565b80601f01602080910402602001604051908101604052809291908181526020018280546104a390611827565b80156104f05780601f106104c5576101008083540402835291602001916104f0565b820191906000526020600020905b8154815290600101906020018083116104d357829003601f168201915b5050505050815250509050919050565b610508611020565b610512600061107a565b565b6002818154811061052457600080fd5b906000526020600020906004020160009150905080600001805461054790611827565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611827565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050908060010180546105d590611827565b80601f016020809104026020016040519081016040528092919081815260200182805461060190611827565b801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b50505050509080600201805461066390611827565b80601f016020809104026020016040519081016040528092919081815260200182805461068f90611827565b80156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b5050505050908060030180546106f190611827565b80601f016020809104026020016040519081016040528092919081815260200182805461071d90611827565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b5050505050905084565b61077c611020565b60005b81518110156109da57600082828151811061079c5761079c611811565b6020026020010151600001516040516020016107b89190611861565b60408051601f19818403018152918152815160209283012060008181526003909352912054909150801561082e5760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920766572696669656400000000000000006044820152606401610261565b600284848151811061084257610842611811565b6020908102919091018101518254600181018455600093845291909220825160049092020190819061087490826118cc565b506020820151600182019061088990826118cc565b506040820151600282019061089e90826118cc565b50606082015160038201906108b390826118cc565b50506002546000848152600360205260409020555083518490849081106108dc576108dc611811565b60200260200101516000015151600014158015610918575083838151811061090657610906611811565b60200260200101516020015151600014155b8015610943575083838151811061093157610931611811565b60200260200101516040015151600014155b801561096e575083838151811061095c5761095c611811565b60200260200101516060015151600014155b6109c55760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642070726f6f66206f662061646472657373206f776e65727368604482015261069760f41b6064820152608401610261565b505080806109d29061198c565b91505061077f565b507f382315d4d56a6035e1899bffe77d9becefaf5f2650e4323b27854857a045465881604051610a0a91906119a5565b60405180910390a150565b600082600181518110610a2a57610a2a611811565b6020026020010151600460008481526020019081526020016000206000015414610a895760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b60025b8351811015610b4357838181518110610aa757610aa7611811565b602002602001015160046000858152602001908152602001600020600101600283610ad291906117f8565b81548110610ae257610ae2611811565b906000526020600020015414610b315760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420726f6f742062616c616e636560601b6044820152606401610261565b80610b3b8161198c565b915050610a8c565b50604051630bd205a960e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bd205a9090610b929086908890600401611a42565b602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611a67565b949350505050565b610be3611020565b83600003610c265760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081354d5081c9bdbdd60821b6044820152606401610261565b8151835114610c955760405162461bcd60e51b815260206004820152603560248201527f526f6f74206c696162696c69746965732073756d7320616e64206c696162696c6044820152740d2e8d2cae640dceadac4cae440dad2e6dac2e8c6d605b1b6064820152608401610261565b6000825167ffffffffffffffff811115610cb157610cb1611319565b604051908082528060200260200182016040528015610ce457816020015b6060815260200190600190039081610ccf5790505b5090506000835167ffffffffffffffff811115610d0357610d03611319565b604051908082528060200260200182016040528015610d3657816020015b6060815260200190600190039081610d215790505b50905060005b8451811015610edc57848181518110610d5757610d57611811565b60200260200101516020015151600014158015610d935750848181518110610d8157610d81611811565b60200260200101516000015151600014155b610dd85760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642063727970746f63757272656e637960501b6044820152606401610261565b858181518110610dea57610dea611811565b6020026020010151600003610e535760405162461bcd60e51b815260206004820152602960248201527f416c6c20726f6f742073756d732073686f756c642062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610261565b848181518110610e6557610e65611811565b602002602001015160000151838281518110610e8357610e83611811565b6020026020010181905250848181518110610ea057610ea0611811565b602002602001015160200151828281518110610ebe57610ebe611811565b60200260200101819052508080610ed49061198c565b915050610d3c565b5060408051608081018252878152602080820188815282840186905260608301859052600087815260048352939093208251815592518051929392610f2792600185019201906110ca565b5060408201518051610f43916002840191602090910190611115565b5060608201518051610f5f916003840191602090910190611115565b50905050827f88bfc7389cb831ea0208ff106da6f5c9f88036ba084f1eb008d2788d3d45998d878787604051610f9793929190611a89565b60405180910390a2505050505050565b610faf611020565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610261565b61101d8161107a565b50565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610261565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255906000526020600020908101928215611105579160200282015b828111156111055782518255916020019190600101906110ea565b50611111929150611167565b5090565b82805482825590600052602060002090810192821561115b579160200282015b8281111561115b578251829061114b90826118cc565b5091602001919060010190611135565b5061111192915061117c565b5b808211156111115760008155600101611168565b808211156111115760006111908282611199565b5060010161117c565b5080546111a590611827565b6000825580601f106111b5575050565b601f01602090049060005260206000209081019061101d9190611167565b6000602082840312156111e557600080fd5b5035919050565b60005b838110156112075781810151838201526020016111ef565b50506000910152565b600081518084526112288160208601602086016111ec565b601f01601f19169290920160200192915050565b60008151608084526112516080850182611210565b90506020830151848203602086015261126a8282611210565b915050604083015184820360408601526112848282611210565b9150506060830151848203606086015261129e8282611210565b95945050505050565b6020815260006112ba602083018461123c565b9392505050565b6080815260006112d46080830187611210565b82810360208401526112e68187611210565b905082810360408401526112fa8186611210565b9050828103606084015261130e8185611210565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561135257611352611319565b60405290565b6040805190810167ffffffffffffffff8111828210171561135257611352611319565b604051601f8201601f1916810167ffffffffffffffff811182821017156113a4576113a4611319565b604052919050565b600067ffffffffffffffff8211156113c6576113c6611319565b5060051b60200190565b600082601f8301126113e157600080fd5b813567ffffffffffffffff8111156113fb576113fb611319565b61140e601f8201601f191660200161137b565b81815284602083860101111561142357600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561145357600080fd5b823567ffffffffffffffff8082111561146b57600080fd5b818501915085601f83011261147f57600080fd5b813561149261148d826113ac565b61137b565b81815260059190911b830184019084810190888311156114b157600080fd5b8585015b83811015611592578035858111156114cc57600080fd5b86016080818c03601f190112156114e35760008081fd5b6114eb61132f565b88820135878111156114fd5760008081fd5b61150b8d8b838601016113d0565b825250604080830135888111156115225760008081fd5b6115308e8c838701016113d0565b8b84015250606080840135898111156115495760008081fd5b6115578f8d838801016113d0565b838501525060808401359150888211156115715760008081fd5b61157f8e8c848701016113d0565b90830152508452509186019186016114b5565b5098975050505050505050565b600082601f8301126115b057600080fd5b813560206115c061148d836113ac565b82815260059290921b840181019181810190868411156115df57600080fd5b8286015b848110156115fa57803583529183019183016115e3565b509695505050505050565b60008060006060848603121561161a57600080fd5b833567ffffffffffffffff8082111561163257600080fd5b61163e878388016113d0565b9450602086013591508082111561165457600080fd5b506116618682870161159f565b925050604084013590509250925092565b6000806000806080858703121561168857600080fd5b84359350602085013567ffffffffffffffff808211156116a757600080fd5b6116b38883890161159f565b945060408701359150808211156116c957600080fd5b818701915087601f8301126116dd57600080fd5b6116ea61148d83356113ac565b82358082526020808301929160051b8501018a81111561170957600080fd5b602085015b818110156117a557848135111561172457600080fd5b803586016040818e03601f1901121561173c57600080fd5b611744611358565b60208201358781111561175657600080fd5b6117658f6020838601016113d0565b82525060408201358781111561177a57600080fd5b6117898f6020838601016113d0565b602083015250808652505060208401935060208101905061170e565b50979a969950976060013596505050505050565b6000602082840312156117cb57600080fd5b81356001600160a01b03811681146112ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561180b5761180b6117e2565b92915050565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061183b57607f821691505b60208210810361185b57634e487b7160e01b600052602260045260246000fd5b50919050565b600082516118738184602087016111ec565b9190910192915050565b601f8211156118c757600081815260208120601f850160051c810160208610156118a45750805b601f850160051c820191505b818110156118c3578281556001016118b0565b5050505b505050565b815167ffffffffffffffff8111156118e6576118e6611319565b6118fa816118f48454611827565b8461187d565b602080601f83116001811461192f57600084156119175750858301515b600019600386901b1c1916600185901b1785556118c3565b600085815260208120601f198616915b8281101561195e5788860151825594840194600190910190840161193f565b508582101561197c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161199e5761199e6117e2565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156119fa57603f198886030184526119e885835161123c565b945092850192908501906001016119cc565b5092979650505050505050565b600081518084526020808501945080840160005b83811015611a3757815187529582019590820190600101611a1b565b509495945050505050565b604081526000611a556040830185611a07565b828103602084015261129e8185611210565b600060208284031215611a7957600080fd5b815180151581146112ba57600080fd5b83815260006020606081840152611aa36060840186611a07565b6040848203818601528186518084528484019150848160051b85010185890160005b83811015611b1557868303601f1901855281518051878552611ae988860182611210565b918a0151858303868c0152919050611b018183611210565b968a01969450505090870190600101611ac5565b50909b9a505050505050505050505056fea26469706673582212201433ee99272373b6723c253f90ffe01940889b9641f0849319f2f32a36cb145a64736f6c63430008120033","linkReferences":{},"deployedLinkReferences":{}} \ No newline at end of file diff --git a/backend/src/contracts/generated/summa_contract.rs b/backend/src/contracts/generated/summa_contract.rs index d042e796..fe899e90 100644 --- a/backend/src/contracts/generated/summa_contract.rs +++ b/backend/src/contracts/generated/summa_contract.rs @@ -11,7 +11,7 @@ pub use summa::*; )] pub mod summa { #[rustfmt::skip] - const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_inclusionVerifier\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"mstLevels\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"balanceCount\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"balanceByteRange\",\"type\":\"uint8\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof[]\",\"name\":\"addressOwnershipProofs\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}],\"indexed\":false}],\"type\":\"event\",\"name\":\"AddressOwnershipProofSubmitted\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256[]\",\"name\":\"rootBalances\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false},{\"internalType\":\"struct Summa.Cryptocurrency[]\",\"name\":\"cryptocurrencies\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]}],\"indexed\":false}],\"type\":\"event\",\"name\":\"LiabilitiesCommitmentSubmitted\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"addressOwnershipProofs\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"mstLevels\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"balanceCount\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"balanceByteRange\",\"type\":\"uint8\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"addressHash\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getAddressOwnershipProof\",\"outputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof\",\"name\":\"\",\"type\":\"tuple\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"renounceOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"rootBalances\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"struct Summa.Cryptocurrency[]\",\"name\":\"cryptocurrencies\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]}]},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"submitCommitment\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof[]\",\"name\":\"_addressOwnershipProofs\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"submitProofOfAddressOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"publicInputs\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"verifyInclusionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]}]"; + const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_inclusionVerifier\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"mstLevels\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"assetsCount\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"balanceByteRange\",\"type\":\"uint8\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof[]\",\"name\":\"addressOwnershipProofs\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}],\"indexed\":false}],\"type\":\"event\",\"name\":\"AddressOwnershipProofSubmitted\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256[]\",\"name\":\"rootBalances\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false},{\"internalType\":\"struct Summa.Cryptocurrency[]\",\"name\":\"cryptocurrencies\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]}],\"indexed\":false}],\"type\":\"event\",\"name\":\"LiabilitiesCommitmentSubmitted\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"addressOwnershipProofs\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"mstLevels\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint16\",\"name\":\"assetsCount\",\"type\":\"uint16\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"balanceByteRange\",\"type\":\"uint8\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"addressHash\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getAddressOwnershipProof\",\"outputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof\",\"name\":\"\",\"type\":\"tuple\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"renounceOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mstRoot\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"rootBalances\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"struct Summa.Cryptocurrency[]\",\"name\":\"cryptocurrencies\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]}]},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"submitCommitment\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"struct Summa.AddressOwnershipProof[]\",\"name\":\"_addressOwnershipProofs\",\"type\":\"tuple[]\",\"components\":[{\"internalType\":\"string\",\"name\":\"cexAddress\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\",\"components\":[]}]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"submitProofOfAddressOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferOwnership\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"publicInputs\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"verifyInclusionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]}]"; ///The parsed JSON ABI of the contract. pub static SUMMA_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(|| ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")); @@ -7391,38 +7391,38 @@ pub mod summa { 34, 18, 32, - 230, - 198, - 33, - 34, - 71, - 124, - 166, - 97, - 153, - 237, - 165, - 86, - 24, - 124, - 99, - 99, - 51, - 224, - 155, + 20, 51, - 123, - 54, + 238, + 153, + 39, + 35, + 115, 182, - 205, - 234, 114, + 60, + 37, + 63, + 144, 255, - 18, - 218, - 131, - 237, - 186, + 224, + 25, + 64, + 136, + 155, + 150, + 65, + 240, + 132, + 147, + 25, + 242, + 243, + 42, + 54, + 203, + 20, + 90, 100, 115, 111, @@ -14402,38 +14402,38 @@ pub mod summa { 34, 18, 32, - 230, - 198, - 33, - 34, - 71, - 124, - 166, - 97, - 153, - 237, - 165, - 86, - 24, - 124, - 99, - 99, - 51, - 224, - 155, + 20, 51, - 123, - 54, + 238, + 153, + 39, + 35, + 115, 182, - 205, - 234, 114, + 60, + 37, + 63, + 144, 255, - 18, - 218, - 131, - 237, - 186, + 224, + 25, + 64, + 136, + 155, + 150, + 65, + 240, + 132, + 147, + 25, + 242, + 243, + 42, + 54, + 203, + 20, + 90, 100, 115, 111, @@ -15169,7 +15169,7 @@ pub mod summa { )] pub struct ConfigReturn { pub mst_levels: u16, - pub balance_count: u16, + pub assets_count: u16, pub balance_byte_range: u8, } ///Container type for all return fields from the `getAddressOwnershipProof` function with signature `getAddressOwnershipProof(bytes32)` and selector `0x19b33968` diff --git a/backend/src/tests.rs b/backend/src/tests.rs index 94ac143d..572641e0 100644 --- a/backend/src/tests.rs +++ b/backend/src/tests.rs @@ -73,15 +73,15 @@ pub async fn initialize_test_env( // The number of levels of the Merkle sum tree let mst_levels = 4; - //The number of cryptocurrency balances per user included in the Merkle sum tree - let balance_count = 2; + //The number of cryptocurrency assets per user included in the Merkle sum tree + let assets_count = 2; // The number of bytes used to represent the balance of a cryptocurrency in the Merkle sum tree let balance_byte_range = 14; let args: &[Token] = &[ Token::Address(inclusion_verifier_contract.address()), Token::Uint(mst_levels.into()), - Token::Uint(balance_count.into()), + Token::Uint(assets_count.into()), Token::Uint(balance_byte_range.into()), ]; // Deploy Summa contract