@coti-io/coti-contracts 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +18 -14
- package/README.md +3 -1
- package/contracts/disperse/coinByRatio/FixedRatioCoinDisperser.sol +452 -0
- package/contracts/disperse/coinByRatio/FixedRatioCoinDisperserLeftoverS1.sol +490 -0
- package/contracts/disperse/coinByRatio/FixedRatioCoinDisperserUnlimitedWindow.sol +432 -0
- package/contracts/disperse/disperseToken/MintDisperser.sol +120 -0
- package/contracts/disperse/disperseToken/TokenDisperser.sol +139 -0
- package/contracts/mocks/token/ERC20Mock.sol +19 -0
- package/contracts/mocks/token/PrivateERC20/EncryptedTokenReceiverMock.sol +18 -0
- package/contracts/mocks/token/PrivateERC20/PrivacyBridgeERC20Mock.sol +13 -0
- package/contracts/mocks/token/PrivateERC20/PrivateERC20AuditorSupplyMock.sol +44 -0
- package/contracts/mocks/token/PrivateERC20/PrivateERC20CappedMock.sol +23 -0
- package/contracts/mocks/token/PrivateERC20/PrivateERC20GtCallerMock.sol +29 -0
- package/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.sol +9 -4
- package/contracts/mocks/token/PrivateERC20/PrivateERC20ReentrantReceiverMock.sol +39 -0
- package/contracts/mocks/token/PrivateERC20/PublicReentrantTokenReceiverMock.sol +29 -0
- package/contracts/mocks/token/PrivateERC20/PublicTokenReceiverBoolMock.sol +18 -0
- package/contracts/mocks/token/PrivateERC20/PublicTokenReceiverMock.sol +12 -0
- package/contracts/mocks/utils/mpc/Arithmetic128TestsContract.sol +123 -0
- package/contracts/mocks/utils/mpc/Arithmetic256TestsContract.sol +122 -0
- package/contracts/mocks/utils/mpc/Bitwise128TestsContract.sol +65 -0
- package/contracts/mocks/utils/mpc/Bitwise256TestsContract.sol +65 -0
- package/contracts/mocks/utils/mpc/CheckedArithmetic128WithOverflowBitTestsContract.sol +64 -0
- package/contracts/mocks/utils/mpc/CheckedArithmetic256WithOverflowBitTestsContract.sol +64 -0
- package/contracts/mocks/utils/mpc/Comparison128TestsContract.sol +98 -0
- package/contracts/mocks/utils/mpc/Comparison256TestsContract.sol +98 -0
- package/contracts/mocks/utils/mpc/MinMax128TestsContract.sol +44 -0
- package/contracts/mocks/utils/mpc/MinMax256TestsContract.sol +44 -0
- package/contracts/mocks/utils/mpc/MinimalImplementation.sol +55 -0
- package/contracts/mocks/utils/mpc/MinimalProxy.sol +27 -0
- package/contracts/mocks/utils/mpc/MpcOperations128TestContract.sol +267 -0
- package/contracts/mocks/utils/mpc/MpcOperationsTestContract.sol +334 -0
- package/contracts/mocks/utils/mpc/Mux128TestsContract.sol +24 -0
- package/contracts/mocks/utils/mpc/Mux256TestsContract.sol +24 -0
- package/contracts/mocks/utils/mpc/OnBoard128TestsContract.sol +93 -0
- package/contracts/mocks/utils/mpc/OnBoard256TestsContract.sol +116 -0
- package/contracts/mocks/utils/mpc/PrivacyImplementationV1.sol +157 -0
- package/contracts/mocks/utils/mpc/PrivacyImplementationV2.sol +133 -0
- package/contracts/mocks/utils/mpc/PrivacyProxy.sol +137 -0
- package/contracts/mocks/utils/mpc/Random128TestsContract.sol +32 -0
- package/contracts/mocks/utils/mpc/Random256TestsContract.sol +32 -0
- package/contracts/mocks/utils/mpc/Shift128TestsContract.sol +36 -0
- package/contracts/mocks/utils/mpc/Shift256TestsContract.sol +36 -0
- package/contracts/mocks/utils/mpc/Transfer128TestsContract.sol +29 -0
- package/contracts/mocks/utils/mpc/Transfer256TestsContract.sol +29 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance128TestsContract.sol +32 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance256TestsContract.sol +32 -0
- package/contracts/mocks/utils/mpc/ValidateCiphertext128TestsContract.sol +59 -0
- package/contracts/mocks/utils/mpc/ValidateCiphertext256TestsContract.sol +63 -0
- package/contracts/mocks/utils/mpc/ValidateCiphertextTestsContract.sol +99 -0
- package/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.sol +7 -6
- package/contracts/node/CotiNodeRewards.sol +199 -0
- package/contracts/node/SoulboundNodeNFT.sol +519 -0
- package/contracts/privacyBridge/PrivacyBridge.sol +318 -0
- package/contracts/privacyBridge/PrivacyBridgeCotiNative.sol +268 -0
- package/contracts/privacyBridge/PrivacyBridgeERC20.sol +251 -0
- package/contracts/privacyBridge/PrivacyBridgeUSDCe.sol +16 -0
- package/contracts/privacyBridge/PrivacyBridgeUSDT.sol +17 -0
- package/contracts/privacyBridge/PrivacyBridgeWADA.sol +17 -0
- package/contracts/privacyBridge/PrivacyBridgeWBTC.sol +17 -0
- package/contracts/privacyBridge/PrivacyBridgeWETH.sol +17 -0
- package/contracts/privacyBridge/PrivacyBridgegCoti.sol +17 -0
- package/contracts/token/PrivateERC20/IPrivateERC20.sol +273 -40
- package/contracts/token/PrivateERC20/ITokenReceiver.sol +17 -0
- package/contracts/token/PrivateERC20/ITokenReceiverEncrypted.sol +20 -0
- package/contracts/token/PrivateERC20/PrivateERC20.sol +861 -152
- package/contracts/token/PrivateERC20/tokens/PrivateBridgedUSDC.sol +17 -0
- package/contracts/token/PrivateERC20/tokens/PrivateCOTI.sol +13 -0
- package/contracts/token/PrivateERC20/tokens/PrivateCOTITreasuryGovernanceToken.sol +17 -0
- package/contracts/token/PrivateERC20/tokens/PrivateTetherUSD.sol +17 -0
- package/contracts/token/PrivateERC20/tokens/PrivateWrappedADA.sol +17 -0
- package/contracts/token/PrivateERC20/tokens/PrivateWrappedBTC.sol +17 -0
- package/contracts/token/PrivateERC20/tokens/PrivateWrappedEther.sol +13 -0
- package/contracts/utils/mpc/MpcCore.sol +10780 -4962
- package/contracts/utils/mpc/MpcInterface.sol +7 -2
- package/hardhat/gasPriceBump.ts +60 -0
- package/hardhat.config.ts +60 -12
- package/package.json +21 -3
- package/scripts/deploySoulboundNodeNFT.ts +57 -0
- package/test/token/PrivateERC20/PrivacyBridge.fees.test.ts +327 -0
- package/test/token/PrivateERC20/PrivateERC20.test.ts +1109 -268
- package/test/utils/mpc/Bitwise128.test.ts +92 -0
- package/test/utils/mpc/Bitwise256.test.ts +101 -0
- package/test/utils/mpc/BuildInputText128.test.ts +398 -0
- package/test/utils/mpc/CheckedArithmetic128.test.ts +45 -0
- package/test/utils/mpc/CheckedArithmetic256.test.ts +45 -0
- package/test/utils/mpc/Comparison128.test.ts +48 -0
- package/test/utils/mpc/Comparison256.test.ts +48 -0
- package/test/utils/mpc/InvalidCiphertext.test.ts +179 -0
- package/test/utils/mpc/InvalidCiphertext128.test.ts +179 -0
- package/test/utils/mpc/InvalidCiphertext256.test.ts +201 -0
- package/test/utils/mpc/InvalidTransfer128.test.ts +166 -0
- package/test/utils/mpc/InvalidTransfer256.test.ts +158 -0
- package/test/utils/mpc/MinMax128.test.ts +44 -0
- package/test/utils/mpc/MinMax256.test.ts +44 -0
- package/test/utils/mpc/MinimalProxyDemo.test.ts +280 -0
- package/test/utils/mpc/MpcOperations.test.ts +589 -0
- package/test/utils/mpc/MpcOperations128.test.ts +632 -0
- package/test/utils/mpc/Mux128.test.ts +41 -0
- package/test/utils/mpc/Mux256.test.ts +41 -0
- package/test/utils/mpc/NegativeCases.test.ts +478 -0
- package/test/utils/mpc/NegativeCases128.test.ts +237 -0
- package/test/utils/mpc/NegativeCases256.test.ts +236 -0
- package/test/utils/mpc/OnBoard128.test.ts +90 -0
- package/test/utils/mpc/OnBoard256.test.ts +114 -0
- package/test/utils/mpc/Precompile128.test.ts +51 -0
- package/test/utils/mpc/Precompile256.test.ts +115 -0
- package/test/utils/mpc/ProxyValidation.test.ts +199 -0
- package/test/utils/mpc/Random128.test.ts +47 -0
- package/test/utils/mpc/Random256.test.ts +47 -0
- package/test/utils/mpc/Shift128.test.ts +41 -0
- package/test/utils/mpc/Shift256.test.ts +41 -0
- package/test/utils/mpc/Transfer128.test.ts +46 -0
- package/test/utils/mpc/Transfer256.test.ts +46 -0
- package/test/utils/mpc/TransferWithAllowance128.test.ts +48 -0
- package/test/utils/mpc/TransferWithAllowance256.test.ts +48 -0
- package/test/utils/mpc/UpgradeablePrivacyProxy.test.ts +307 -0
- package/test/utils/mpc/ValidateCiphertext.test.ts +221 -0
- package/test/utils/mpc/ValidateCiphertext256.test.ts +161 -0
- package/test/utils/mpc/ValidateCiphertext256Decryption.test.ts +383 -0
- package/test/utils/mpc/WalletEncryptionFailures.test.ts +494 -0
- package/test/utils/privateErc20Helpers.ts +97 -0
- package/typechain-types/@openzeppelin/contracts/access/Ownable.ts +153 -0
- package/typechain-types/@openzeppelin/contracts/access/index.ts +4 -0
- package/typechain-types/@openzeppelin/contracts/index.ts +2 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts +262 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.ts +143 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts +4 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts +6 -0
- package/typechain-types/@openzeppelin/contracts/token/index.ts +2 -0
- package/typechain-types/contracts/disperse/coinByRatio/FixedRatioCoinDisperser.ts +679 -0
- package/typechain-types/contracts/disperse/coinByRatio/index.ts +4 -0
- package/typechain-types/contracts/disperse/disperseToken/MintDisperser.sol/IMintableERC20.ts +97 -0
- package/typechain-types/contracts/disperse/disperseToken/MintDisperser.sol/MintDisperser.ts +206 -0
- package/typechain-types/contracts/disperse/disperseToken/MintDisperser.sol/index.ts +5 -0
- package/typechain-types/contracts/disperse/disperseToken/TokenDisperser.ts +191 -0
- package/typechain-types/contracts/disperse/disperseToken/index.ts +6 -0
- package/typechain-types/contracts/disperse/index.ts +7 -0
- package/typechain-types/contracts/index.ts +2 -0
- package/typechain-types/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.ts +77 -60
- package/typechain-types/contracts/mocks/utils/mpc/Arithmetic128TestsContract.ts +311 -0
- package/typechain-types/contracts/mocks/utils/mpc/Arithmetic256TestsContract.ts +311 -0
- package/typechain-types/contracts/mocks/utils/mpc/Bitwise128TestsContract.ts +179 -0
- package/typechain-types/contracts/mocks/utils/mpc/Bitwise256TestsContract.ts +179 -0
- package/typechain-types/contracts/mocks/utils/mpc/CheckedArithmetic128WithOverflowBitTestsContract.ts +206 -0
- package/typechain-types/contracts/mocks/utils/mpc/CheckedArithmetic256WithOverflowBitTestsContract.ts +206 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison128TestsContract.ts +278 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison256TestsContract.ts +278 -0
- package/typechain-types/contracts/mocks/utils/mpc/MinMax128TestsContract.ts +142 -0
- package/typechain-types/contracts/mocks/utils/mpc/MinMax256TestsContract.ts +142 -0
- package/typechain-types/contracts/mocks/utils/mpc/MinimalImplementation.ts +259 -0
- package/typechain-types/contracts/mocks/utils/mpc/MinimalProxy.ts +90 -0
- package/typechain-types/contracts/mocks/utils/mpc/MpcOperations128TestContract.ts +388 -0
- package/typechain-types/contracts/mocks/utils/mpc/MpcOperationsTestContract.ts +455 -0
- package/typechain-types/contracts/mocks/utils/mpc/Mux128TestsContract.ts +109 -0
- package/typechain-types/contracts/mocks/utils/mpc/Mux256TestsContract.ts +109 -0
- package/typechain-types/contracts/mocks/utils/mpc/OnBoard128TestsContract.ts +166 -0
- package/typechain-types/contracts/mocks/utils/mpc/OnBoard256TestsContract.ts +194 -0
- package/typechain-types/contracts/mocks/utils/mpc/PrivacyImplementationV1.ts +385 -0
- package/typechain-types/contracts/mocks/utils/mpc/PrivacyImplementationV2.ts +441 -0
- package/typechain-types/contracts/mocks/utils/mpc/PrivacyProxy.ts +201 -0
- package/typechain-types/contracts/mocks/utils/mpc/Random128TestsContract.ts +131 -0
- package/typechain-types/contracts/mocks/utils/mpc/Random256TestsContract.ts +131 -0
- package/typechain-types/contracts/mocks/utils/mpc/Shift128TestsContract.ts +142 -0
- package/typechain-types/contracts/mocks/utils/mpc/Shift256TestsContract.ts +142 -0
- package/typechain-types/contracts/mocks/utils/mpc/Transfer128TestsContract.ts +109 -0
- package/typechain-types/contracts/mocks/utils/mpc/Transfer256TestsContract.ts +109 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance128TestsContract.ts +128 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance256TestsContract.ts +128 -0
- package/typechain-types/contracts/mocks/utils/mpc/ValidateCiphertext128TestsContract.ts +198 -0
- package/typechain-types/contracts/mocks/utils/mpc/ValidateCiphertext256TestsContract.ts +182 -0
- package/typechain-types/contracts/mocks/utils/mpc/ValidateCiphertextTestsContract.ts +257 -0
- package/typechain-types/contracts/mocks/utils/mpc/index.ts +32 -8
- package/typechain-types/contracts/token/PrivateERC20/IPrivateERC20.ts +77 -60
- package/typechain-types/contracts/token/PrivateERC20/PrivateERC20.ts +77 -60
- package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +111 -10
- package/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts +74 -0
- package/typechain-types/factories/@openzeppelin/contracts/access/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/index.ts +1 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts +205 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.ts +100 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +1 -0
- package/typechain-types/factories/contracts/disperse/coinByRatio/FixedRatioCoinDisperser__factory.ts +759 -0
- package/typechain-types/factories/contracts/disperse/coinByRatio/index.ts +4 -0
- package/typechain-types/factories/contracts/disperse/disperseToken/MintDisperser.sol/IMintableERC20__factory.ts +43 -0
- package/typechain-types/factories/contracts/disperse/disperseToken/MintDisperser.sol/MintDisperser__factory.ts +185 -0
- package/typechain-types/factories/contracts/disperse/disperseToken/MintDisperser.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/disperse/disperseToken/TokenDisperser__factory.ts +198 -0
- package/typechain-types/factories/contracts/disperse/disperseToken/index.ts +5 -0
- package/typechain-types/factories/contracts/disperse/index.ts +5 -0
- package/typechain-types/factories/contracts/index.ts +1 -0
- package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +179 -47
- package/typechain-types/factories/contracts/mocks/utils/mpc/Arithmetic128TestsContract__factory.ts +330 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Arithmetic256TestsContract__factory.ts +330 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Bitwise128TestsContract__factory.ts +184 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Bitwise256TestsContract__factory.ts +184 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/CheckedArithmetic128WithOverflowBitTestsContract__factory.ts +203 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/CheckedArithmetic256WithOverflowBitTestsContract__factory.ts +203 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/CheckedArithmeticWIthOverflowBitTestsContract.sol/CheckedArithmeticWithOverflowBitTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison128TestsContract__factory.ts +295 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison256TestsContract__factory.ts +295 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMax128TestsContract__factory.ts +147 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMax256TestsContract__factory.ts +147 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinimalImplementation__factory.ts +263 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinimalProxy__factory.ts +104 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MpcOperations128TestContract__factory.ts +723 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/MpcOperationsTestContract__factory.ts +1410 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Mux128TestsContract__factory.ts +115 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Mux256TestsContract__factory.ts +115 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/OnBoard128TestsContract__factory.ts +175 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OnBoard256TestsContract__factory.ts +205 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/PrivacyImplementationV1__factory.ts +521 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/PrivacyImplementationV2__factory.ts +648 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/PrivacyProxy__factory.ts +179 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Random128TestsContract__factory.ts +131 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Random256TestsContract__factory.ts +131 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Shift128TestsContract__factory.ts +147 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Shift256TestsContract__factory.ts +147 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Transfer128TestsContract__factory.ts +135 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Transfer256TestsContract__factory.ts +135 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance128TestsContract__factory.ts +154 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance256TestsContract__factory.ts +154 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/ValidateCiphertext128TestsContract__factory.ts +190 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ValidateCiphertext256TestsContract__factory.ts +210 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ValidateCiphertextTestsContract__factory.ts +260 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +32 -8
- package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +7 -7
- package/typechain-types/factories/contracts/token/PrivateERC20/IPrivateERC20__factory.ts +174 -42
- package/typechain-types/factories/contracts/token/PrivateERC20/PrivateERC20__factory.ts +174 -42
- package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +126 -0
- package/typechain-types/hardhat.d.ts +638 -80
- package/typechain-types/index.ts +78 -16
- package/contracts/mocks/utils/mpc/Arithmetic128BitTestsContract.sol +0 -260
- package/contracts/mocks/utils/mpc/Arithmetic256BitTestsContract.sol +0 -264
- package/contracts/mocks/utils/mpc/Bitwise128BitTestsContract.sol +0 -91
- package/contracts/mocks/utils/mpc/Bitwise256BitTestsContract.sol +0 -91
- package/contracts/mocks/utils/mpc/Comparison128BitTestsContract.sol +0 -158
- package/contracts/mocks/utils/mpc/Comparison256BitTestsContract.sol +0 -158
- package/contracts/mocks/utils/mpc/Miscellaneous128BitTestsContract.sol +0 -185
- package/contracts/mocks/utils/mpc/Miscellaneous256BitTestsContract.sol +0 -190
- package/contracts/mocks/utils/mpc/README.md +0 -486
- package/test/utils/mpc/Unsigned128BitIntegers.test.ts +0 -945
- package/test/utils/mpc/Unsigned256BitIntegers.test.ts +0 -1124
- package/test/utils/mpc/helpers.ts +0 -77
package/typechain-types/factories/contracts/mocks/utils/mpc/MpcOperationsTestContract__factory.ts
ADDED
|
@@ -0,0 +1,1410 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
Contract,
|
|
6
|
+
ContractFactory,
|
|
7
|
+
ContractTransactionResponse,
|
|
8
|
+
Interface,
|
|
9
|
+
} from "ethers";
|
|
10
|
+
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
|
|
11
|
+
import type { NonPayableOverrides } from "../../../../../common";
|
|
12
|
+
import type {
|
|
13
|
+
MpcOperationsTestContract,
|
|
14
|
+
MpcOperationsTestContractInterface,
|
|
15
|
+
} from "../../../../../contracts/mocks/utils/mpc/MpcOperationsTestContract";
|
|
16
|
+
|
|
17
|
+
const _abi = [
|
|
18
|
+
{
|
|
19
|
+
anonymous: false,
|
|
20
|
+
inputs: [
|
|
21
|
+
{
|
|
22
|
+
indexed: false,
|
|
23
|
+
internalType: "string",
|
|
24
|
+
name: "operation",
|
|
25
|
+
type: "string",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
indexed: true,
|
|
29
|
+
internalType: "address",
|
|
30
|
+
name: "user",
|
|
31
|
+
type: "address",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
name: "OperationPerformed",
|
|
35
|
+
type: "event",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
anonymous: false,
|
|
39
|
+
inputs: [
|
|
40
|
+
{
|
|
41
|
+
indexed: true,
|
|
42
|
+
internalType: "address",
|
|
43
|
+
name: "user",
|
|
44
|
+
type: "address",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
components: [
|
|
48
|
+
{
|
|
49
|
+
internalType: "ctUint128",
|
|
50
|
+
name: "ciphertextHigh",
|
|
51
|
+
type: "uint256",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
internalType: "ctUint128",
|
|
55
|
+
name: "ciphertextLow",
|
|
56
|
+
type: "uint256",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
indexed: false,
|
|
60
|
+
internalType: "struct ctUint256",
|
|
61
|
+
name: "result",
|
|
62
|
+
type: "tuple",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
name: "ValueOffBoarded",
|
|
66
|
+
type: "event",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
inputs: [
|
|
70
|
+
{
|
|
71
|
+
components: [
|
|
72
|
+
{
|
|
73
|
+
components: [
|
|
74
|
+
{
|
|
75
|
+
internalType: "ctUint128",
|
|
76
|
+
name: "ciphertextHigh",
|
|
77
|
+
type: "uint256",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
internalType: "ctUint128",
|
|
81
|
+
name: "ciphertextLow",
|
|
82
|
+
type: "uint256",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
internalType: "struct ctUint256",
|
|
86
|
+
name: "ciphertext",
|
|
87
|
+
type: "tuple",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
internalType: "bytes",
|
|
91
|
+
name: "signature",
|
|
92
|
+
type: "bytes",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
internalType: "struct itUint256",
|
|
96
|
+
name: "a",
|
|
97
|
+
type: "tuple",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
components: [
|
|
101
|
+
{
|
|
102
|
+
components: [
|
|
103
|
+
{
|
|
104
|
+
internalType: "ctUint128",
|
|
105
|
+
name: "ciphertextHigh",
|
|
106
|
+
type: "uint256",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
internalType: "ctUint128",
|
|
110
|
+
name: "ciphertextLow",
|
|
111
|
+
type: "uint256",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
internalType: "struct ctUint256",
|
|
115
|
+
name: "ciphertext",
|
|
116
|
+
type: "tuple",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
internalType: "bytes",
|
|
120
|
+
name: "signature",
|
|
121
|
+
type: "bytes",
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
internalType: "struct itUint256",
|
|
125
|
+
name: "b",
|
|
126
|
+
type: "tuple",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
internalType: "address",
|
|
130
|
+
name: "user",
|
|
131
|
+
type: "address",
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
name: "add256",
|
|
135
|
+
outputs: [
|
|
136
|
+
{
|
|
137
|
+
components: [
|
|
138
|
+
{
|
|
139
|
+
internalType: "ctUint128",
|
|
140
|
+
name: "ciphertextHigh",
|
|
141
|
+
type: "uint256",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
internalType: "ctUint128",
|
|
145
|
+
name: "ciphertextLow",
|
|
146
|
+
type: "uint256",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
internalType: "struct ctUint256",
|
|
150
|
+
name: "",
|
|
151
|
+
type: "tuple",
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
stateMutability: "nonpayable",
|
|
155
|
+
type: "function",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
inputs: [
|
|
159
|
+
{
|
|
160
|
+
components: [
|
|
161
|
+
{
|
|
162
|
+
components: [
|
|
163
|
+
{
|
|
164
|
+
internalType: "ctUint128",
|
|
165
|
+
name: "ciphertextHigh",
|
|
166
|
+
type: "uint256",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
internalType: "ctUint128",
|
|
170
|
+
name: "ciphertextLow",
|
|
171
|
+
type: "uint256",
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
internalType: "struct ctUint256",
|
|
175
|
+
name: "ciphertext",
|
|
176
|
+
type: "tuple",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
internalType: "bytes",
|
|
180
|
+
name: "signature",
|
|
181
|
+
type: "bytes",
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
internalType: "struct itUint256",
|
|
185
|
+
name: "a",
|
|
186
|
+
type: "tuple",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
components: [
|
|
190
|
+
{
|
|
191
|
+
components: [
|
|
192
|
+
{
|
|
193
|
+
internalType: "ctUint128",
|
|
194
|
+
name: "ciphertextHigh",
|
|
195
|
+
type: "uint256",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
internalType: "ctUint128",
|
|
199
|
+
name: "ciphertextLow",
|
|
200
|
+
type: "uint256",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
internalType: "struct ctUint256",
|
|
204
|
+
name: "ciphertext",
|
|
205
|
+
type: "tuple",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
internalType: "bytes",
|
|
209
|
+
name: "signature",
|
|
210
|
+
type: "bytes",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
internalType: "struct itUint256",
|
|
214
|
+
name: "b",
|
|
215
|
+
type: "tuple",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
internalType: "address",
|
|
219
|
+
name: "user",
|
|
220
|
+
type: "address",
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
name: "and256",
|
|
224
|
+
outputs: [
|
|
225
|
+
{
|
|
226
|
+
components: [
|
|
227
|
+
{
|
|
228
|
+
internalType: "ctUint128",
|
|
229
|
+
name: "ciphertextHigh",
|
|
230
|
+
type: "uint256",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
internalType: "ctUint128",
|
|
234
|
+
name: "ciphertextLow",
|
|
235
|
+
type: "uint256",
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
internalType: "struct ctUint256",
|
|
239
|
+
name: "",
|
|
240
|
+
type: "tuple",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
stateMutability: "nonpayable",
|
|
244
|
+
type: "function",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
inputs: [
|
|
248
|
+
{
|
|
249
|
+
components: [
|
|
250
|
+
{
|
|
251
|
+
components: [
|
|
252
|
+
{
|
|
253
|
+
internalType: "ctUint128",
|
|
254
|
+
name: "ciphertextHigh",
|
|
255
|
+
type: "uint256",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
internalType: "ctUint128",
|
|
259
|
+
name: "ciphertextLow",
|
|
260
|
+
type: "uint256",
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
internalType: "struct ctUint256",
|
|
264
|
+
name: "ciphertext",
|
|
265
|
+
type: "tuple",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
internalType: "bytes",
|
|
269
|
+
name: "signature",
|
|
270
|
+
type: "bytes",
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
internalType: "struct itUint256",
|
|
274
|
+
name: "a",
|
|
275
|
+
type: "tuple",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
components: [
|
|
279
|
+
{
|
|
280
|
+
components: [
|
|
281
|
+
{
|
|
282
|
+
internalType: "ctUint128",
|
|
283
|
+
name: "ciphertextHigh",
|
|
284
|
+
type: "uint256",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
internalType: "ctUint128",
|
|
288
|
+
name: "ciphertextLow",
|
|
289
|
+
type: "uint256",
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
internalType: "struct ctUint256",
|
|
293
|
+
name: "ciphertext",
|
|
294
|
+
type: "tuple",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
internalType: "bytes",
|
|
298
|
+
name: "signature",
|
|
299
|
+
type: "bytes",
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
internalType: "struct itUint256",
|
|
303
|
+
name: "b",
|
|
304
|
+
type: "tuple",
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
internalType: "address",
|
|
308
|
+
name: "user",
|
|
309
|
+
type: "address",
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
name: "div256",
|
|
313
|
+
outputs: [
|
|
314
|
+
{
|
|
315
|
+
components: [
|
|
316
|
+
{
|
|
317
|
+
internalType: "ctUint128",
|
|
318
|
+
name: "ciphertextHigh",
|
|
319
|
+
type: "uint256",
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
internalType: "ctUint128",
|
|
323
|
+
name: "ciphertextLow",
|
|
324
|
+
type: "uint256",
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
internalType: "struct ctUint256",
|
|
328
|
+
name: "",
|
|
329
|
+
type: "tuple",
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
stateMutability: "nonpayable",
|
|
333
|
+
type: "function",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
inputs: [
|
|
337
|
+
{
|
|
338
|
+
components: [
|
|
339
|
+
{
|
|
340
|
+
components: [
|
|
341
|
+
{
|
|
342
|
+
internalType: "ctUint128",
|
|
343
|
+
name: "ciphertextHigh",
|
|
344
|
+
type: "uint256",
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
internalType: "ctUint128",
|
|
348
|
+
name: "ciphertextLow",
|
|
349
|
+
type: "uint256",
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
internalType: "struct ctUint256",
|
|
353
|
+
name: "ciphertext",
|
|
354
|
+
type: "tuple",
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
internalType: "bytes",
|
|
358
|
+
name: "signature",
|
|
359
|
+
type: "bytes",
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
internalType: "struct itUint256",
|
|
363
|
+
name: "a",
|
|
364
|
+
type: "tuple",
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
components: [
|
|
368
|
+
{
|
|
369
|
+
components: [
|
|
370
|
+
{
|
|
371
|
+
internalType: "ctUint128",
|
|
372
|
+
name: "ciphertextHigh",
|
|
373
|
+
type: "uint256",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
internalType: "ctUint128",
|
|
377
|
+
name: "ciphertextLow",
|
|
378
|
+
type: "uint256",
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
internalType: "struct ctUint256",
|
|
382
|
+
name: "ciphertext",
|
|
383
|
+
type: "tuple",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
internalType: "bytes",
|
|
387
|
+
name: "signature",
|
|
388
|
+
type: "bytes",
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
internalType: "struct itUint256",
|
|
392
|
+
name: "b",
|
|
393
|
+
type: "tuple",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
internalType: "address",
|
|
397
|
+
name: "user",
|
|
398
|
+
type: "address",
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
name: "eq256",
|
|
402
|
+
outputs: [
|
|
403
|
+
{
|
|
404
|
+
components: [
|
|
405
|
+
{
|
|
406
|
+
internalType: "ctUint128",
|
|
407
|
+
name: "ciphertextHigh",
|
|
408
|
+
type: "uint256",
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
internalType: "ctUint128",
|
|
412
|
+
name: "ciphertextLow",
|
|
413
|
+
type: "uint256",
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
internalType: "struct ctUint256",
|
|
417
|
+
name: "",
|
|
418
|
+
type: "tuple",
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
stateMutability: "nonpayable",
|
|
422
|
+
type: "function",
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
inputs: [
|
|
426
|
+
{
|
|
427
|
+
components: [
|
|
428
|
+
{
|
|
429
|
+
components: [
|
|
430
|
+
{
|
|
431
|
+
internalType: "ctUint128",
|
|
432
|
+
name: "ciphertextHigh",
|
|
433
|
+
type: "uint256",
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
internalType: "ctUint128",
|
|
437
|
+
name: "ciphertextLow",
|
|
438
|
+
type: "uint256",
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
internalType: "struct ctUint256",
|
|
442
|
+
name: "ciphertext",
|
|
443
|
+
type: "tuple",
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
internalType: "bytes",
|
|
447
|
+
name: "signature",
|
|
448
|
+
type: "bytes",
|
|
449
|
+
},
|
|
450
|
+
],
|
|
451
|
+
internalType: "struct itUint256",
|
|
452
|
+
name: "a",
|
|
453
|
+
type: "tuple",
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
components: [
|
|
457
|
+
{
|
|
458
|
+
components: [
|
|
459
|
+
{
|
|
460
|
+
internalType: "ctUint128",
|
|
461
|
+
name: "ciphertextHigh",
|
|
462
|
+
type: "uint256",
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
internalType: "ctUint128",
|
|
466
|
+
name: "ciphertextLow",
|
|
467
|
+
type: "uint256",
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
internalType: "struct ctUint256",
|
|
471
|
+
name: "ciphertext",
|
|
472
|
+
type: "tuple",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
internalType: "bytes",
|
|
476
|
+
name: "signature",
|
|
477
|
+
type: "bytes",
|
|
478
|
+
},
|
|
479
|
+
],
|
|
480
|
+
internalType: "struct itUint256",
|
|
481
|
+
name: "b",
|
|
482
|
+
type: "tuple",
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
internalType: "address",
|
|
486
|
+
name: "user",
|
|
487
|
+
type: "address",
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
name: "gt256",
|
|
491
|
+
outputs: [
|
|
492
|
+
{
|
|
493
|
+
components: [
|
|
494
|
+
{
|
|
495
|
+
internalType: "ctUint128",
|
|
496
|
+
name: "ciphertextHigh",
|
|
497
|
+
type: "uint256",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
internalType: "ctUint128",
|
|
501
|
+
name: "ciphertextLow",
|
|
502
|
+
type: "uint256",
|
|
503
|
+
},
|
|
504
|
+
],
|
|
505
|
+
internalType: "struct ctUint256",
|
|
506
|
+
name: "",
|
|
507
|
+
type: "tuple",
|
|
508
|
+
},
|
|
509
|
+
],
|
|
510
|
+
stateMutability: "nonpayable",
|
|
511
|
+
type: "function",
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
inputs: [
|
|
515
|
+
{
|
|
516
|
+
components: [
|
|
517
|
+
{
|
|
518
|
+
components: [
|
|
519
|
+
{
|
|
520
|
+
internalType: "ctUint128",
|
|
521
|
+
name: "ciphertextHigh",
|
|
522
|
+
type: "uint256",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
internalType: "ctUint128",
|
|
526
|
+
name: "ciphertextLow",
|
|
527
|
+
type: "uint256",
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
internalType: "struct ctUint256",
|
|
531
|
+
name: "ciphertext",
|
|
532
|
+
type: "tuple",
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
internalType: "bytes",
|
|
536
|
+
name: "signature",
|
|
537
|
+
type: "bytes",
|
|
538
|
+
},
|
|
539
|
+
],
|
|
540
|
+
internalType: "struct itUint256",
|
|
541
|
+
name: "a",
|
|
542
|
+
type: "tuple",
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
components: [
|
|
546
|
+
{
|
|
547
|
+
components: [
|
|
548
|
+
{
|
|
549
|
+
internalType: "ctUint128",
|
|
550
|
+
name: "ciphertextHigh",
|
|
551
|
+
type: "uint256",
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
internalType: "ctUint128",
|
|
555
|
+
name: "ciphertextLow",
|
|
556
|
+
type: "uint256",
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
internalType: "struct ctUint256",
|
|
560
|
+
name: "ciphertext",
|
|
561
|
+
type: "tuple",
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
internalType: "bytes",
|
|
565
|
+
name: "signature",
|
|
566
|
+
type: "bytes",
|
|
567
|
+
},
|
|
568
|
+
],
|
|
569
|
+
internalType: "struct itUint256",
|
|
570
|
+
name: "b",
|
|
571
|
+
type: "tuple",
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
internalType: "address",
|
|
575
|
+
name: "user",
|
|
576
|
+
type: "address",
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
name: "lt256",
|
|
580
|
+
outputs: [
|
|
581
|
+
{
|
|
582
|
+
components: [
|
|
583
|
+
{
|
|
584
|
+
internalType: "ctUint128",
|
|
585
|
+
name: "ciphertextHigh",
|
|
586
|
+
type: "uint256",
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
internalType: "ctUint128",
|
|
590
|
+
name: "ciphertextLow",
|
|
591
|
+
type: "uint256",
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
internalType: "struct ctUint256",
|
|
595
|
+
name: "",
|
|
596
|
+
type: "tuple",
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
stateMutability: "nonpayable",
|
|
600
|
+
type: "function",
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
inputs: [
|
|
604
|
+
{
|
|
605
|
+
components: [
|
|
606
|
+
{
|
|
607
|
+
components: [
|
|
608
|
+
{
|
|
609
|
+
internalType: "ctUint128",
|
|
610
|
+
name: "ciphertextHigh",
|
|
611
|
+
type: "uint256",
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
internalType: "ctUint128",
|
|
615
|
+
name: "ciphertextLow",
|
|
616
|
+
type: "uint256",
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
internalType: "struct ctUint256",
|
|
620
|
+
name: "ciphertext",
|
|
621
|
+
type: "tuple",
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
internalType: "bytes",
|
|
625
|
+
name: "signature",
|
|
626
|
+
type: "bytes",
|
|
627
|
+
},
|
|
628
|
+
],
|
|
629
|
+
internalType: "struct itUint256",
|
|
630
|
+
name: "a",
|
|
631
|
+
type: "tuple",
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
components: [
|
|
635
|
+
{
|
|
636
|
+
components: [
|
|
637
|
+
{
|
|
638
|
+
internalType: "ctUint128",
|
|
639
|
+
name: "ciphertextHigh",
|
|
640
|
+
type: "uint256",
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
internalType: "ctUint128",
|
|
644
|
+
name: "ciphertextLow",
|
|
645
|
+
type: "uint256",
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
internalType: "struct ctUint256",
|
|
649
|
+
name: "ciphertext",
|
|
650
|
+
type: "tuple",
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
internalType: "bytes",
|
|
654
|
+
name: "signature",
|
|
655
|
+
type: "bytes",
|
|
656
|
+
},
|
|
657
|
+
],
|
|
658
|
+
internalType: "struct itUint256",
|
|
659
|
+
name: "b",
|
|
660
|
+
type: "tuple",
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
internalType: "address",
|
|
664
|
+
name: "user",
|
|
665
|
+
type: "address",
|
|
666
|
+
},
|
|
667
|
+
],
|
|
668
|
+
name: "max256",
|
|
669
|
+
outputs: [
|
|
670
|
+
{
|
|
671
|
+
components: [
|
|
672
|
+
{
|
|
673
|
+
internalType: "ctUint128",
|
|
674
|
+
name: "ciphertextHigh",
|
|
675
|
+
type: "uint256",
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
internalType: "ctUint128",
|
|
679
|
+
name: "ciphertextLow",
|
|
680
|
+
type: "uint256",
|
|
681
|
+
},
|
|
682
|
+
],
|
|
683
|
+
internalType: "struct ctUint256",
|
|
684
|
+
name: "",
|
|
685
|
+
type: "tuple",
|
|
686
|
+
},
|
|
687
|
+
],
|
|
688
|
+
stateMutability: "nonpayable",
|
|
689
|
+
type: "function",
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
inputs: [
|
|
693
|
+
{
|
|
694
|
+
components: [
|
|
695
|
+
{
|
|
696
|
+
components: [
|
|
697
|
+
{
|
|
698
|
+
internalType: "ctUint128",
|
|
699
|
+
name: "ciphertextHigh",
|
|
700
|
+
type: "uint256",
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
internalType: "ctUint128",
|
|
704
|
+
name: "ciphertextLow",
|
|
705
|
+
type: "uint256",
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
internalType: "struct ctUint256",
|
|
709
|
+
name: "ciphertext",
|
|
710
|
+
type: "tuple",
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
internalType: "bytes",
|
|
714
|
+
name: "signature",
|
|
715
|
+
type: "bytes",
|
|
716
|
+
},
|
|
717
|
+
],
|
|
718
|
+
internalType: "struct itUint256",
|
|
719
|
+
name: "a",
|
|
720
|
+
type: "tuple",
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
components: [
|
|
724
|
+
{
|
|
725
|
+
components: [
|
|
726
|
+
{
|
|
727
|
+
internalType: "ctUint128",
|
|
728
|
+
name: "ciphertextHigh",
|
|
729
|
+
type: "uint256",
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
internalType: "ctUint128",
|
|
733
|
+
name: "ciphertextLow",
|
|
734
|
+
type: "uint256",
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
internalType: "struct ctUint256",
|
|
738
|
+
name: "ciphertext",
|
|
739
|
+
type: "tuple",
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
internalType: "bytes",
|
|
743
|
+
name: "signature",
|
|
744
|
+
type: "bytes",
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
internalType: "struct itUint256",
|
|
748
|
+
name: "b",
|
|
749
|
+
type: "tuple",
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
internalType: "address",
|
|
753
|
+
name: "user",
|
|
754
|
+
type: "address",
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
name: "min256",
|
|
758
|
+
outputs: [
|
|
759
|
+
{
|
|
760
|
+
components: [
|
|
761
|
+
{
|
|
762
|
+
internalType: "ctUint128",
|
|
763
|
+
name: "ciphertextHigh",
|
|
764
|
+
type: "uint256",
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
internalType: "ctUint128",
|
|
768
|
+
name: "ciphertextLow",
|
|
769
|
+
type: "uint256",
|
|
770
|
+
},
|
|
771
|
+
],
|
|
772
|
+
internalType: "struct ctUint256",
|
|
773
|
+
name: "",
|
|
774
|
+
type: "tuple",
|
|
775
|
+
},
|
|
776
|
+
],
|
|
777
|
+
stateMutability: "nonpayable",
|
|
778
|
+
type: "function",
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
inputs: [
|
|
782
|
+
{
|
|
783
|
+
components: [
|
|
784
|
+
{
|
|
785
|
+
components: [
|
|
786
|
+
{
|
|
787
|
+
internalType: "ctUint128",
|
|
788
|
+
name: "ciphertextHigh",
|
|
789
|
+
type: "uint256",
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
internalType: "ctUint128",
|
|
793
|
+
name: "ciphertextLow",
|
|
794
|
+
type: "uint256",
|
|
795
|
+
},
|
|
796
|
+
],
|
|
797
|
+
internalType: "struct ctUint256",
|
|
798
|
+
name: "ciphertext",
|
|
799
|
+
type: "tuple",
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
internalType: "bytes",
|
|
803
|
+
name: "signature",
|
|
804
|
+
type: "bytes",
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
internalType: "struct itUint256",
|
|
808
|
+
name: "a",
|
|
809
|
+
type: "tuple",
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
components: [
|
|
813
|
+
{
|
|
814
|
+
components: [
|
|
815
|
+
{
|
|
816
|
+
internalType: "ctUint128",
|
|
817
|
+
name: "ciphertextHigh",
|
|
818
|
+
type: "uint256",
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
internalType: "ctUint128",
|
|
822
|
+
name: "ciphertextLow",
|
|
823
|
+
type: "uint256",
|
|
824
|
+
},
|
|
825
|
+
],
|
|
826
|
+
internalType: "struct ctUint256",
|
|
827
|
+
name: "ciphertext",
|
|
828
|
+
type: "tuple",
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
internalType: "bytes",
|
|
832
|
+
name: "signature",
|
|
833
|
+
type: "bytes",
|
|
834
|
+
},
|
|
835
|
+
],
|
|
836
|
+
internalType: "struct itUint256",
|
|
837
|
+
name: "b",
|
|
838
|
+
type: "tuple",
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
internalType: "address",
|
|
842
|
+
name: "user",
|
|
843
|
+
type: "address",
|
|
844
|
+
},
|
|
845
|
+
],
|
|
846
|
+
name: "mul256",
|
|
847
|
+
outputs: [
|
|
848
|
+
{
|
|
849
|
+
components: [
|
|
850
|
+
{
|
|
851
|
+
internalType: "ctUint128",
|
|
852
|
+
name: "ciphertextHigh",
|
|
853
|
+
type: "uint256",
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
internalType: "ctUint128",
|
|
857
|
+
name: "ciphertextLow",
|
|
858
|
+
type: "uint256",
|
|
859
|
+
},
|
|
860
|
+
],
|
|
861
|
+
internalType: "struct ctUint256",
|
|
862
|
+
name: "",
|
|
863
|
+
type: "tuple",
|
|
864
|
+
},
|
|
865
|
+
],
|
|
866
|
+
stateMutability: "nonpayable",
|
|
867
|
+
type: "function",
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
inputs: [
|
|
871
|
+
{
|
|
872
|
+
components: [
|
|
873
|
+
{
|
|
874
|
+
components: [
|
|
875
|
+
{
|
|
876
|
+
internalType: "ctUint128",
|
|
877
|
+
name: "ciphertextHigh",
|
|
878
|
+
type: "uint256",
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
internalType: "ctUint128",
|
|
882
|
+
name: "ciphertextLow",
|
|
883
|
+
type: "uint256",
|
|
884
|
+
},
|
|
885
|
+
],
|
|
886
|
+
internalType: "struct ctUint256",
|
|
887
|
+
name: "ciphertext",
|
|
888
|
+
type: "tuple",
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
internalType: "bytes",
|
|
892
|
+
name: "signature",
|
|
893
|
+
type: "bytes",
|
|
894
|
+
},
|
|
895
|
+
],
|
|
896
|
+
internalType: "struct itUint256",
|
|
897
|
+
name: "a",
|
|
898
|
+
type: "tuple",
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
components: [
|
|
902
|
+
{
|
|
903
|
+
components: [
|
|
904
|
+
{
|
|
905
|
+
internalType: "ctUint128",
|
|
906
|
+
name: "ciphertextHigh",
|
|
907
|
+
type: "uint256",
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
internalType: "ctUint128",
|
|
911
|
+
name: "ciphertextLow",
|
|
912
|
+
type: "uint256",
|
|
913
|
+
},
|
|
914
|
+
],
|
|
915
|
+
internalType: "struct ctUint256",
|
|
916
|
+
name: "ciphertext",
|
|
917
|
+
type: "tuple",
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
internalType: "bytes",
|
|
921
|
+
name: "signature",
|
|
922
|
+
type: "bytes",
|
|
923
|
+
},
|
|
924
|
+
],
|
|
925
|
+
internalType: "struct itUint256",
|
|
926
|
+
name: "b",
|
|
927
|
+
type: "tuple",
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
internalType: "address",
|
|
931
|
+
name: "user",
|
|
932
|
+
type: "address",
|
|
933
|
+
},
|
|
934
|
+
],
|
|
935
|
+
name: "or256",
|
|
936
|
+
outputs: [
|
|
937
|
+
{
|
|
938
|
+
components: [
|
|
939
|
+
{
|
|
940
|
+
internalType: "ctUint128",
|
|
941
|
+
name: "ciphertextHigh",
|
|
942
|
+
type: "uint256",
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
internalType: "ctUint128",
|
|
946
|
+
name: "ciphertextLow",
|
|
947
|
+
type: "uint256",
|
|
948
|
+
},
|
|
949
|
+
],
|
|
950
|
+
internalType: "struct ctUint256",
|
|
951
|
+
name: "",
|
|
952
|
+
type: "tuple",
|
|
953
|
+
},
|
|
954
|
+
],
|
|
955
|
+
stateMutability: "nonpayable",
|
|
956
|
+
type: "function",
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
inputs: [
|
|
960
|
+
{
|
|
961
|
+
components: [
|
|
962
|
+
{
|
|
963
|
+
components: [
|
|
964
|
+
{
|
|
965
|
+
internalType: "ctUint128",
|
|
966
|
+
name: "ciphertextHigh",
|
|
967
|
+
type: "uint256",
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
internalType: "ctUint128",
|
|
971
|
+
name: "ciphertextLow",
|
|
972
|
+
type: "uint256",
|
|
973
|
+
},
|
|
974
|
+
],
|
|
975
|
+
internalType: "struct ctUint256",
|
|
976
|
+
name: "ciphertext",
|
|
977
|
+
type: "tuple",
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
internalType: "bytes",
|
|
981
|
+
name: "signature",
|
|
982
|
+
type: "bytes",
|
|
983
|
+
},
|
|
984
|
+
],
|
|
985
|
+
internalType: "struct itUint256",
|
|
986
|
+
name: "a",
|
|
987
|
+
type: "tuple",
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
components: [
|
|
991
|
+
{
|
|
992
|
+
components: [
|
|
993
|
+
{
|
|
994
|
+
internalType: "ctUint128",
|
|
995
|
+
name: "ciphertextHigh",
|
|
996
|
+
type: "uint256",
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
internalType: "ctUint128",
|
|
1000
|
+
name: "ciphertextLow",
|
|
1001
|
+
type: "uint256",
|
|
1002
|
+
},
|
|
1003
|
+
],
|
|
1004
|
+
internalType: "struct ctUint256",
|
|
1005
|
+
name: "ciphertext",
|
|
1006
|
+
type: "tuple",
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
internalType: "bytes",
|
|
1010
|
+
name: "signature",
|
|
1011
|
+
type: "bytes",
|
|
1012
|
+
},
|
|
1013
|
+
],
|
|
1014
|
+
internalType: "struct itUint256",
|
|
1015
|
+
name: "b",
|
|
1016
|
+
type: "tuple",
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
internalType: "address",
|
|
1020
|
+
name: "user",
|
|
1021
|
+
type: "address",
|
|
1022
|
+
},
|
|
1023
|
+
],
|
|
1024
|
+
name: "rem256",
|
|
1025
|
+
outputs: [
|
|
1026
|
+
{
|
|
1027
|
+
components: [
|
|
1028
|
+
{
|
|
1029
|
+
internalType: "ctUint128",
|
|
1030
|
+
name: "ciphertextHigh",
|
|
1031
|
+
type: "uint256",
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
internalType: "ctUint128",
|
|
1035
|
+
name: "ciphertextLow",
|
|
1036
|
+
type: "uint256",
|
|
1037
|
+
},
|
|
1038
|
+
],
|
|
1039
|
+
internalType: "struct ctUint256",
|
|
1040
|
+
name: "",
|
|
1041
|
+
type: "tuple",
|
|
1042
|
+
},
|
|
1043
|
+
],
|
|
1044
|
+
stateMutability: "nonpayable",
|
|
1045
|
+
type: "function",
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
inputs: [
|
|
1049
|
+
{
|
|
1050
|
+
components: [
|
|
1051
|
+
{
|
|
1052
|
+
components: [
|
|
1053
|
+
{
|
|
1054
|
+
internalType: "ctUint128",
|
|
1055
|
+
name: "ciphertextHigh",
|
|
1056
|
+
type: "uint256",
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
internalType: "ctUint128",
|
|
1060
|
+
name: "ciphertextLow",
|
|
1061
|
+
type: "uint256",
|
|
1062
|
+
},
|
|
1063
|
+
],
|
|
1064
|
+
internalType: "struct ctUint256",
|
|
1065
|
+
name: "ciphertext",
|
|
1066
|
+
type: "tuple",
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
internalType: "bytes",
|
|
1070
|
+
name: "signature",
|
|
1071
|
+
type: "bytes",
|
|
1072
|
+
},
|
|
1073
|
+
],
|
|
1074
|
+
internalType: "struct itUint256",
|
|
1075
|
+
name: "a",
|
|
1076
|
+
type: "tuple",
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
internalType: "uint8",
|
|
1080
|
+
name: "bits",
|
|
1081
|
+
type: "uint8",
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
internalType: "address",
|
|
1085
|
+
name: "user",
|
|
1086
|
+
type: "address",
|
|
1087
|
+
},
|
|
1088
|
+
],
|
|
1089
|
+
name: "shl256",
|
|
1090
|
+
outputs: [
|
|
1091
|
+
{
|
|
1092
|
+
components: [
|
|
1093
|
+
{
|
|
1094
|
+
internalType: "ctUint128",
|
|
1095
|
+
name: "ciphertextHigh",
|
|
1096
|
+
type: "uint256",
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
internalType: "ctUint128",
|
|
1100
|
+
name: "ciphertextLow",
|
|
1101
|
+
type: "uint256",
|
|
1102
|
+
},
|
|
1103
|
+
],
|
|
1104
|
+
internalType: "struct ctUint256",
|
|
1105
|
+
name: "",
|
|
1106
|
+
type: "tuple",
|
|
1107
|
+
},
|
|
1108
|
+
],
|
|
1109
|
+
stateMutability: "nonpayable",
|
|
1110
|
+
type: "function",
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
inputs: [
|
|
1114
|
+
{
|
|
1115
|
+
components: [
|
|
1116
|
+
{
|
|
1117
|
+
components: [
|
|
1118
|
+
{
|
|
1119
|
+
internalType: "ctUint128",
|
|
1120
|
+
name: "ciphertextHigh",
|
|
1121
|
+
type: "uint256",
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
internalType: "ctUint128",
|
|
1125
|
+
name: "ciphertextLow",
|
|
1126
|
+
type: "uint256",
|
|
1127
|
+
},
|
|
1128
|
+
],
|
|
1129
|
+
internalType: "struct ctUint256",
|
|
1130
|
+
name: "ciphertext",
|
|
1131
|
+
type: "tuple",
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
internalType: "bytes",
|
|
1135
|
+
name: "signature",
|
|
1136
|
+
type: "bytes",
|
|
1137
|
+
},
|
|
1138
|
+
],
|
|
1139
|
+
internalType: "struct itUint256",
|
|
1140
|
+
name: "a",
|
|
1141
|
+
type: "tuple",
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
internalType: "uint8",
|
|
1145
|
+
name: "bits",
|
|
1146
|
+
type: "uint8",
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
internalType: "address",
|
|
1150
|
+
name: "user",
|
|
1151
|
+
type: "address",
|
|
1152
|
+
},
|
|
1153
|
+
],
|
|
1154
|
+
name: "shr256",
|
|
1155
|
+
outputs: [
|
|
1156
|
+
{
|
|
1157
|
+
components: [
|
|
1158
|
+
{
|
|
1159
|
+
internalType: "ctUint128",
|
|
1160
|
+
name: "ciphertextHigh",
|
|
1161
|
+
type: "uint256",
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
internalType: "ctUint128",
|
|
1165
|
+
name: "ciphertextLow",
|
|
1166
|
+
type: "uint256",
|
|
1167
|
+
},
|
|
1168
|
+
],
|
|
1169
|
+
internalType: "struct ctUint256",
|
|
1170
|
+
name: "",
|
|
1171
|
+
type: "tuple",
|
|
1172
|
+
},
|
|
1173
|
+
],
|
|
1174
|
+
stateMutability: "nonpayable",
|
|
1175
|
+
type: "function",
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
inputs: [
|
|
1179
|
+
{
|
|
1180
|
+
components: [
|
|
1181
|
+
{
|
|
1182
|
+
components: [
|
|
1183
|
+
{
|
|
1184
|
+
internalType: "ctUint128",
|
|
1185
|
+
name: "ciphertextHigh",
|
|
1186
|
+
type: "uint256",
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
internalType: "ctUint128",
|
|
1190
|
+
name: "ciphertextLow",
|
|
1191
|
+
type: "uint256",
|
|
1192
|
+
},
|
|
1193
|
+
],
|
|
1194
|
+
internalType: "struct ctUint256",
|
|
1195
|
+
name: "ciphertext",
|
|
1196
|
+
type: "tuple",
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
internalType: "bytes",
|
|
1200
|
+
name: "signature",
|
|
1201
|
+
type: "bytes",
|
|
1202
|
+
},
|
|
1203
|
+
],
|
|
1204
|
+
internalType: "struct itUint256",
|
|
1205
|
+
name: "a",
|
|
1206
|
+
type: "tuple",
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
components: [
|
|
1210
|
+
{
|
|
1211
|
+
components: [
|
|
1212
|
+
{
|
|
1213
|
+
internalType: "ctUint128",
|
|
1214
|
+
name: "ciphertextHigh",
|
|
1215
|
+
type: "uint256",
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
internalType: "ctUint128",
|
|
1219
|
+
name: "ciphertextLow",
|
|
1220
|
+
type: "uint256",
|
|
1221
|
+
},
|
|
1222
|
+
],
|
|
1223
|
+
internalType: "struct ctUint256",
|
|
1224
|
+
name: "ciphertext",
|
|
1225
|
+
type: "tuple",
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
internalType: "bytes",
|
|
1229
|
+
name: "signature",
|
|
1230
|
+
type: "bytes",
|
|
1231
|
+
},
|
|
1232
|
+
],
|
|
1233
|
+
internalType: "struct itUint256",
|
|
1234
|
+
name: "b",
|
|
1235
|
+
type: "tuple",
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
internalType: "address",
|
|
1239
|
+
name: "user",
|
|
1240
|
+
type: "address",
|
|
1241
|
+
},
|
|
1242
|
+
],
|
|
1243
|
+
name: "sub256",
|
|
1244
|
+
outputs: [
|
|
1245
|
+
{
|
|
1246
|
+
components: [
|
|
1247
|
+
{
|
|
1248
|
+
internalType: "ctUint128",
|
|
1249
|
+
name: "ciphertextHigh",
|
|
1250
|
+
type: "uint256",
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
internalType: "ctUint128",
|
|
1254
|
+
name: "ciphertextLow",
|
|
1255
|
+
type: "uint256",
|
|
1256
|
+
},
|
|
1257
|
+
],
|
|
1258
|
+
internalType: "struct ctUint256",
|
|
1259
|
+
name: "",
|
|
1260
|
+
type: "tuple",
|
|
1261
|
+
},
|
|
1262
|
+
],
|
|
1263
|
+
stateMutability: "nonpayable",
|
|
1264
|
+
type: "function",
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
inputs: [
|
|
1268
|
+
{
|
|
1269
|
+
components: [
|
|
1270
|
+
{
|
|
1271
|
+
components: [
|
|
1272
|
+
{
|
|
1273
|
+
internalType: "ctUint128",
|
|
1274
|
+
name: "ciphertextHigh",
|
|
1275
|
+
type: "uint256",
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
internalType: "ctUint128",
|
|
1279
|
+
name: "ciphertextLow",
|
|
1280
|
+
type: "uint256",
|
|
1281
|
+
},
|
|
1282
|
+
],
|
|
1283
|
+
internalType: "struct ctUint256",
|
|
1284
|
+
name: "ciphertext",
|
|
1285
|
+
type: "tuple",
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
internalType: "bytes",
|
|
1289
|
+
name: "signature",
|
|
1290
|
+
type: "bytes",
|
|
1291
|
+
},
|
|
1292
|
+
],
|
|
1293
|
+
internalType: "struct itUint256",
|
|
1294
|
+
name: "a",
|
|
1295
|
+
type: "tuple",
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
components: [
|
|
1299
|
+
{
|
|
1300
|
+
components: [
|
|
1301
|
+
{
|
|
1302
|
+
internalType: "ctUint128",
|
|
1303
|
+
name: "ciphertextHigh",
|
|
1304
|
+
type: "uint256",
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
internalType: "ctUint128",
|
|
1308
|
+
name: "ciphertextLow",
|
|
1309
|
+
type: "uint256",
|
|
1310
|
+
},
|
|
1311
|
+
],
|
|
1312
|
+
internalType: "struct ctUint256",
|
|
1313
|
+
name: "ciphertext",
|
|
1314
|
+
type: "tuple",
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
internalType: "bytes",
|
|
1318
|
+
name: "signature",
|
|
1319
|
+
type: "bytes",
|
|
1320
|
+
},
|
|
1321
|
+
],
|
|
1322
|
+
internalType: "struct itUint256",
|
|
1323
|
+
name: "b",
|
|
1324
|
+
type: "tuple",
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
internalType: "address",
|
|
1328
|
+
name: "user",
|
|
1329
|
+
type: "address",
|
|
1330
|
+
},
|
|
1331
|
+
],
|
|
1332
|
+
name: "xor256",
|
|
1333
|
+
outputs: [
|
|
1334
|
+
{
|
|
1335
|
+
components: [
|
|
1336
|
+
{
|
|
1337
|
+
internalType: "ctUint128",
|
|
1338
|
+
name: "ciphertextHigh",
|
|
1339
|
+
type: "uint256",
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
internalType: "ctUint128",
|
|
1343
|
+
name: "ciphertextLow",
|
|
1344
|
+
type: "uint256",
|
|
1345
|
+
},
|
|
1346
|
+
],
|
|
1347
|
+
internalType: "struct ctUint256",
|
|
1348
|
+
name: "",
|
|
1349
|
+
type: "tuple",
|
|
1350
|
+
},
|
|
1351
|
+
],
|
|
1352
|
+
stateMutability: "nonpayable",
|
|
1353
|
+
type: "function",
|
|
1354
|
+
},
|
|
1355
|
+
] as const;
|
|
1356
|
+
|
|
1357
|
+
const _bytecode =
|
|
1358
|
+
"0x608060405234801561001057600080fd5b50611867806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063c9a5ee2e11610097578063e406371c11610066578063e406371c146101ea578063e8a4178b146101fd578063f0e4eb2514610210578063fd5494071461022357600080fd5b8063c9a5ee2e1461019e578063d57a9728146101b1578063d6c036e9146101c4578063db4c49cd146101d757600080fd5b806397e2a27a116100d357806397e2a27a146101525780639b671cf614610165578063b4e554f514610178578063bc681a8a1461018b57600080fd5b80632541ecad146100fa57806355a00a0d1461012c578063950f61321461013f575b600080fd5b61010d61010836600461161e565b610236565b6040805182518152602092830151928101929092520160405180910390f35b61010d61013a36600461161e565b61035e565b61010d61014d36600461161e565b61041e565b61010d610160366004611692565b610568565b61010d61017336600461161e565b610682565b61010d61018636600461161e565b610754565b61010d61019936600461161e565b610814565b61010d6101ac36600461161e565b6108e6565b61010d6101bf36600461161e565b6109a6565b61010d6101d236600461161e565b610a66565b61010d6101e536600461161e565b610b26565b61010d6101f836600461161e565b610be6565b61010d61020b36600461161e565b610ca6565b61010d61021e366004611692565b610d66565b61010d61023136600461161e565b610e19565b6040805180820190915260008082526020820152600061025585610ed9565b9050600061026285610ed9565b905060006102708383610f92565b9050600061027e8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f6d756c3235360000000000000000000000000000000000000000000000000000604082015260600190565b60405180910390a260408051825181526020808401519082015273ffffffffffffffffffffffffffffffffffffffff8816917f7f38640c053318bd5c6f1dc8bcf1333e02785c56c51f92858ca2f0a85525d74e910160405180910390a2979650505050505050565b6040805180820190915260008082526020820152600061037d85610ed9565b9050600061038a85610ed9565b905060006103988383611142565b905060006103a68287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f7375623235360000000000000000000000000000000000000000000000000000604082015260600190565b6040805180820190915260008082526020820152600061043d85610ed9565b9050600061044a85610ed9565b905060006104588383611157565b905060006104798261046a600161116c565b610474600061116c565b6111d3565b905060006104878288611058565b90508673ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516104ff9060208082526005908201527f6774323536000000000000000000000000000000000000000000000000000000604082015260600190565b60405180910390a260408051825181526020808401519082015273ffffffffffffffffffffffffffffffffffffffff8916917f7f38640c053318bd5c6f1dc8bcf1333e02785c56c51f92858ca2f0a85525d74e910160405180910390a298975050505050505050565b6040805180820190915260008082526020820152600061058785610ed9565b9050600061059582866112a0565b905060006105a38286611058565b90508473ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd795508560405161061b9060208082526006908201527f73686c3235360000000000000000000000000000000000000000000000000000604082015260600190565b60405180910390a260408051825181526020808401519082015273ffffffffffffffffffffffffffffffffffffffff8716917f7f38640c053318bd5c6f1dc8bcf1333e02785c56c51f92858ca2f0a85525d74e910160405180910390a29695505050505050565b604080518082019091526000808252602082015260006106a185610ed9565b905060006106ae85610ed9565b905060006106bc8383611324565b905060006106ce8261046a600161116c565b905060006106dc8288611058565b90508673ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516104ff9060208082526005908201527f6c74323536000000000000000000000000000000000000000000000000000000604082015260600190565b6040805180820190915260008082526020820152600061077385610ed9565b9050600061078085610ed9565b9050600061078e8383611339565b9050600061079c8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f6469763235360000000000000000000000000000000000000000000000000000604082015260600190565b6040805180820190915260008082526020820152600061083385610ed9565b9050600061084085610ed9565b9050600061084e838361134e565b905060006108608261046a600161116c565b9050600061086e8288611058565b90508673ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516104ff9060208082526005908201527f6571323536000000000000000000000000000000000000000000000000000000604082015260600190565b6040805180820190915260008082526020820152600061090585610ed9565b9050600061091285610ed9565b905060006109208383611363565b9050600061092e8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f786f723235360000000000000000000000000000000000000000000000000000604082015260600190565b604080518082019091526000808252602082015260006109c585610ed9565b905060006109d285610ed9565b905060006109e08383611378565b905060006109ee8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f616e643235360000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610a8585610ed9565b90506000610a9285610ed9565b90506000610aa0838361138d565b90506000610aae8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f6164643235360000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610b4585610ed9565b90506000610b5285610ed9565b90506000610b6083836113a2565b90506000610b6e8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f6d696e3235360000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610c0585610ed9565b90506000610c1285610ed9565b90506000610c2083836113b7565b90506000610c2e8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526005908201527f6f72323536000000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610cc585610ed9565b90506000610cd285610ed9565b90506000610ce083836113cc565b90506000610cee8287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f6d61783235360000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610d8585610ed9565b90506000610d9382866113e1565b90506000610da18286611058565b90508473ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd795508560405161061b9060208082526006908201527f7368723235360000000000000000000000000000000000000000000000000000604082015260600190565b60408051808201909152600080825260208201526000610e3885610ed9565b90506000610e4585610ed9565b90506000610e5383836113f8565b90506000610e618287611058565b90508573ffffffffffffffffffffffffffffffffffffffff167f03f82d41170417faf6491fe5c58bc7ee629443641da1cc67f43d25bbd79550856040516102f69060208082526006908201527f72656d3235360000000000000000000000000000000000000000000000000000604082015260600190565b80518051602091820151918301516040517f0135e466000000000000000000000000000000000000000000000000000000008152600093606493630135e46693610f49937f0600000000000000000000000000000000000000000000000000000000000000939190600401611782565b6020604051808303816000875af1158015610f68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8c91906117d3565b92915050565b6000606463f1d21bb4610fa760068085611409565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681527fffffff0000000000000000000000000000000000000000000000000000000000909116600482015260248101869052604481018590526064015b6020604051808303816000875af115801561102d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105191906117d3565b9392505050565b6040805180820190915260008082526020820152600080606463e5c83313600660f81b87876040516020016110b8919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016110e5939291906117ec565b60408051808303816000875af1158015611103573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111279190611836565b60408051808201909152918252602082015295945050505050565b6000606463371d1bf2610fa760068085611409565b60006064636d82e45e610fa760068085611409565b6040517fd9b60b600000000000000000000000000000000000000000000000000000000081527f060000000000000000000000000000000000000000000000000000000000000060048201526024810182905260009060649063d9b60b6090604401610f49565b600060646320cc408d6111e860068085611409565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681527fffffff000000000000000000000000000000000000000000000000000000000090911660048201526024810187905260448101869052606481018590526084016020604051808303816000875af1158015611274573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129891906117d3565b949350505050565b60006064631135f71a6112b7600660016002611409565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681527fffffff000000000000000000000000000000000000000000000000000000000090911660048201526024810186905260ff8516604482015260640161100e565b6000606463dd148693610fa760068085611409565b60006064634e9ba4b5610fa760068085611409565b60006064637c12a1eb610fa760068085611409565b60006064636f962e2c610fa760068085611409565b6000606463fe9c73d1610fa760068085611409565b60006064638c5d0150610fa760068085611409565b600060646369ca0874610fa760068085611409565b6000606463fb7da35f610fa760068085611409565b60006064639bda0782610fa760068085611409565b600060646339bd1d8d6112b7600660016002611409565b600060646386e3b7b9610fa7600680855b600081600281111561141d5761141d6116ef565b60ff166008846006811115611434576114346116ef565b61ffff16901b61ffff166010866006811115611452576114526116ef565b62ffffff16901b171760e81b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156114b8576114b8611466565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561150557611505611466565b604052919050565b6000818303606081121561152057600080fd5b611528611495565b9150604081121561153857600080fd5b50611541611495565b823581526020808401358183015290825260408301359067ffffffffffffffff8083111561156e57600080fd5b828501925085601f84011261158257600080fd5b82358181111561159457611594611466565b6115c4837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016114be565b915080825286838286010111156115da57600080fd5b80838501848401376000908201830152908301525092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461161957600080fd5b919050565b60008060006060848603121561163357600080fd5b833567ffffffffffffffff8082111561164b57600080fd5b6116578783880161150d565b9450602086013591508082111561166d57600080fd5b5061167a8682870161150d565b925050611689604085016115f5565b90509250925092565b6000806000606084860312156116a757600080fd5b833567ffffffffffffffff8111156116be57600080fd5b6116ca8682870161150d565b935050602084013560ff811681146116e157600080fd5b9150611689604085016115f5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815180845260005b8181101561174457602081850181015186830182015201611728565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b7fff00000000000000000000000000000000000000000000000000000000000000851681528360208201528260408201526080606082015260006117c9608083018461171e565b9695505050505050565b6000602082840312156117e557600080fd5b5051919050565b7fff000000000000000000000000000000000000000000000000000000000000008416815282602082015260606040820152600061182d606083018461171e565b95945050505050565b6000806040838503121561184957600080fd5b50508051602090910151909290915056fea164736f6c6343000813000a";
|
|
1359
|
+
|
|
1360
|
+
type MpcOperationsTestContractConstructorParams =
|
|
1361
|
+
| [signer?: Signer]
|
|
1362
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
1363
|
+
|
|
1364
|
+
const isSuperArgs = (
|
|
1365
|
+
xs: MpcOperationsTestContractConstructorParams
|
|
1366
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
1367
|
+
|
|
1368
|
+
export class MpcOperationsTestContract__factory extends ContractFactory {
|
|
1369
|
+
constructor(...args: MpcOperationsTestContractConstructorParams) {
|
|
1370
|
+
if (isSuperArgs(args)) {
|
|
1371
|
+
super(...args);
|
|
1372
|
+
} else {
|
|
1373
|
+
super(_abi, _bytecode, args[0]);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
override getDeployTransaction(
|
|
1378
|
+
overrides?: NonPayableOverrides & { from?: string }
|
|
1379
|
+
): Promise<ContractDeployTransaction> {
|
|
1380
|
+
return super.getDeployTransaction(overrides || {});
|
|
1381
|
+
}
|
|
1382
|
+
override deploy(overrides?: NonPayableOverrides & { from?: string }) {
|
|
1383
|
+
return super.deploy(overrides || {}) as Promise<
|
|
1384
|
+
MpcOperationsTestContract & {
|
|
1385
|
+
deploymentTransaction(): ContractTransactionResponse;
|
|
1386
|
+
}
|
|
1387
|
+
>;
|
|
1388
|
+
}
|
|
1389
|
+
override connect(
|
|
1390
|
+
runner: ContractRunner | null
|
|
1391
|
+
): MpcOperationsTestContract__factory {
|
|
1392
|
+
return super.connect(runner) as MpcOperationsTestContract__factory;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
static readonly bytecode = _bytecode;
|
|
1396
|
+
static readonly abi = _abi;
|
|
1397
|
+
static createInterface(): MpcOperationsTestContractInterface {
|
|
1398
|
+
return new Interface(_abi) as MpcOperationsTestContractInterface;
|
|
1399
|
+
}
|
|
1400
|
+
static connect(
|
|
1401
|
+
address: string,
|
|
1402
|
+
runner?: ContractRunner | null
|
|
1403
|
+
): MpcOperationsTestContract {
|
|
1404
|
+
return new Contract(
|
|
1405
|
+
address,
|
|
1406
|
+
_abi,
|
|
1407
|
+
runner
|
|
1408
|
+
) as unknown as MpcOperationsTestContract;
|
|
1409
|
+
}
|
|
1410
|
+
}
|