diff --git a/codegen/templates.ts b/codegen/templates.ts index 54d38f17..7fd6f0a3 100644 --- a/codegen/templates.ts +++ b/codegen/templates.ts @@ -710,6 +710,10 @@ function tfheAclMethods(supportedBits: number[]): string { function allow(ebool value, address account) internal { Impl.allow(ebool.unwrap(value), account); } + + function allowThis(ebool value) internal { + Impl.allow(ebool.unwrap(value), address(this)); + } `, ); @@ -719,6 +723,10 @@ function tfheAclMethods(supportedBits: number[]): string { function allow(euint${bits} value, address account) internal { Impl.allow(euint${bits}.unwrap(value), account); } + + function allowThis(euint${bits} value) internal { + Impl.allow(euint${bits}.unwrap(value), address(this)); + } \n`, ), ); @@ -729,9 +737,17 @@ function tfheAclMethods(supportedBits: number[]): string { Impl.allow(eaddress.unwrap(value), account); } + function allowThis(eaddress value) internal { + Impl.allow(eaddress.unwrap(value), address(this)); + } + function allow(ebytes256 value, address account) internal { Impl.allow(ebytes256.unwrap(value), account); } + + function allowThis(ebytes256 value) internal { + Impl.allow(ebytes256.unwrap(value), address(this)); + } `, ); @@ -986,7 +1002,11 @@ function implCustomMethods(ctx: CodegenContext): string { } export function paymentSol(): string { - const res: string = `import "../lib/FHEPaymentAddress.sol"; + const res: string = `// SPDX-License-Identifier: BSD-3-Clause-Clear + +pragma solidity ^0.8.24; + +import "../lib/FHEPaymentAddress.sol"; interface IFHEPayment { function depositETH(address account) external payable; diff --git a/codegen/testgen.ts b/codegen/testgen.ts index eb9d42e7..a07fa6dd 100644 --- a/codegen/testgen.ts +++ b/codegen/testgen.ts @@ -297,7 +297,7 @@ function generateLibCallTest(os: OverloadShard, res: string[]) { res.push(`${functionTypeToEncryptedType(o.returnType)} result = TFHE.${o.name}(${tfheArgs});`); res.push('\n'); } - res.push('TFHE.allow(result, address(this));'); + res.push('TFHE.allowThis(result);'); res.push(`${stateVar[functionTypeToEncryptedType(o.returnType) as keyof typeof stateVar]} = result; } `); diff --git a/docs/fundamentals/acl.md b/docs/fundamentals/acl.md index 12afacaf..266d9525 100644 --- a/docs/fundamentals/acl.md +++ b/docs/fundamentals/acl.md @@ -2,13 +2,15 @@ ## How it works? -fhEVM includes an Access Control List (ACL) system that allows you to define which addresses have the right to manipulate a ciphertext. This feature prevents any address from accessing the contents of any ciphertext. +fhEVM includes an Access Control List (ACL) system that allows you to define which addresses have the right to manipulate a ciphertext. This feature prevents any address from accessing the contents of unauthorized ciphertexts. These ACLs can be adjusted in two ways: - `TFHE.allow(ciphertext, address)` Permanently, on the blockchain. This allows a ciphertext to be used by a specific address at any time. - `TFHE.allowTransient(ciphertext, address)` Temporarily. The ciphertext is then authorized only for the duration of the transaction. +Note that you can also use: `TFHE.allowThis(ciphertext)` which is just syntactic sugar instead of `TFHE.allow(ciphertext, address(this))`. This function is commonly used inside a dApp smart contract, in order to authorize the same contract to reuse a new `ciphertext` handle which has just been computed in a future transaction. + Permanent allowance will store the ACL in a dedicated contract, while a temporary allowance will store it in [transient storage](https://eips.ethereum.org/EIPS/eip-1153), allowing developers to save gas. Transient allowance is particularly useful when calling an external function using a ciphertext as a parameter. To illustrate, here is a simple example where one function calls another: @@ -49,18 +51,18 @@ contract SecretStore { secretResult = computationResult; // Make the temporary allowance for this ciphertext permanent to let the contract able to reuse it at a later stage or request a decryption of it - TFHE.allow(secretResult, address(this)); + TFHE.allowThis(secretResult); // this is strictly equivalent to `TFHE.allow(secretResult, address(this));`` } } ``` ## Automatic (transient) allowance -To simplify matters, a number of functions automatically generate temporary access (using `TFHE.allowTransient`) for the contract that calls the function. This applies to: +To simplify matters, a number of functions automatically generate temporary access (using `TFHE.allowTransient` under the hood) for the contract that calls the function. This applies to: - `TFHE.asEuintXX()`, `TFHE.asEaddress()`, `TFHE.asEbool()` - `TFHE.randXX()` -- All results from computation (`TFHE.add()`, `TFHE.select()`, ...) +- All results from computations (`TFHE.add()`, `TFHE.select()`, ...) ```solidity function randomize() { @@ -68,7 +70,7 @@ function randomize() { random = TFHE.randEuint64(); // Permanently store the temporary access for this ciphertext. - TFHE.allow(random, address(this)); + TFHE.allowThis(random); } ``` @@ -91,13 +93,13 @@ function transfer(address to, euint64 encryptedAmount) public { euint64 newBalanceTo = TFHE.add(balances[to], TFHE.select(canTransfer, amount, TFHE.asEuint64(0))); balances[to] = newBalanceTo; // Allow this new balance for both the contract and the owner. - TFHE.allow(newBalanceTo, address(this)); + TFHE.allowThis(newBalanceTo); TFHE.allow(newBalanceTo, to); euint64 newBalanceFrom = TFHE.sub(balances[from], TFHE.select(canTransfer, amount, TFHE.asEuint64(0))); balances[from] = newBalanceFrom; // Allow this new balance for both the contract and the owner. - TFHE.allow(newBalanceFrom, address(this)); + TFHE.allowThis(newBalanceFrom); TFHE.allow(newBalanceFrom, from); } ``` diff --git a/docs/fundamentals/types/conditions.md b/docs/fundamentals/types/conditions.md index 0ae0d315..513d28b8 100644 --- a/docs/fundamentals/types/conditions.md +++ b/docs/fundamentals/types/conditions.md @@ -14,7 +14,7 @@ function bid(einput encryptedValue, bytes calldata inputProof) public onlyBefore // Replace highest bid highestBid = TFHE.select(isAbove, bid, highestBid); - TFHE.allow(highestBid, address(this)); + TFHE.allowThis(highestBid); } ``` @@ -52,11 +52,11 @@ function _transfer(address from, address to, euint32 amount) internal { // Add to the balance of `to` and subract from the balance of `from`. balances[to] = TFHE.add(balances[to], TFHE.select(canTransfer, amount, TFHE.asEuint32(0))); - TFHE.allow(balances[to], address(this)); + TFHE.allowThis(balances[to]); TFHE.allow(balances[to], to); balances[from] = TFHE.sub(balances[from], TFHE.select(canTransfer, amount, TFHE.asEuint32(0))); - TFHE.allow(balances[from], address(this)); + TFHE.allowThis(balances[from]); TFHE.allow(balances[from], from); } ``` diff --git a/docs/guides/decrypt.md b/docs/guides/decrypt.md index 991432ce..6d3c3153 100644 --- a/docs/guides/decrypt.md +++ b/docs/guides/decrypt.md @@ -14,7 +14,7 @@ contract TestAsyncDecrypt is GatewayCaller { constructor() { xBool = TFHE.asEbool(true); - TFHE.allow(xBool, address(this)); + TFHE.allowThis(xBool); } function requestBool() public { @@ -138,7 +138,7 @@ contract TestAsyncDecrypt is GatewayCaller { constructor() { xUint32 = TFHE.asEuint32(32); - TFHE.allow(xUint32, address(this)); + TFHE.allowThis(xUint32); } function requestUint32(uint32 input1, uint32 input2) public { diff --git a/docs/guides/pitfalls.md b/docs/guides/pitfalls.md index 97390025..29e562c2 100644 --- a/docs/guides/pitfalls.md +++ b/docs/guides/pitfalls.md @@ -15,7 +15,7 @@ contract C { constructor(uint32 _b) { b = TFHE.asEuint32(_b); - TFHE.allow(b, address(this)); + TFHE.allowThis(b); } } ``` @@ -29,7 +29,7 @@ contract C { constructor(uint32 _b) { b = TFHE.asEuint32(_b); - TFHE.allow(b, address(this)); + TFHE.allowThis(b); } } ``` @@ -94,7 +94,7 @@ function setXwithEncryptedIndex(einput encryptedIndex, bytes calldata inputProof ebool isEqual = TFHE.eq(index, i); x = TFHE.select(isEqual, encArray[i], x); } - TFHE.allow(x, address(this)); + TFHE.allowThis(x); } ``` @@ -131,7 +131,7 @@ function mint(einput encryptedAmount, bytes calldata inputProof) public { euint32 mintedAmount = TFHE.asEuint32(encryptedAmount, inputProof); totalSupply = TFHE.add(totalSupply, mintedAmount); balances[msg.sender] = TFHE.add(balances[msg.sender], mintedAmount); - TFHE.allow(balances[msg.sender], address(this)); + TFHE.allowThis(balances[msg.sender]); TFHE.allow(balances[msg.sender], msg.sender); } ``` @@ -146,7 +146,7 @@ function mint(einput encryptedAmount, bytes calldata inputProof) public { totalSupply = TFHE.select(isOverflow, totalSupply, tempTotalSupply); euint32 tempBalanceOf = TFHE.add(balances[msg.sender], mintedAmount); balances[msg.sender] = TFHE.select(isOverflow, balances[msg.sender], tempBalanceOf); - TFHE.allow(balances[msg.sender], address(this)); + TFHE.allowThis(balances[msg.sender]); TFHE.allow(balances[msg.sender], msg.sender); } ``` diff --git a/docs/references/functions.md b/docs/references/functions.md index 82459326..cf0c3303 100644 --- a/docs/references/functions.md +++ b/docs/references/functions.md @@ -180,7 +180,7 @@ Allow an address to use a ciphertext, which includes computation, decryption, an // Store a value in the contract. r = TFHE.asEuint32(94); // Set the contract as allowed for this ciphertext. -TFHE.allow(r, address(this)); +TFHE.allowThis(r); // Also set the caller as allowed for this ciphertext. TFHE.allow(r, msg.sender); ``` diff --git a/examples/BlindAuction.sol b/examples/BlindAuction.sol index cbf7efda..d90f9cc8 100644 --- a/examples/BlindAuction.sol +++ b/examples/BlindAuction.sol @@ -62,7 +62,7 @@ contract BlindAuction is Ownable2Step, GatewayCaller { tokenContract = _tokenContract; endTime = block.timestamp + biddingTime; objectClaimed = TFHE.asEbool(false); - TFHE.allow(objectClaimed, address(this)); + TFHE.allowThis(objectClaimed); tokenTransferred = false; bidCounter = 0; stoppable = isStoppable; @@ -97,7 +97,7 @@ contract BlindAuction is Ownable2Step, GatewayCaller { bids[msg.sender] = sentBalance; } euint64 currentBid = bids[msg.sender]; - TFHE.allow(currentBid, address(this)); + TFHE.allowThis(currentBid); TFHE.allow(currentBid, msg.sender); euint64 randTicket = TFHE.randEuint64(); @@ -117,8 +117,8 @@ contract BlindAuction is Ownable2Step, GatewayCaller { highestBid = TFHE.select(isNewWinner, currentBid, highestBid); winningTicket = TFHE.select(isNewWinner, userTicket, winningTicket); } - TFHE.allow(highestBid, address(this)); - TFHE.allow(winningTicket, address(this)); + TFHE.allowThis(highestBid); + TFHE.allowThis(winningTicket); TFHE.allow(userTicket, msg.sender); } @@ -158,10 +158,10 @@ contract BlindAuction is Ownable2Step, GatewayCaller { function claim() public onlyAfterEnd { ebool canClaim = TFHE.and(TFHE.eq(winningTicket, userTickets[msg.sender]), TFHE.not(objectClaimed)); objectClaimed = TFHE.or(canClaim, objectClaimed); - TFHE.allow(objectClaimed, address(this)); + TFHE.allowThis(objectClaimed); euint64 newBid = TFHE.select(canClaim, TFHE.asEuint64(0), bids[msg.sender]); bids[msg.sender] = newBid; - TFHE.allow(bids[msg.sender], address(this)); + TFHE.allowThis(bids[msg.sender]); TFHE.allow(bids[msg.sender], msg.sender); } @@ -182,7 +182,7 @@ contract BlindAuction is Ownable2Step, GatewayCaller { tokenContract.transfer(msg.sender, amount); euint64 newBid = TFHE.select(canWithdraw, TFHE.asEuint64(0), bids[msg.sender]); bids[msg.sender] = newBid; - TFHE.allow(newBid, address(this)); + TFHE.allowThis(newBid); TFHE.allow(newBid, msg.sender); } diff --git a/examples/EncryptedERC20.sol b/examples/EncryptedERC20.sol index 4774e1d0..575ae185 100644 --- a/examples/EncryptedERC20.sol +++ b/examples/EncryptedERC20.sol @@ -46,7 +46,7 @@ contract EncryptedERC20 is Ownable2Step { // Sets the balance of the owner to the given encrypted balance. function mint(uint64 mintedAmount) public virtual onlyOwner { balances[owner()] = TFHE.add(balances[owner()], mintedAmount); // overflow impossible because of next line - TFHE.allow(balances[owner()], address(this)); + TFHE.allowThis(balances[owner()]); TFHE.allow(balances[owner()], owner()); _totalSupply = _totalSupply + mintedAmount; emit Mint(owner(), mintedAmount); @@ -115,7 +115,7 @@ contract EncryptedERC20 is Ownable2Step { function _approve(address owner, address spender, euint64 amount) internal virtual { allowances[owner][spender] = amount; - TFHE.allow(amount, address(this)); + TFHE.allowThis(amount); TFHE.allow(amount, owner); TFHE.allow(amount, spender); } @@ -141,11 +141,11 @@ contract EncryptedERC20 is Ownable2Step { euint64 transferValue = TFHE.select(isTransferable, amount, TFHE.asEuint64(0)); euint64 newBalanceTo = TFHE.add(balances[to], transferValue); balances[to] = newBalanceTo; - TFHE.allow(newBalanceTo, address(this)); + TFHE.allowThis(newBalanceTo); TFHE.allow(newBalanceTo, to); euint64 newBalanceFrom = TFHE.sub(balances[from], transferValue); balances[from] = newBalanceFrom; - TFHE.allow(newBalanceFrom, address(this)); + TFHE.allowThis(newBalanceFrom); TFHE.allow(newBalanceFrom, from); emit Transfer(from, to); } diff --git a/examples/Rand.sol b/examples/Rand.sol index 6434af82..fb5cce5c 100644 --- a/examples/Rand.sol +++ b/examples/Rand.sol @@ -18,53 +18,53 @@ contract Rand { function generate8() public { value8 = TFHE.randEuint8(); - TFHE.allow(value8, address(this)); + TFHE.allowThis(value8); } function generate8UpperBound(uint8 upperBound) public { value8 = TFHE.randEuint8(upperBound); - TFHE.allow(value8, address(this)); + TFHE.allowThis(value8); } function generate16() public { value16 = TFHE.randEuint16(); - TFHE.allow(value16, address(this)); + TFHE.allowThis(value16); } function generate16UpperBound(uint16 upperBound) public { value16 = TFHE.randEuint16(upperBound); - TFHE.allow(value16, address(this)); + TFHE.allowThis(value16); } function generate32() public { value32 = TFHE.randEuint32(); - TFHE.allow(value32, address(this)); + TFHE.allowThis(value32); } function generate32UpperBound(uint32 upperBound) public { value32 = TFHE.randEuint32(upperBound); - TFHE.allow(value32, address(this)); + TFHE.allowThis(value32); } function generate64() public { value64 = TFHE.randEuint64(); - TFHE.allow(value64, address(this)); + TFHE.allowThis(value64); } function generate64UpperBound(uint32 upperBound) public { value64 = TFHE.randEuint64(upperBound); - TFHE.allow(value64, address(this)); + TFHE.allowThis(value64); } function generate64Reverting() public { try this.failingCall() {} catch {} value64Bounded = TFHE.randEuint64(1024); - TFHE.allow(value64Bounded, address(this)); + TFHE.allowThis(value64Bounded); } function failingCall() public { value64 = TFHE.randEuint64(); - TFHE.allow(value64, address(this)); + TFHE.allowThis(value64); revert(); } } diff --git a/examples/Reencrypt.sol b/examples/Reencrypt.sol index 93356267..1976da5f 100644 --- a/examples/Reencrypt.sol +++ b/examples/Reencrypt.sol @@ -19,37 +19,37 @@ contract Reencrypt { Payment.depositForThis(msg.value); xBool = TFHE.asEbool(true); - TFHE.allow(xBool, address(this)); + TFHE.allowThis(xBool); TFHE.allow(xBool, msg.sender); xUint4 = TFHE.asEuint4(4); - TFHE.allow(xUint4, address(this)); + TFHE.allowThis(xUint4); TFHE.allow(xUint4, msg.sender); xUint8 = TFHE.asEuint8(42); - TFHE.allow(xUint8, address(this)); + TFHE.allowThis(xUint8); TFHE.allow(xUint8, msg.sender); xUint16 = TFHE.asEuint16(16); - TFHE.allow(xUint16, address(this)); + TFHE.allowThis(xUint16); TFHE.allow(xUint16, msg.sender); xUint32 = TFHE.asEuint32(32); - TFHE.allow(xUint32, address(this)); + TFHE.allowThis(xUint32); TFHE.allow(xUint32, msg.sender); xUint64 = TFHE.asEuint64(18446744073709551600); - TFHE.allow(xUint64, address(this)); + TFHE.allowThis(xUint64); TFHE.allow(xUint64, msg.sender); xAddress = TFHE.asEaddress(0x8ba1f109551bD432803012645Ac136ddd64DBA72); - TFHE.allow(xAddress, address(this)); + TFHE.allowThis(xAddress); TFHE.allow(xAddress, msg.sender); } function setEBytes256(einput inputHandleEBytes256, bytes memory inputProofEBytes256) external { yBytes256 = TFHE.asEbytes256(inputHandleEBytes256, inputProofEBytes256); - TFHE.allow(yBytes256, address(this)); + TFHE.allowThis(yBytes256); TFHE.allow(yBytes256, msg.sender); } } diff --git a/examples/tests/TFHEManualTestSuite.sol b/examples/tests/TFHEManualTestSuite.sol index 6d6639ba..b8cbca8b 100644 --- a/examples/tests/TFHEManualTestSuite.sol +++ b/examples/tests/TFHEManualTestSuite.sol @@ -21,7 +21,7 @@ contract TFHEManualTestSuite { ebytes256 input1 = TFHE.asEbytes256(inp1, inputProof1); ebytes256 input2 = TFHE.asEbytes256(inp2, inputProof2); ebool result = TFHE.eq(input1, input2); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } @@ -29,7 +29,7 @@ contract TFHEManualTestSuite { ebytes256 input1 = TFHE.asEbytes256(inp1, inputProof1); ebytes256 input2 = TFHE.asEbytes256(inp2, inputProof2); ebool result = TFHE.ne(input1, input2); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } @@ -38,7 +38,7 @@ contract TFHEManualTestSuite { euint32 ifTrueProc = TFHE.asEuint32(ifTrue, inputProof); euint32 ifFalseProc = TFHE.asEuint32(ifFalse, inputProof); euint32 result = TFHE.select(controlProc, ifTrueProc, ifFalseProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } @@ -47,7 +47,7 @@ contract TFHEManualTestSuite { eaddress ifTrueProc = TFHE.asEaddress(ifTrue, inputProof); eaddress ifFalseProc = TFHE.asEaddress(ifFalse, inputProof); eaddress result = TFHE.select(controlProc, ifTrueProc, ifFalseProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resAdd = result; } @@ -55,7 +55,7 @@ contract TFHEManualTestSuite { eaddress aProc = TFHE.asEaddress(a, inputProof); eaddress bProc = TFHE.asEaddress(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } @@ -63,35 +63,35 @@ contract TFHEManualTestSuite { eaddress aProc = TFHE.asEaddress(a, inputProof); eaddress bProc = TFHE.asEaddress(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function test_eq_eaddress_address(einput a, address b, bytes calldata inputProof) public { eaddress aProc = TFHE.asEaddress(a, inputProof); ebool result = TFHE.eq(aProc, b); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function test_eq_address_eaddress(einput a, address b, bytes calldata inputProof) public { eaddress aProc = TFHE.asEaddress(a, inputProof); ebool result = TFHE.eq(b, aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function test_ne_eaddress_address(einput a, address b, bytes calldata inputProof) public { eaddress aProc = TFHE.asEaddress(a, inputProof); ebool result = TFHE.ne(aProc, b); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function test_ne_address_eaddress(einput a, address b, bytes calldata inputProof) public { eaddress aProc = TFHE.asEaddress(a, inputProof); ebool result = TFHE.ne(b, aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } diff --git a/examples/tests/TFHETestSuite1.sol b/examples/tests/TFHETestSuite1.sol index 3e770558..741ca334 100644 --- a/examples/tests/TFHETestSuite1.sol +++ b/examples/tests/TFHETestSuite1.sol @@ -20,700 +20,700 @@ contract TFHETestSuite1 { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function sub_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function mul_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function and_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function or_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function xor_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function eq_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function max_euint4_euint4(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function add_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function sub_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function mul_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function and_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function or_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function xor_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function eq_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function max_euint4_euint8(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function add_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function and_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function or_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function xor_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint4_euint16(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint4_euint32(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint4_euint64(einput a, einput b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function add_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function sub_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function sub_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function mul_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function mul_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function div_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.div(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function rem_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.rem(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function eq_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function eq_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function min_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function max_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function max_uint8_euint4(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint4 bProc = TFHE.asEuint4(b, inputProof); euint4 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function add_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function sub_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function mul_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function and_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function or_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function xor_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } } diff --git a/examples/tests/TFHETestSuite2.sol b/examples/tests/TFHETestSuite2.sol index 08d390cc..4956eba1 100644 --- a/examples/tests/TFHETestSuite2.sol +++ b/examples/tests/TFHETestSuite2.sol @@ -20,700 +20,700 @@ contract TFHETestSuite2 { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function max_euint8_euint4(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint8 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function add_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function sub_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function mul_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function and_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function or_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function xor_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function eq_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function max_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function add_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function and_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function or_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function xor_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint8_euint16(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint8_euint32(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint8_euint64(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function add_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function sub_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function sub_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function mul_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function mul_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function div_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.div(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function rem_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.rem(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function eq_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function eq_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function min_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function max_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function max_uint8_euint8(uint8 a, einput b, bytes calldata inputProof) public { uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function add_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function and_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function or_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function xor_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } } diff --git a/examples/tests/TFHETestSuite3.sol b/examples/tests/TFHETestSuite3.sol index 7ae3649b..1b5da24f 100644 --- a/examples/tests/TFHETestSuite3.sol +++ b/examples/tests/TFHETestSuite3.sol @@ -20,700 +20,700 @@ contract TFHETestSuite3 { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint16_euint4(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function and_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function or_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function xor_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function and_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function or_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function xor_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint16_euint16(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint16_euint32(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint16_euint64(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function sub_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function mul_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function div_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.div(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function rem_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.rem(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function eq_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function eq_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function min_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_euint16_uint16(einput a, uint16 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint16 bProc = b; euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function max_uint16_euint16(uint16 a, einput b, bytes calldata inputProof) public { uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b, inputProof); euint16 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function add_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint32_euint4(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } } diff --git a/examples/tests/TFHETestSuite4.sol b/examples/tests/TFHETestSuite4.sol index 13e361f3..27362514 100644 --- a/examples/tests/TFHETestSuite4.sol +++ b/examples/tests/TFHETestSuite4.sol @@ -20,700 +20,700 @@ contract TFHETestSuite4 { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint32_euint16(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function and_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function or_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function xor_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint32_euint32(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint32_euint64(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function sub_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function mul_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function div_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.div(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function rem_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.rem(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function eq_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function eq_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function min_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_euint32_uint32(einput a, uint32 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint32 bProc = b; euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function max_uint32_euint32(uint32 a, einput b, bytes calldata inputProof) public { uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b, inputProof); euint32 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function add_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_euint4(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint4 bProc = TFHE.asEuint4(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } } diff --git a/examples/tests/TFHETestSuite5.sol b/examples/tests/TFHETestSuite5.sol index 6d087ad5..73c9815e 100644 --- a/examples/tests/TFHETestSuite5.sol +++ b/examples/tests/TFHETestSuite5.sol @@ -20,700 +20,700 @@ contract TFHETestSuite5 { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_euint16(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint16 bProc = TFHE.asEuint16(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_euint32(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint32 bProc = TFHE.asEuint32(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function and_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.and(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function or_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.or(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function xor_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.xor(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_euint64(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function add_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.add(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function sub_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.sub(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function mul_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.mul(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function div_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.div(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function rem_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.rem(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function eq_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function eq_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.eq(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ne_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ne(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function ge_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.ge(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function gt_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.gt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function le_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.le(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function lt_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); ebool result = TFHE.lt(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); resb = result; } function min_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function min_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.min(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_euint64_uint64(einput a, uint64 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint64 bProc = b; euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function max_uint64_euint64(uint64 a, einput b, bytes calldata inputProof) public { uint64 aProc = a; euint64 bProc = TFHE.asEuint64(b, inputProof); euint64 result = TFHE.max(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function shl_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function shr_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function rotl_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function rotr_euint4_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); uint8 bProc = b; euint4 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function shl_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function shl_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function shr_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function shr_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function rotl_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function rotl_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function rotr_euint8_euint8(einput a, einput b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint8 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function rotr_euint8_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); uint8 bProc = b; euint8 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function shl_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function shl_euint16_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint8 bProc = b; euint16 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function shr_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function shr_euint16_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint8 bProc = b; euint16 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function rotl_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function rotl_euint16_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint8 bProc = b; euint16 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function rotr_euint16_euint8(einput a, einput b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint16 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function rotr_euint16_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); uint8 bProc = b; euint16 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function shl_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function shl_euint32_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint8 bProc = b; euint32 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function shr_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function shr_euint32_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint8 bProc = b; euint32 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function rotl_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function rotl_euint32_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint8 bProc = b; euint32 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function rotr_euint32_euint8(einput a, einput b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint32 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function rotr_euint32_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); uint8 bProc = b; euint32 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function shl_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function shl_euint64_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint8 bProc = b; euint64 result = TFHE.shl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } } diff --git a/examples/tests/TFHETestSuite6.sol b/examples/tests/TFHETestSuite6.sol index 3eb669c6..41f90758 100644 --- a/examples/tests/TFHETestSuite6.sol +++ b/examples/tests/TFHETestSuite6.sol @@ -20,102 +20,102 @@ contract TFHETestSuite6 { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function shr_euint64_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint8 bProc = b; euint64 result = TFHE.shr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function rotl_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function rotl_euint64_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint8 bProc = b; euint64 result = TFHE.rotl(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function rotr_euint64_euint8(einput a, einput b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint8 bProc = TFHE.asEuint8(b, inputProof); euint64 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function rotr_euint64_uint8(einput a, uint8 b, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); uint8 bProc = b; euint64 result = TFHE.rotr(aProc, bProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function neg_euint4(einput a, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 result = TFHE.neg(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function not_euint4(einput a, bytes calldata inputProof) public { euint4 aProc = TFHE.asEuint4(a, inputProof); euint4 result = TFHE.not(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res4 = result; } function neg_euint8(einput a, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 result = TFHE.neg(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function not_euint8(einput a, bytes calldata inputProof) public { euint8 aProc = TFHE.asEuint8(a, inputProof); euint8 result = TFHE.not(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res8 = result; } function neg_euint16(einput a, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 result = TFHE.neg(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function not_euint16(einput a, bytes calldata inputProof) public { euint16 aProc = TFHE.asEuint16(a, inputProof); euint16 result = TFHE.not(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res16 = result; } function neg_euint32(einput a, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 result = TFHE.neg(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function not_euint32(einput a, bytes calldata inputProof) public { euint32 aProc = TFHE.asEuint32(a, inputProof); euint32 result = TFHE.not(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res32 = result; } function neg_euint64(einput a, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 result = TFHE.neg(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } function not_euint64(einput a, bytes calldata inputProof) public { euint64 aProc = TFHE.asEuint64(a, inputProof); euint64 result = TFHE.not(aProc); - TFHE.allow(result, address(this)); + TFHE.allowThis(result); res64 = result; } } diff --git a/lib/TFHE.sol b/lib/TFHE.sol index 05e74dc1..4f7a7f13 100644 --- a/lib/TFHE.sol +++ b/lib/TFHE.sol @@ -5744,34 +5744,66 @@ library TFHE { Impl.allow(ebool.unwrap(value), account); } + function allowThis(ebool value) internal { + Impl.allow(ebool.unwrap(value), address(this)); + } + function allow(euint4 value, address account) internal { Impl.allow(euint4.unwrap(value), account); } + function allowThis(euint4 value) internal { + Impl.allow(euint4.unwrap(value), address(this)); + } + function allow(euint8 value, address account) internal { Impl.allow(euint8.unwrap(value), account); } + function allowThis(euint8 value) internal { + Impl.allow(euint8.unwrap(value), address(this)); + } + function allow(euint16 value, address account) internal { Impl.allow(euint16.unwrap(value), account); } + function allowThis(euint16 value) internal { + Impl.allow(euint16.unwrap(value), address(this)); + } + function allow(euint32 value, address account) internal { Impl.allow(euint32.unwrap(value), account); } + function allowThis(euint32 value) internal { + Impl.allow(euint32.unwrap(value), address(this)); + } + function allow(euint64 value, address account) internal { Impl.allow(euint64.unwrap(value), account); } + function allowThis(euint64 value) internal { + Impl.allow(euint64.unwrap(value), address(this)); + } + function allow(eaddress value, address account) internal { Impl.allow(eaddress.unwrap(value), account); } + function allowThis(eaddress value) internal { + Impl.allow(eaddress.unwrap(value), address(this)); + } + function allow(ebytes256 value, address account) internal { Impl.allow(ebytes256.unwrap(value), account); } + function allowThis(ebytes256 value) internal { + Impl.allow(ebytes256.unwrap(value), address(this)); + } + function allowTransient(ebool value, address account) internal { Impl.allowTransient(ebool.unwrap(value), account); } diff --git a/payment/Payment.sol b/payment/Payment.sol index 8573497f..0197a5a6 100644 --- a/payment/Payment.sol +++ b/payment/Payment.sol @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause-Clear + +pragma solidity ^0.8.24; + import "../lib/FHEPaymentAddress.sol"; interface IFHEPayment {