// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; type gtBool is uint256; type gtInt8 is uint256; type gtUint8 is uint256; type gtInt16 is uint256; type gtUint16 is uint256; type gtInt32 is uint256; type gtUint32 is uint256; type gtInt64 is uint256; type gtUint64 is uint256; // we use a struct because user-defined value types can only be elementary value types // 8 characters (in byte form) per cell and the final cell padded with zeroes if needed struct gtString { gtUint64[] value; } type gtUint128 is uint256; type gtInt128 is uint256; type gtUint256 is uint256; type gtInt256 is uint256; type ctBool is uint256; type ctInt8 is uint256; type ctUint8 is uint256; type ctInt16 is uint256; type ctUint16 is uint256; type ctInt32 is uint256; type ctUint32 is uint256; type ctInt64 is uint256; type ctUint64 is uint256; // we use a struct because user-defined value types can only be elementary value types // 8 characters (in byte form) per cell and the final cell padded with zeroes if needed struct ctString { ctUint64[] value; } type ctUint128 is uint256; type ctInt128 is uint256; struct ctInt256 { ctInt128 ciphertextHigh; ctInt128 ciphertextLow; } struct ctUint256 { ctUint128 ciphertextHigh; ctUint128 ciphertextLow; } struct itBool { ctBool ciphertext; bytes signature; } struct itInt8 { ctInt8 ciphertext; bytes signature; } struct itUint8 { ctUint8 ciphertext; bytes signature; } struct itInt16 { ctInt16 ciphertext; bytes signature; } struct itUint16 { ctUint16 ciphertext; bytes signature; } struct itInt32 { ctInt32 ciphertext; bytes signature; } struct itUint32 { ctUint32 ciphertext; bytes signature; } struct itInt64 { ctInt64 ciphertext; bytes signature; } struct itUint64 { ctUint64 ciphertext; bytes signature; } struct itString { ctString ciphertext; bytes[] signature; } struct itUint128 { ctUint128 ciphertext; bytes signature; } struct itInt128 { ctInt128 ciphertext; bytes signature; } struct itUint256 { ctUint256 ciphertext; bytes signature; } struct itInt256 { ctInt256 ciphertext; bytes signature; } struct utBool { ctBool ciphertext; ctBool userCiphertext; } struct utInt8 { ctInt8 ciphertext; ctInt8 userCiphertext; } struct utUint8 { ctUint8 ciphertext; ctUint8 userCiphertext; } struct utInt16 { ctInt16 ciphertext; ctInt16 userCiphertext; } struct utUint16 { ctUint16 ciphertext; ctUint16 userCiphertext; } struct utInt32 { ctInt32 ciphertext; ctInt32 userCiphertext; } struct utUint32 { ctUint32 ciphertext; ctUint32 userCiphertext; } struct utInt64 { ctInt64 ciphertext; ctInt64 userCiphertext; } struct utUint64 { ctUint64 ciphertext; ctUint64 userCiphertext; } struct utInt128 { ctInt128 ciphertext; ctInt128 userCiphertext; } struct utUint128 { ctUint128 ciphertext; ctUint128 userCiphertext; } struct utInt256 { ctInt256 ciphertext; ctInt256 userCiphertext; } struct utUint256 { ctUint256 ciphertext; ctUint256 userCiphertext; } struct utString { ctString ciphertext; ctString userCiphertext; } import "./MpcInterface.sol"; library MpcCore { enum MPC_TYPE {SBOOL_T , SUINT8_T , SUINT16_T, SUINT32_T ,SUINT64_T , SUINT128_T, SUINT256_T } enum ARGS {BOTH_SECRET , LHS_PUBLIC, RHS_PUBLIC } uint public constant RSA_SIZE = 256; function combineEnumsToBytes2(MPC_TYPE mpcType, ARGS argsType) internal pure returns (bytes2) { return bytes2(uint16(mpcType) << 8 | uint8(argsType)); } function combineEnumsToBytes3(MPC_TYPE mpcType1, MPC_TYPE mpcType2, ARGS argsType) internal pure returns (bytes3) { return bytes3(uint24(mpcType1) << 16 | uint16(mpcType2) << 8 | uint8(argsType)); } function combineEnumsToBytes4(MPC_TYPE mpcType1, MPC_TYPE mpcType2, MPC_TYPE mpcType3, ARGS argsType) internal pure returns (bytes4) { return bytes4(uint32(mpcType1) << 24 | uint24(mpcType2) << 16 | uint16(mpcType3) << 8 | uint8(argsType)); } function combineEnumsToBytes5(MPC_TYPE mpcType1, MPC_TYPE mpcType2, MPC_TYPE mpcType3, MPC_TYPE mpcType4, ARGS argsType) internal pure returns (bytes5) { return bytes5(uint40(mpcType1) << 32 | uint32(mpcType2) << 24 | uint24(mpcType3) << 16 | uint16(mpcType4) << 8 | uint8(argsType)); } function checkOverflow(gtBool bit) private { // To revert on overflow, the require statement must fail when the overflow bit is set. // Naturally, we would check that the overflow bit is 0. // However, directly requiring the bit to be 0 causes gas estimation to fail, as it always returns 1. // To handle this, we apply a NOT operation to the bit and require the result to be 1. // // Summary of all cases: // 1. **Overflow scenario**: The overflow bit is 1 → NOT operation returns 0 → require fails → transaction reverts. // 2. **No overflow**: The overflow bit is 0 → NOT operation returns 1 → require passes → transaction proceeds. // 3. **Gas estimation**: Decrypt always returns 1 during gas estimation → require passes → no impact on actual execution. gtBool notBit = not(bit); // revert on overflow require(decrypt(notBit) == true, "overflow error"); } function checkRes8(gtBool bit, gtUint8 res) private returns (gtUint8) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function checkRes16(gtBool bit, gtUint16 res) private returns (gtUint16) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function checkRes32(gtBool bit, gtUint32 res) private returns (gtUint32) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function checkRes64(gtBool bit, gtUint64 res) private returns (gtUint64) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function checkRes128(gtBool bit, gtUint128 res) private returns (gtUint128) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function checkRes256(gtBool bit, gtUint256 res) private returns (gtUint256) { // revert on overflow checkOverflow(bit); // return the output if there is no overflow return res; } function getUserKey(bytes calldata signedEK, bytes calldata signature) internal returns (bytes memory keyShare0, bytes memory keyShare1) { bytes memory combined = new bytes(signature.length + signedEK.length); // Copy contents of signature into combined for (uint i = 0; i < signature.length; i++) { combined[i] = signature[i]; } // Copy contents of _bytes2 into combined after _bytes1 for (uint j = 0; j < signedEK.length; j++) { combined[signature.length + j] = signedEK[j]; } bytes memory bothKeys = ExtendedOperations(address(MPC_PRECOMPILE)).GetUserKey(combined); bytes memory share0 = new bytes(RSA_SIZE); bytes memory share1 = new bytes(RSA_SIZE); // Copy the first key to the first share array for (uint i = 0; i < share0.length; i++) { share0[i] = bothKeys[i]; } // Copy the second key to the second share array for (uint i = 0; i < share1.length; i++) { share1[i] = bothKeys[i + RSA_SIZE]; } return (share0, share1); } function SHA256Fixed432BitInput(gtUint64 amount, gtUint64 seed1, gtUint64 seed2, address addr, uint64 padding1, uint16 padding2) internal returns (bytes memory result){ return ExtendedOperations(address(MPC_PRECOMPILE)).SHA256Fixed432BitInput(gtUint64.unwrap(amount), gtUint64.unwrap(seed1), gtUint64.unwrap(seed2), uint256(padding1), uint256(padding2), abi.encodePacked(addr)); } // =========== 1 bit operations ============== function validateCiphertext(itBool memory input) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SBOOL_T)), ctBool.unwrap(input.ciphertext), input.signature)); } function onBoard(ctBool ct) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SBOOL_T)), ctBool.unwrap(ct))); } function offBoard(gtBool pt) internal returns (ctBool) { return ctBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SBOOL_T)), gtBool.unwrap(pt))); } function offBoardToUser(gtBool pt, address addr) internal returns (ctBool) { return ctBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SBOOL_T)), gtBool.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtBool pt, address addr) internal returns (utBool memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic(bool pt) internal returns (gtBool) { uint256 temp; temp = pt ? 1 : 0; return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SBOOL_T)), temp)); } function rand() internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SBOOL_T)))); } function and(gtBool a, gtBool b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(a), gtBool.unwrap(b))); } function or(gtBool a, gtBool b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(a), gtBool.unwrap(b))); } function xor(gtBool a, gtBool b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(a), gtBool.unwrap(b))); } function eq(gtBool a, gtBool b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(a), gtBool.unwrap(b))); } function ne(gtBool a, gtBool b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(a), gtBool.unwrap(b))); } function decrypt(gtBool ct) internal returns (bool){ uint256 temp = ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SBOOL_T)), gtBool.unwrap(ct)); return temp != 0; } function mux(gtBool bit, gtBool a, gtBool b) internal returns (gtBool){ return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SBOOL_T, MPC_TYPE.SBOOL_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtBool.unwrap(a), gtBool.unwrap(b))); } function not(gtBool a) internal returns (gtBool){ return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Not(bytes1(uint8(MPC_TYPE.SBOOL_T)), gtBool.unwrap(a))); } // =========== Operations with BOTH_SECRET parameter =========== // =========== 8 bit operations ============== function validateCiphertext(itUint8 memory input) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT8_T)), ctUint8.unwrap(input.ciphertext), input.signature)); } function onBoard(ctUint8 ct) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT8_T)), ctUint8.unwrap(ct))); } function offBoard(gtUint8 pt) internal returns (ctUint8) { return ctUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtUint8.unwrap(pt))); } function offBoardToUser(gtUint8 pt, address addr) internal returns (ctUint8) { return ctUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtUint8.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtUint8 pt, address addr) internal returns (utUint8 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic8(uint8 pt) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT8_T)), uint256(pt))); } function rand8() internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT8_T)))); } function randBoundedBits8(uint8 numBits) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT8_T)), numBits)); } function add(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function sub(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function checkedSub(gtUint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function mul(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function checkedMul(gtUint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function div(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function decrypt(gtUint8 ct) internal returns (uint8){ return uint8(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtUint8.unwrap(ct))); } function mux(gtBool bit, gtUint8 a, gtUint8 b) internal returns (gtUint8){ return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint8 b, gtUint8 amount) internal returns (gtUint8, gtUint8, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint8.wrap(new_a), gtUint8.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint8 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint8, gtUint8, gtBool, gtUint8){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint8.wrap(new_a), gtUint8.wrap(new_b), gtBool.wrap(res), gtUint8.wrap(new_allowance)); } // =========== 16 bit operations ============== function validateCiphertext(itUint16 memory input) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT16_T)), ctUint16.unwrap(input.ciphertext), input.signature)); } function onBoard(ctUint16 ct) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT16_T)), ctUint16.unwrap(ct))); } function offBoard(gtUint16 pt) internal returns (ctUint16) { return ctUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtUint16.unwrap(pt))); } function offBoardToUser(gtUint16 pt, address addr) internal returns (ctUint16) { return ctUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtUint16.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtUint16 pt, address addr) internal returns (utUint16 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic16(uint16 pt) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT16_T)), uint256(pt))); } function rand16() internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT16_T)))); } function randBoundedBits16(uint8 numBits) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT16_T)), numBits)); } function add(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function checkedAdd(gtUint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function sub(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function checkedSub(gtUint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function mul(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function checkedMul(gtUint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function div(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function decrypt(gtUint16 ct) internal returns (uint16){ return uint16(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtUint16.unwrap(ct))); } function mux(gtBool bit, gtUint16 a, gtUint16 b) internal returns (gtUint16){ return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint16.unwrap(b))); } function transfer(gtUint16 a, gtUint16 b, gtUint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint16 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } // =========== 32 bit operations ============== function validateCiphertext(itUint32 memory input) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT32_T)), ctUint32.unwrap(input.ciphertext), input.signature)); } function onBoard(ctUint32 ct) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT32_T)), ctUint32.unwrap(ct))); } function offBoard(gtUint32 pt) internal returns (ctUint32) { return ctUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtUint32.unwrap(pt))); } function offBoardToUser(gtUint32 pt, address addr) internal returns (ctUint32) { return ctUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtUint32.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtUint32 pt, address addr) internal returns (utUint32 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic32(uint32 pt) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT32_T)), uint256(pt))); } function rand32() internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT32_T)))); } function randBoundedBits32(uint8 numBits) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT32_T)), numBits)); } function add(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function checkedAdd(gtUint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function sub(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function checkedSub(gtUint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function mul(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function checkedMul(gtUint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function div(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function decrypt(gtUint32 ct) internal returns (uint32){ return uint32(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtUint32.unwrap(ct))); } function mux(gtBool bit, gtUint32 a, gtUint32 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint32.unwrap(b))); } function transfer(gtUint32 a, gtUint32 b, gtUint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // =========== 64 bit operations ============== function validateCiphertext(itUint64 memory input) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT64_T)), ctUint64.unwrap(input.ciphertext), input.signature)); } function onBoard(ctUint64 ct) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT64_T)), ctUint64.unwrap(ct))); } function offBoard(gtUint64 pt) internal returns (ctUint64) { return ctUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtUint64.unwrap(pt))); } function offBoardToUser(gtUint64 pt, address addr) internal returns (ctUint64) { return ctUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtUint64.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtUint64 pt, address addr) internal returns (utUint64 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic64(uint64 pt) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT64_T)), uint256(pt))); } function rand64() internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT64_T)))); } function randBoundedBits64(uint8 numBits) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT64_T)), numBits)); } function add(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function checkedAdd(gtUint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function checkedSub(gtUint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function checkedMul(gtUint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function decrypt(gtUint64 ct) internal returns (uint64){ return uint64(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtUint64.unwrap(ct))); } function mux(gtBool bit, gtUint64 a, gtUint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint64.unwrap(b))); } function transfer(gtUint64 a, gtUint64 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // =========== 128 bit operations ============== function validateCiphertext(itUint128 memory input) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT128_T)), ctUint128.unwrap(input.ciphertext), input.signature)); } function onBoard(ctUint128 ct) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT128_T)), ctUint128.unwrap(ct))); } function offBoard(gtUint128 pt) internal returns (ctUint128) { return ctUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtUint128.unwrap(pt))); } function offBoardToUser(gtUint128 pt, address addr) internal returns (ctUint128) { return ctUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtUint128.unwrap(pt), abi.encodePacked(addr))); } function offBoardCombined(gtUint128 pt, address addr) internal returns (utUint128 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic128(uint128 pt) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT128_T)), uint256(pt))); } function rand128() internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT128_T)))); } function randBoundedBits128(uint8 numBits) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT128_T)), numBits)); } function decrypt(gtUint128 ct) internal returns (uint128){ return uint128(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtUint128.unwrap(ct))); } function transfer(gtUint128 a, gtUint128 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function add(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function checkedAdd(gtUint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function sub(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function checkedSub(gtUint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mul(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function checkedMul(gtUint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function div(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function not(gtUint128 a) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Not(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtUint128.unwrap(a))); } function eq(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b))); } function mux(gtBool bit, gtUint128 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint128.unwrap(b))); } // =========== 256 bit operations ============== function validateCiphertext(itUint256 memory input) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT256_T)), ctUint128.unwrap(input.ciphertext.ciphertextHigh), ctUint128.unwrap(input.ciphertext.ciphertextLow), input.signature)); } function onBoard(ctUint256 memory ct) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). OnBoard(bytes1(uint8(MPC_TYPE.SUINT256_T)), ctUint128.unwrap(ct.ciphertextHigh), ctUint128.unwrap(ct.ciphertextLow))); } function offBoard(gtUint256 pt) internal returns (ctUint256 memory) { (uint256 ctHigh, uint256 ctLow) = ExtendedOperations(address(MPC_PRECOMPILE)). OffBoard256(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtUint256.unwrap(pt)); ctUint256 memory ct = ctUint256({ciphertextHigh: ctUint128.wrap(ctHigh), ciphertextLow: ctUint128.wrap(ctLow)}); return ct; } function offBoardToUser(gtUint256 pt, address addr) internal returns (ctUint256 memory) { (uint256 ctHigh, uint256 ctLow) = ExtendedOperations(address(MPC_PRECOMPILE)). OffBoardToUser256(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtUint256.unwrap(pt), abi.encodePacked(addr)); ctUint256 memory ct = ctUint256({ciphertextHigh: ctUint128.wrap(ctHigh), ciphertextLow: ctUint128.wrap(ctLow)}); return ct; } function offBoardCombined(gtUint256 pt, address addr) internal returns (utUint256 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic256(uint256 pt) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). SetPublic(bytes1(uint8(MPC_TYPE.SUINT256_T)), uint256(pt))); } function rand256() internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Rand(bytes1(uint8(MPC_TYPE.SUINT256_T)))); } function randBoundedBits256(uint8 numBits) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).RandBoundedBits(bytes1(uint8(MPC_TYPE.SUINT256_T)), numBits)); } function decrypt(gtUint256 ct) internal returns (uint256){ return uint256(ExtendedOperations(address(MPC_PRECOMPILE)). Decrypt(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtUint256.unwrap(ct))); } function transfer(gtUint256 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function checkedAdd(gtUint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function sub(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function checkedSub(gtUint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mul(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function checkedMul(gtUint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function div(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function not(gtUint256 a) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Not(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtUint256.unwrap(a))); } function eq(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint256.unwrap(b))); } // =========== Operations with LHS_PUBLIC parameter =========== // =========== 8 bit operations ============== function add(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function checkedAdd(uint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedAddWithOverflowBit(uint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function sub(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function checkedSub(uint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedSubWithOverflowBit(uint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function mul(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function checkedMul(uint8 a, gtUint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedMulWithOverflowBit(uint8 a, gtUint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function div(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function rem(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function and(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function or(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function xor(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function eq(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function ne(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function ge(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function gt(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function le(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function lt(uint8 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function min(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function max(uint8 a, gtUint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), uint256(a), gtUint8.unwrap(b))); } function mux(gtBool bit, uint8 a, gtUint8 b) internal returns (gtUint8){ return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint8.unwrap(b))); } // =========== 16 bit operations ============== function add(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function checkedAdd(uint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAddWithOverflowBit(uint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function sub(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function checkedSub(uint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSubWithOverflowBit(uint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function mul(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function checkedMul(uint16 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMulWithOverflowBit(uint16 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function div(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function rem(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function and(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function or(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function xor(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function eq(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function ne(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function ge(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function gt(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function le(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function lt(uint16 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function min(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function max(uint16 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), uint256(a), gtUint16.unwrap(b))); } function mux(gtBool bit, uint16 a, gtUint16 b) internal returns (gtUint16){ return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint16.unwrap(b))); } // =========== 32 bit operations ============== function add(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function checkedAdd(uint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(uint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function sub(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function checkedSub(uint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(uint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function mul(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function checkedMul(uint32 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(uint32 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function div(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function rem(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function and(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function or(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function xor(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function eq(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function ne(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function ge(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function gt(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function le(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function lt(uint32 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function min(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function max(uint32 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), uint256(a), gtUint32.unwrap(b))); } function mux(gtBool bit, uint32 a, gtUint32 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint32.unwrap(b))); } // =========== 64 bit operations ============== function add(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function checkedAdd(uint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(uint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function checkedSub(uint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(uint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function checkedMul(uint64 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(uint64 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function rem(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function and(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function or(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function xor(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function eq(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function ne(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function ge(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function gt(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function le(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function lt(uint64 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function min(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function max(uint64 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), uint256(a), gtUint64.unwrap(b))); } function mux(gtBool bit, uint64 a, gtUint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint64.unwrap(b))); } // =========== 128 bit operations ============== function add(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function checkedAdd(uint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(uint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function sub(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function checkedSub(uint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(uint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mul(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function checkedMul(uint128 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(uint128 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function div(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function rem(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function and(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function or(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function xor(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function eq(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function ne(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function ge(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function gt(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function le(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function lt(uint128 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function min(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function max(uint128 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), uint256(a), gtUint128.unwrap(b))); } function mux(gtBool bit, uint128 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint128.unwrap(b))); } // =========== 256 bit operations ============== function add(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function checkedAdd(uint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(uint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function sub(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function checkedSub(uint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(uint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mul(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function checkedMul(uint256 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(uint256 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function div(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function rem(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function and(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function or(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function xor(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function eq(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function ne(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function ge(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function gt(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function le(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function lt(uint256 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function min(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function max(uint256 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), uint256(a), gtUint256.unwrap(b))); } function mux(gtBool bit, uint256 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtBool.unwrap(bit), uint256(a), gtUint256.unwrap(b))); } // =========== Operations with RHS_PUBLIC parameter =========== // =========== 8 bit operations ============== function add(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function checkedAdd(gtUint8 a, uint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, uint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function sub(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function checkedSub(gtUint8 a, uint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, uint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function mul(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function checkedMul(gtUint8 a, uint8 b) internal returns (gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return checkRes8(gtBool.wrap(bit), gtUint8.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, uint8 b) internal returns (gtBool, gtUint8) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint8.wrap(res)); } function div(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function rem(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function and(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function or(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function xor(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function shl(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function shr(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function eq(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function ne(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function ge(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function gt(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function le(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function lt(gtUint8 a, uint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function min(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function max(gtUint8 a, uint8 b) internal returns (gtUint8) { return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint8.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint8 a, uint8 b) internal returns (gtUint8){ return gtUint8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint8.unwrap(a), uint256(b))); } // =========== 16 bit operations ============== function add(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function checkedAdd(gtUint16 a, uint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, uint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function sub(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function checkedSub(gtUint16 a, uint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, uint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function mul(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function checkedMul(gtUint16 a, uint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, uint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function div(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function rem(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function and(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function or(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function xor(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function shl(gtUint16 a, uint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function shr(gtUint16 a, uint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function eq(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function ne(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function ge(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function gt(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function le(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function lt(gtUint16 a, uint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function min(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function max(gtUint16 a, uint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtUint16.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint16 a, uint16 b) internal returns (gtUint16){ return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint16.unwrap(a), uint256(b))); } // =========== 32 bit operations ============== function add(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function checkedAdd(gtUint32 a, uint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, uint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function sub(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function checkedSub(gtUint32 a, uint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, uint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function mul(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function checkedMul(gtUint32 a, uint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, uint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function div(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function rem(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function and(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function or(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function xor(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function shl(gtUint32 a, uint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function shr(gtUint32 a, uint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function eq(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function ne(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function ge(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function gt(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function le(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function lt(gtUint32 a, uint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function min(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function max(gtUint32 a, uint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtUint32.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint32 a, uint32 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint32.unwrap(a), uint256(b))); } // =========== 64 bit operations ============== function add(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function checkedAdd(gtUint64 a, uint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, uint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function checkedSub(gtUint64 a, uint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, uint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function checkedMul(gtUint64 a, uint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, uint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function rem(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function and(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function or(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function xor(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function shl(gtUint64 a, uint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function shr(gtUint64 a, uint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function eq(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function ne(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function ge(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function gt(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function le(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function lt(gtUint64 a, uint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function min(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function max(gtUint64 a, uint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtUint64.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint64 a, uint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint64.unwrap(a), uint256(b))); } // =========== String operations ============ function validateCiphertext(itString memory input) internal returns (gtString memory) { uint256 len_ = input.signature.length; require(input.ciphertext.value.length == len_, "MPC_CORE: INVALID_INPUT_TEXT"); gtString memory gt_ = gtString(new gtUint64[](len_)); itUint64 memory it_; for (uint256 i = 0; i < len_; ++i) { it_.ciphertext = input.ciphertext.value[i]; it_.signature = input.signature[i]; gt_.value[i] = validateCiphertext(it_); } return gt_; } function onBoard(ctString memory ct) internal returns (gtString memory) { uint256 len_ = ct.value.length; gtString memory gt_ = gtString(new gtUint64[](len_)); for (uint256 i = 0; i < len_; ++i) { gt_.value[i] = onBoard(ct.value[i]); } return gt_; } function offBoard(gtString memory pt) internal returns (ctString memory) { uint256 len_ = pt.value.length; ctString memory ct_ = ctString(new ctUint64[](len_)); for (uint256 i = 0; i < len_; ++i) { ct_.value[i] = offBoard(pt.value[i]); } return ct_; } function offBoardToUser(gtString memory pt, address addr) internal returns (ctString memory) { uint256 len_ = pt.value.length; ctString memory ct_ = ctString(new ctUint64[](len_)); for (uint256 i = 0; i < len_; ++i) { ct_.value[i] = offBoardToUser(pt.value[i], addr); } return ct_; } function offBoardCombined(gtString memory pt, address addr) internal returns (utString memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublicString(string memory pt) internal returns (gtString memory) { bytes memory strBytes_ = bytes(pt); uint256 len_ = strBytes_.length; uint256 count_ = (len_ + 7) / 8; // Number of bytes8 elements needed gtString memory result_ = gtString(new gtUint64[](count_)); bytes8 cell_; for (uint256 i = 0; i < count_ * 8; ++i) { if (i % 8 == 0) { cell_ = bytes8(0); } else { cell_ <<= 8; } if (i < len_) { cell_ |= bytes8(strBytes_[i]) >> 56; } if (i % 8 == 7) { result_.value[i / 8] = setPublic64(uint64(cell_)); } } return result_; } function decrypt(gtString memory ct) internal returns (string memory){ uint256 len_ = ct.value.length; bytes memory result_ = new bytes(len_ * 8); bytes8 temp_; uint256 resultIndex; for (uint256 i = 0; i < len_; ++i) { temp_ = bytes8(decrypt(ct.value[i])); assembly { // Copy the bytes directly into the result array using assembly. mstore(add(result_, add(0x20, resultIndex)), temp_) } resultIndex += 8; } return string(result_); } function eq(gtString memory a, gtString memory b) internal returns (gtBool) { uint256 len = a.value.length; // note that we are not leaking information since the array length is visible to all if (len != b.value.length) return setPublic(false); gtBool result_ = eq(a.value[0], b.value[0]); for (uint256 i = 1; i < len; ++i) { result_ = and(result_, eq(a.value[i], b.value[i])); } return result_; } function ne(gtString memory a, gtString memory b) internal returns (gtBool) { uint256 len = a.value.length; // note that we are not leaking information since the array length is visible to all if (len != b.value.length) return setPublic(true); gtBool result_ = ne(a.value[0], b.value[0]); for (uint256 i = 1; i < len; ++i) { result_ = or(result_, ne(a.value[i], b.value[i])); } return result_; } // =========== 128 bit operations ============== function add(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function checkedAdd(gtUint128 a, uint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, uint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function sub(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function checkedSub(gtUint128 a, uint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, uint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mul(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function checkedMul(gtUint128 a, uint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, uint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function div(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function rem(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function and(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function or(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function xor(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function eq(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function ne(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function ge(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function gt(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function le(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function lt(gtUint128 a, uint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function min(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function max(gtUint128 a, uint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function shl(gtUint128 a, uint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function shr(gtUint128 a, uint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint128.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint128 a, uint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint128.unwrap(a), uint256(b))); } // 256 bit operations function add(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function checkedAdd(gtUint256 a, uint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, uint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function sub(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function checkedSub(gtUint256 a, uint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, uint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mul(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function checkedMul(gtUint256 a, uint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, uint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function div(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function rem(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function and(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function or(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function xor(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function eq(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function ne(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function ge(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function gt(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function le(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function lt(gtUint256 a, uint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function min(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function max(gtUint256 a, uint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function shl(gtUint256 a, uint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shl(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function shr(gtUint256 a, uint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Shr(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.RHS_PUBLIC), gtUint256.unwrap(a), uint256(b))); } function mux(gtBool bit, gtUint256 a, uint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.RHS_PUBLIC), gtBool.unwrap(bit), gtUint256.unwrap(a), uint256(b))); } // In the context of a transfer, scalar balances are irrelevant; // The only possibility for a scalar value is within the "amount" parameter. // Therefore, in this scenario, LHS_PUBLIC signifies a scalar amount, not balance1. function transfer(gtUint8 a, gtUint8 b, uint8 amount) internal returns (gtUint8, gtUint8, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint8.wrap(new_a), gtUint8.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint16 b, uint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint16 b, uint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint8 b, uint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint32 b, uint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint32 b, uint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint8 b, uint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint32 b, uint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint16 b, uint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint64 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint64 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint8 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint64 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint16 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint64 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint32 b, uint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint128 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint128 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint128 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint128 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint128 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, uint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } // =========== Transfer functions for public amount ============== function transfer(gtUint256 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, uint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint8 a, gtUint8 b, uint8 amount, gtUint8 allowance) internal returns (gtUint8, gtUint8, gtBool, gtUint8){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint8.wrap(new_a), gtUint8.wrap(new_b), gtBool.wrap(res), gtUint8.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint16 b, uint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, uint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint8 b, uint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } // Allowance with 8 bits function transferWithAllowance(gtUint16 a, gtUint16 b, uint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, uint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint8 b, uint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, uint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, uint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, uint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, uint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, uint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 8 bits function transferWithAllowance(gtUint32 a, gtUint32 b, uint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, uint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, uint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, uint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, uint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 16 bits function transferWithAllowance(gtUint32 a, gtUint32 b, uint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, uint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, uint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, uint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, uint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, uint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 8 bits function transferWithAllowance(gtUint64 a, gtUint64 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, uint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 16 bits function transferWithAllowance(gtUint64 a, gtUint64 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, uint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 32 bits function transferWithAllowance(gtUint64 a, gtUint64 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, uint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // =========== Transfer With allowance 128 bit ============== function transferWithAllowance(gtUint128 a, gtUint128 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, uint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, uint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, uint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, uint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, uint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } // =========== Transfer with allowance functions for public amount ============== function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint8.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint8.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint16.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint16.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint32.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint32.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint64.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint64.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint128.unwrap(a), gtUint256.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, uint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.LHS_PUBLIC), gtUint256.unwrap(a), gtUint128.unwrap(b), uint256(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } // ================= Cast operation ================= // =========== 8 - 16 bit operations ============== function add(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function add(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAdd(gtUint16 a, gtUint8 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint8 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function sub(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function sub(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function checkedSub(gtUint8 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSub(gtUint16 a, gtUint8 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint8 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function mul(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function mul(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function checkedMul(gtUint8 a, gtUint16 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMul(gtUint16 a, gtUint8 b) internal returns (gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return checkRes16(gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint16 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint8 b) internal returns (gtBool, gtUint16) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint16.wrap(res)); } function div(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function div(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint16 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint8 b) internal returns (gtUint16) { return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function mux(gtBool bit, gtUint8 a, gtUint16 b) internal returns (gtUint16){ return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint16.unwrap(b))); } function mux(gtBool bit, gtUint16 a, gtUint8 b) internal returns (gtUint16){ return gtUint16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint16 b, gtUint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint8 b, gtUint16 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint16 b, gtUint8 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint8 b, gtUint8 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint16 b, gtUint8 amount) internal returns (gtUint16, gtUint16, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint16 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint8 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint16 a, gtUint8 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint8 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint16, gtUint16, gtBool, gtUint16){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint16.wrap(new_a), gtUint16.wrap(new_b), gtBool.wrap(res), gtUint16.wrap(new_allowance)); } // =========== 8- 32 bit operations ============== function add(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function add(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAdd(gtUint32 a, gtUint8 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint8 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function sub(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function sub(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function checkedSub(gtUint8 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSub(gtUint32 a, gtUint8 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint8 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function mul(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function mul(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function checkedMul(gtUint8 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMul(gtUint32 a, gtUint8 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint8 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function div(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function div(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint8 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function mux(gtBool bit, gtUint8 a, gtUint32 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint32.unwrap(b))); } function mux(gtBool bit, gtUint32 a, gtUint8 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint32 b, gtUint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint8 b, gtUint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint32 b, gtUint8 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint8 b, gtUint8 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint32 b, gtUint16 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint8 b, gtUint16 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint32 b, gtUint8 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 32 bit function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint8 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // =========== 16 - 32 bit operations ============== function add(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function add(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function checkedAdd(gtUint16 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAdd(gtUint32 a, gtUint16 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint16 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function sub(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function sub(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function checkedSub(gtUint16 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSub(gtUint32 a, gtUint16 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint16 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function mul(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function mul(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function checkedMul(gtUint16 a, gtUint32 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMul(gtUint32 a, gtUint16 b) internal returns (gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return checkRes32(gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint32 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint16 b) internal returns (gtBool, gtUint32) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint32.wrap(res)); } function div(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function div(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint32 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint16 b) internal returns (gtUint32) { return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function mux(gtBool bit, gtUint16 a, gtUint32 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint32.unwrap(b))); } function mux(gtBool bit, gtUint32 a, gtUint16 b) internal returns (gtUint32){ return gtUint32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint16.unwrap(b))); } function transfer(gtUint16 a, gtUint32 b, gtUint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint16 b, gtUint32 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint32 b, gtUint8 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint16 b, gtUint8 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint32 b, gtUint16 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint16 b, gtUint16 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint32 b, gtUint16 amount) internal returns (gtUint32, gtUint32, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // Allowance with 32 bit function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint16 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint32, gtUint32, gtBool, gtUint32){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint32.wrap(new_a), gtUint32.wrap(new_b), gtBool.wrap(res), gtUint32.wrap(new_allowance)); } // =========== 8 - 64 bit operations ============== function add(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function add(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAdd(gtUint64 a, gtUint8 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint8 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function sub(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function checkedSub(gtUint8 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSub(gtUint64 a, gtUint8 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint8 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function mul(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function checkedMul(gtUint8 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMul(gtUint64 a, gtUint8 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint8 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function div(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint8 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function mux(gtBool bit, gtUint8 a, gtUint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint64.unwrap(b))); } function mux(gtBool bit, gtUint64 a, gtUint8 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint64 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint8 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint64 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint8 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint64 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint8 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint64 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint8 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint64 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 32 bit function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 64 bit function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint8 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // =========== 16 - 64 bit operations ============== function add(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function add(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function checkedAdd(gtUint16 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAdd(gtUint64 a, gtUint16 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint16 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function sub(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function checkedSub(gtUint16 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSub(gtUint64 a, gtUint16 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint16 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function mul(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function checkedMul(gtUint16 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMul(gtUint64 a, gtUint16 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint16 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function div(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint16 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function mux(gtBool bit, gtUint16 a, gtUint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint64.unwrap(b))); } function mux(gtBool bit, gtUint64 a, gtUint16 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint16.unwrap(b))); } function transfer(gtUint16 a, gtUint64 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint16 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint64 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint16 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint64 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint16 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint64 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint16 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint64 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 32 bit function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 64 bit function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint16 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // =========== 32 - 64 bit operations ============== function add(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function add(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function checkedAdd(gtUint32 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAdd(gtUint64 a, gtUint32 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint32 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function sub(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function sub(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function checkedSub(gtUint32 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSub(gtUint64 a, gtUint32 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint32 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function mul(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function mul(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function checkedMul(gtUint32 a, gtUint64 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMul(gtUint64 a, gtUint32 b) internal returns (gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return checkRes64(gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint64 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint32 b) internal returns (gtBool, gtUint64) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint64.wrap(res)); } function div(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function div(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint64 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint32 b) internal returns (gtUint64) { return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function mux(gtBool bit, gtUint32 a, gtUint64 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint64.unwrap(b))); } function mux(gtBool bit, gtUint64 a, gtUint32 b) internal returns (gtUint64){ return gtUint64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint32.unwrap(b))); } function transfer(gtUint32 a, gtUint64 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint32 b, gtUint64 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint64 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint32 b, gtUint8 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint64 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint32 b, gtUint16 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint64 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint32 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint64 b, gtUint32 amount) internal returns (gtUint64, gtUint64, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 16 bit function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 32 bit function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // Allowance with 64 bit function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint32 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint64, gtUint64, gtBool, gtUint64){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint64.wrap(new_a), gtUint64.wrap(new_b), gtBool.wrap(res), gtUint64.wrap(new_allowance)); } // =========== Cast 128 bit operations ============== // 128- 8 bit cast function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transfer(gtUint128 a, gtUint128 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transfer(gtUint128 a, gtUint128 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transfer(gtUint128 a, gtUint128 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transfer(gtUint128 a, gtUint128 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function add(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function add(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function sub(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function sub(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function mul(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function mul(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function div(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function div(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function eq(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint8 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAdd(gtUint128 a, gtUint8 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint8 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint8 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint128 a, gtUint8 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint8 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint8 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint128 a, gtUint8 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint8 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mux(gtBool bit, gtUint8 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint128.unwrap(b))); } function mux(gtBool bit, gtUint128 a, gtUint8 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint128 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint128 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint128 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint128 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint128 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint8 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint8 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function add(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function add(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function sub(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function sub(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function mul(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function mul(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function div(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function div(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function eq(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint16 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function checkedAdd(gtUint16 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAdd(gtUint128 a, gtUint16 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint16 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint16 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint128 a, gtUint16 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint16 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint16 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint128 a, gtUint16 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint16 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mux(gtBool bit, gtUint16 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint128.unwrap(b))); } function mux(gtBool bit, gtUint128 a, gtUint16 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint16.unwrap(b))); } function transfer(gtUint16 a, gtUint128 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint128 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint128 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint128 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint128 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint16 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint16 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function add(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function add(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function sub(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function sub(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function mul(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function mul(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function div(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function div(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function eq(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint32 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function checkedAdd(gtUint32 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAdd(gtUint128 a, gtUint32 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint32 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint32 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint128 a, gtUint32 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint32 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint32 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint128 a, gtUint32 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint32 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mux(gtBool bit, gtUint32 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint128.unwrap(b))); } function mux(gtBool bit, gtUint128 a, gtUint32 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint32.unwrap(b))); } function transfer(gtUint32 a, gtUint128 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint128 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint128 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint128 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint128 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint32 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint32 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function add(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function add(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function sub(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function sub(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function mul(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function mul(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function div(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function div(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function eq(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint128 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint64 b) internal returns (gtUint128) { return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function checkedAdd(gtUint64 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAdd(gtUint128 a, gtUint64 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint64 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint64 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSub(gtUint128 a, gtUint64 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint64 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint64 a, gtUint128 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMul(gtUint128 a, gtUint64 b) internal returns (gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return checkRes128(gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint128 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint64 b) internal returns (gtBool, gtUint128) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint128.wrap(res)); } function mux(gtBool bit, gtUint64 a, gtUint128 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint128.unwrap(b))); } function mux(gtBool bit, gtUint128 a, gtUint64 b) internal returns (gtUint128){ return gtUint128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint64.unwrap(b))); } function transfer(gtUint64 a, gtUint128 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, gtUint8 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint128 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, gtUint16 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint128 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, gtUint32 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint128 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, gtUint64 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint128 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint64 b, gtUint128 amount) internal returns (gtUint128, gtUint128, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint64 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint128, gtUint128, gtBool, gtUint128){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint128.wrap(new_a), gtUint128.wrap(new_b), gtBool.wrap(res), gtUint128.wrap(new_allowance)); } // =========== Cast 256 bit operations ============== function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transfer(gtUint256 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transfer(gtUint256 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transfer(gtUint256 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transfer(gtUint256 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transfer(gtUint256 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function add(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function sub(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function sub(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function mul(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function mul(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function div(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function div(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function rem(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function and(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function or(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function xor(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function eq(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function eq(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function ne(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function ge(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function gt(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function le(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function lt(gtUint8 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint8 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function min(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function max(gtUint8 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint8 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function checkedAdd(gtUint8 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAdd(gtUint256 a, gtUint8 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint8 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint8 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint8 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint256 a, gtUint8 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint8 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint8 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint8 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint256 a, gtUint8 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint8 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint8 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mux(gtBool bit, gtUint8 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint8.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint8 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint8.unwrap(b))); } function transfer(gtUint8 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint8 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint8 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint8 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint8.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint8 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint8.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function add(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function sub(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function sub(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function mul(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function mul(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function div(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function div(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function rem(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function and(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function or(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function xor(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function eq(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function eq(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function ne(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function ge(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function gt(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function le(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function lt(gtUint16 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint16 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function min(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function max(gtUint16 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint16 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function checkedAdd(gtUint16 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAdd(gtUint256 a, gtUint16 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint16 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint16 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint16 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint256 a, gtUint16 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint16 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint16 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint16 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint256 a, gtUint16 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint16 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint16 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mux(gtBool bit, gtUint16 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint16.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint16 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint16.unwrap(b))); } function transfer(gtUint16 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint16 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint16 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint16 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint16.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint16 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint16.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function add(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function sub(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function sub(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function mul(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function mul(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function div(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function div(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function rem(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function and(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function or(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function xor(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function eq(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function eq(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function ne(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function ge(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function gt(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function le(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function lt(gtUint32 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint32 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function min(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function max(gtUint32 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint32 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function checkedAdd(gtUint32 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAdd(gtUint256 a, gtUint32 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint32 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint32 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint32 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint256 a, gtUint32 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint32 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint32 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint32 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint256 a, gtUint32 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint32 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint32 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mux(gtBool bit, gtUint32 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint32.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint32 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint32.unwrap(b))); } function transfer(gtUint32 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint32 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint32 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint32 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint32.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint32 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint32.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function add(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function sub(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function sub(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function mul(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function mul(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function div(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function div(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function rem(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function and(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function or(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function xor(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function eq(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function eq(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function ne(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function ge(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function gt(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function le(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function lt(gtUint64 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint64 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function min(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function max(gtUint64 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint64 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function checkedAdd(gtUint64 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAdd(gtUint256 a, gtUint64 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint64 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint64 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint64 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint256 a, gtUint64 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint64 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint64 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint64 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint256 a, gtUint64 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint64 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint64 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mux(gtBool bit, gtUint64 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint64.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint64 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint64.unwrap(b))); } function transfer(gtUint64 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint64 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint64 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint64 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint64.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint64 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint64.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function add(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function add(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function sub(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function sub(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function mul(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function mul(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function div(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function div(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Div(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function rem(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function rem(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Rem(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function and(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function and(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function or(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function or(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function xor(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function xor(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function eq(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function eq(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Eq(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function ne(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function ne(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ne(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function ge(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function ge(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Ge(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function gt(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function gt(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Gt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function le(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function le(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Le(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function lt(gtUint128 a, gtUint256 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function lt(gtUint256 a, gtUint128 b) internal returns (gtBool) { return gtBool.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Lt(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function min(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function min(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Min(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function max(gtUint128 a, gtUint256 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function max(gtUint256 a, gtUint128 b) internal returns (gtUint256) { return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Max(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function checkedAdd(gtUint128 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAdd(gtUint256 a, gtUint128 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint128 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedAddWithOverflowBit(gtUint256 a, gtUint128 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedAdd(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint128 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSub(gtUint256 a, gtUint128 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint128 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedSubWithOverflowBit(gtUint256 a, gtUint128 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedSub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint128 a, gtUint256 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMul(gtUint256 a, gtUint128 b) internal returns (gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return checkRes256(gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint128 a, gtUint256 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function checkedMulWithOverflowBit(gtUint256 a, gtUint128 b) internal returns (gtBool, gtUint256) { (uint256 bit, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). CheckedMul(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b)); return (gtBool.wrap(bit), gtUint256.wrap(res)); } function mux(gtBool bit, gtUint128 a, gtUint256 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint128.unwrap(a), gtUint256.unwrap(b))); } function mux(gtBool bit, gtUint256 a, gtUint128 b) internal returns (gtUint256){ return gtUint256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)). Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtUint256.unwrap(a), gtUint128.unwrap(b))); } function transfer(gtUint128 a, gtUint256 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint8 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint16 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint32 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint64 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint128 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint128 a, gtUint256 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transfer(gtUint256 a, gtUint128 b, gtUint256 amount) internal returns (gtUint256, gtUint256, gtBool){ (uint256 new_a, uint256 new_b, uint256 res) = ExtendedOperations(address(MPC_PRECOMPILE)). Transfer(combineEnumsToBytes4(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint8 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint8.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint16 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint16.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint32 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint32.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint64 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint64.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint128 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint128.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint8 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint8.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint16 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint16.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint32 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint32.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint64 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint64.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint128 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint128.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint256 a, gtUint128 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint256.unwrap(a), gtUint128.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } function transferWithAllowance(gtUint128 a, gtUint256 b, gtUint256 amount, gtUint256 allowance) internal returns (gtUint256, gtUint256, gtBool, gtUint256){ (uint256 new_a, uint256 new_b, uint256 res, uint256 new_allowance) = ExtendedOperations(address(MPC_PRECOMPILE)). TransferWithAllowance(combineEnumsToBytes5(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtUint128.unwrap(a), gtUint256.unwrap(b), gtUint256.unwrap(amount), gtUint256.unwrap(allowance)); return (gtUint256.wrap(new_a), gtUint256.wrap(new_b), gtBool.wrap(res), gtUint256.wrap(new_allowance)); } // =========== signed integer operations ============== function validateCiphertext(itInt8 memory input) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT8_T)), ctInt8.unwrap(input.ciphertext), input.signature)); } function validateCiphertext(itInt16 memory input) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT16_T)), ctInt16.unwrap(input.ciphertext), input.signature)); } function validateCiphertext(itInt32 memory input) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT32_T)), ctInt32.unwrap(input.ciphertext), input.signature)); } function validateCiphertext(itInt64 memory input) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT64_T)), ctInt64.unwrap(input.ciphertext), input.signature)); } function validateCiphertext(itInt128 memory input) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT128_T)), ctInt128.unwrap(input.ciphertext), input.signature)); } function validateCiphertext(itInt256 memory input) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).ValidateCiphertext(bytes1(uint8(MPC_TYPE.SUINT256_T)), ctInt128.unwrap(input.ciphertext.ciphertextHigh), ctInt128.unwrap(input.ciphertext.ciphertextLow), input.signature)); } function onBoard(ctInt8 ct) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT8_T)), ctInt8.unwrap(ct))); } function onBoard(ctInt16 ct) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT16_T)), ctInt16.unwrap(ct))); } function onBoard(ctInt32 ct) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT32_T)), ctInt32.unwrap(ct))); } function onBoard(ctInt64 ct) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT64_T)), ctInt64.unwrap(ct))); } function onBoard(ctInt128 ct) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT128_T)), ctInt128.unwrap(ct))); } function onBoard(ctInt256 memory ct) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OnBoard(bytes1(uint8(MPC_TYPE.SUINT256_T)), ctInt128.unwrap(ct.ciphertextHigh), ctInt128.unwrap(ct.ciphertextLow))); } function offBoard(gtInt8 pt) internal returns (ctInt8) { return ctInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtInt8.unwrap(pt))); } function offBoard(gtInt16 pt) internal returns (ctInt16) { return ctInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtInt16.unwrap(pt))); } function offBoard(gtInt32 pt) internal returns (ctInt32) { return ctInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtInt32.unwrap(pt))); } function offBoard(gtInt64 pt) internal returns (ctInt64) { return ctInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtInt64.unwrap(pt))); } function offBoard(gtInt128 pt) internal returns (ctInt128) { return ctInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtInt128.unwrap(pt))); } function offBoard(gtInt256 pt) internal returns (ctInt256 memory result) { (uint256 high, uint256 low) = ExtendedOperations(address(MPC_PRECOMPILE)).OffBoard256(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtInt256.unwrap(pt)); result = ctInt256({ciphertextHigh: ctInt128.wrap(high), ciphertextLow: ctInt128.wrap(low)}); } function offBoardToUser(gtInt8 pt, address addr) internal returns (ctInt8) { return ctInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtInt8.unwrap(pt), abi.encodePacked(addr))); } function offBoardToUser(gtInt16 pt, address addr) internal returns (ctInt16) { return ctInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtInt16.unwrap(pt), abi.encodePacked(addr))); } function offBoardToUser(gtInt32 pt, address addr) internal returns (ctInt32) { return ctInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtInt32.unwrap(pt), abi.encodePacked(addr))); } function offBoardToUser(gtInt64 pt, address addr) internal returns (ctInt64) { return ctInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtInt64.unwrap(pt), abi.encodePacked(addr))); } function offBoardToUser(gtInt128 pt, address addr) internal returns (ctInt128) { return ctInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtInt128.unwrap(pt), abi.encodePacked(addr))); } function offBoardToUser(gtInt256 pt, address addr) internal returns (ctInt256 memory result) { (uint256 high, uint256 low) = ExtendedOperations(address(MPC_PRECOMPILE)).OffBoardToUser256(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtInt256.unwrap(pt), abi.encodePacked(addr)); result = ctInt256({ciphertextHigh: ctInt128.wrap(high), ciphertextLow: ctInt128.wrap(low)}); } function offBoardCombined(gtInt8 pt, address addr) internal returns (utInt8 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function offBoardCombined(gtInt16 pt, address addr) internal returns (utInt16 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function offBoardCombined(gtInt32 pt, address addr) internal returns (utInt32 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function offBoardCombined(gtInt64 pt, address addr) internal returns (utInt64 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function offBoardCombined(gtInt128 pt, address addr) internal returns (utInt128 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function offBoardCombined(gtInt256 pt, address addr) internal returns (utInt256 memory ut) { ut.ciphertext = offBoard(pt); ut.userCiphertext = offBoardToUser(pt, addr); } function setPublic8(int8 pt) internal returns (gtInt8) { uint8 unsignedBits; assembly { unsignedBits := pt } return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT8_T)), uint256(unsignedBits))); } function setPublic16(int16 pt) internal returns (gtInt16) { uint16 unsignedBits; assembly { unsignedBits := pt } return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT16_T)), uint256(unsignedBits))); } function setPublic32(int32 pt) internal returns (gtInt32) { uint32 unsignedBits; assembly { unsignedBits := pt } return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT32_T)), uint256(unsignedBits))); } function setPublic64(int64 pt) internal returns (gtInt64) { uint64 unsignedBits; assembly { unsignedBits := pt } return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT64_T)), uint256(unsignedBits))); } function setPublic128(int128 pt) internal returns (gtInt128) { uint128 unsignedBits; assembly { unsignedBits := pt } return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT128_T)), uint256(unsignedBits))); } function setPublic256(int256 pt) internal returns (gtInt256) { uint256 unsignedBits; assembly { unsignedBits := pt } return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).SetPublic(bytes1(uint8(MPC_TYPE.SUINT256_T)), unsignedBits)); } function add(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function add(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function add(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function add(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function add(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function add(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Add(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function sub(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function sub(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function sub(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function sub(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function sub(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function sub(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Sub(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function mul(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mul(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function mul(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mul(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function mul(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mul(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function mul(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mul(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function mul(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(gtUint128.unwrap(applyMulSign(signBit(a), signBit(b), mul(absUnsigned(a), absUnsigned(b))))); } function mul(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(gtUint256.unwrap(applyMulSign(signBit(a), signBit(b), mul(absUnsigned(a), absUnsigned(b))))); } function div(gtInt8 a, gtInt8 b) internal returns (gtInt8) { require(decrypt(ne(b, setPublic8(int8(0)))), "division by zero"); return gtInt8.wrap(gtUint8.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function div(gtInt16 a, gtInt16 b) internal returns (gtInt16) { require(decrypt(ne(b, setPublic16(int16(0)))), "division by zero"); return gtInt16.wrap(gtUint16.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function div(gtInt32 a, gtInt32 b) internal returns (gtInt32) { require(decrypt(ne(b, setPublic32(int32(0)))), "division by zero"); return gtInt32.wrap(gtUint32.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function div(gtInt64 a, gtInt64 b) internal returns (gtInt64) { require(decrypt(ne(b, setPublic64(int64(0)))), "division by zero"); return gtInt64.wrap(gtUint64.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function div(gtInt128 a, gtInt128 b) internal returns (gtInt128) { require(decrypt(ne(b, setPublic128(int128(0)))), "division by zero"); return gtInt128.wrap(gtUint128.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function div(gtInt256 a, gtInt256 b) internal returns (gtInt256) { require(decrypt(ne(b, setPublic256(int256(0)))), "division by zero"); return gtInt256.wrap(gtUint256.unwrap(applyDivSign(signBit(a), signBit(b), div(absUnsigned(a), absUnsigned(b))))); } function and(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function and(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function and(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function and(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function and(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function and(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).And(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function or(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function or(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function or(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function or(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function or(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function or(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Or(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function xor(gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function xor(gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function xor(gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function xor(gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function xor(gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function xor(gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Xor(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function eq(gtInt8 a, gtInt8 b) internal returns (gtBool) { return eq(gtUint8.wrap(gtInt8.unwrap(a)), gtUint8.wrap(gtInt8.unwrap(b))); } function eq(gtInt16 a, gtInt16 b) internal returns (gtBool) { return eq(gtUint16.wrap(gtInt16.unwrap(a)), gtUint16.wrap(gtInt16.unwrap(b))); } function eq(gtInt32 a, gtInt32 b) internal returns (gtBool) { return eq(gtUint32.wrap(gtInt32.unwrap(a)), gtUint32.wrap(gtInt32.unwrap(b))); } function eq(gtInt64 a, gtInt64 b) internal returns (gtBool) { return eq(gtUint64.wrap(gtInt64.unwrap(a)), gtUint64.wrap(gtInt64.unwrap(b))); } function eq(gtInt128 a, gtInt128 b) internal returns (gtBool) { return eq(gtUint128.wrap(gtInt128.unwrap(a)), gtUint128.wrap(gtInt128.unwrap(b))); } function eq(gtInt256 a, gtInt256 b) internal returns (gtBool) { return eq(gtUint256.wrap(gtInt256.unwrap(a)), gtUint256.wrap(gtInt256.unwrap(b))); } function ne(gtInt8 a, gtInt8 b) internal returns (gtBool) { return ne(gtUint8.wrap(gtInt8.unwrap(a)), gtUint8.wrap(gtInt8.unwrap(b))); } function ne(gtInt16 a, gtInt16 b) internal returns (gtBool) { return ne(gtUint16.wrap(gtInt16.unwrap(a)), gtUint16.wrap(gtInt16.unwrap(b))); } function ne(gtInt32 a, gtInt32 b) internal returns (gtBool) { return ne(gtUint32.wrap(gtInt32.unwrap(a)), gtUint32.wrap(gtInt32.unwrap(b))); } function ne(gtInt64 a, gtInt64 b) internal returns (gtBool) { return ne(gtUint64.wrap(gtInt64.unwrap(a)), gtUint64.wrap(gtInt64.unwrap(b))); } function ne(gtInt128 a, gtInt128 b) internal returns (gtBool) { return ne(gtUint128.wrap(gtInt128.unwrap(a)), gtUint128.wrap(gtInt128.unwrap(b))); } function ne(gtInt256 a, gtInt256 b) internal returns (gtBool) { return ne(gtUint256.wrap(gtInt256.unwrap(a)), gtUint256.wrap(gtInt256.unwrap(b))); } function gt(gtInt8 a, gtInt8 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint8.wrap(gtInt8.unwrap(a)), gtUint8.wrap(gtInt8.unwrap(b)))); } function gt(gtInt16 a, gtInt16 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint16.wrap(gtInt16.unwrap(a)), gtUint16.wrap(gtInt16.unwrap(b)))); } function gt(gtInt32 a, gtInt32 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint32.wrap(gtInt32.unwrap(a)), gtUint32.wrap(gtInt32.unwrap(b)))); } function gt(gtInt64 a, gtInt64 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint64.wrap(gtInt64.unwrap(a)), gtUint64.wrap(gtInt64.unwrap(b)))); } function gt(gtInt128 a, gtInt128 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint128.wrap(gtInt128.unwrap(a)), gtUint128.wrap(gtInt128.unwrap(b)))); } function gt(gtInt256 a, gtInt256 b) internal returns (gtBool) { return signedGt(signBit(a), signBit(b), gt(gtUint256.wrap(gtInt256.unwrap(a)), gtUint256.wrap(gtInt256.unwrap(b)))); } function lt(gtInt8 a, gtInt8 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint8.wrap(gtInt8.unwrap(a)), gtUint8.wrap(gtInt8.unwrap(b)))); } function lt(gtInt16 a, gtInt16 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint16.wrap(gtInt16.unwrap(a)), gtUint16.wrap(gtInt16.unwrap(b)))); } function lt(gtInt32 a, gtInt32 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint32.wrap(gtInt32.unwrap(a)), gtUint32.wrap(gtInt32.unwrap(b)))); } function lt(gtInt64 a, gtInt64 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint64.wrap(gtInt64.unwrap(a)), gtUint64.wrap(gtInt64.unwrap(b)))); } function lt(gtInt128 a, gtInt128 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint128.wrap(gtInt128.unwrap(a)), gtUint128.wrap(gtInt128.unwrap(b)))); } function lt(gtInt256 a, gtInt256 b) internal returns (gtBool) { return signedLt(signBit(a), signBit(b), lt(gtUint256.wrap(gtInt256.unwrap(a)), gtUint256.wrap(gtInt256.unwrap(b)))); } function ge(gtInt8 a, gtInt8 b) internal returns (gtBool) { return not(lt(a, b)); } function ge(gtInt16 a, gtInt16 b) internal returns (gtBool) { return not(lt(a, b)); } function ge(gtInt32 a, gtInt32 b) internal returns (gtBool) { return not(lt(a, b)); } function ge(gtInt64 a, gtInt64 b) internal returns (gtBool) { return not(lt(a, b)); } function ge(gtInt128 a, gtInt128 b) internal returns (gtBool) { return not(lt(a, b)); } function ge(gtInt256 a, gtInt256 b) internal returns (gtBool) { return not(lt(a, b)); } function le(gtInt8 a, gtInt8 b) internal returns (gtBool) { return not(gt(a, b)); } function le(gtInt16 a, gtInt16 b) internal returns (gtBool) { return not(gt(a, b)); } function le(gtInt32 a, gtInt32 b) internal returns (gtBool) { return not(gt(a, b)); } function le(gtInt64 a, gtInt64 b) internal returns (gtBool) { return not(gt(a, b)); } function le(gtInt128 a, gtInt128 b) internal returns (gtBool) { return not(gt(a, b)); } function le(gtInt256 a, gtInt256 b) internal returns (gtBool) { return not(gt(a, b)); } function decrypt(gtInt8 ct) internal returns (int8) { return int8(uint8(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT8_T)), gtInt8.unwrap(ct)))); } function decrypt(gtInt16 ct) internal returns (int16) { return int16(uint16(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT16_T)), gtInt16.unwrap(ct)))); } function decrypt(gtInt32 ct) internal returns (int32) { return int32(uint32(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT32_T)), gtInt32.unwrap(ct)))); } function decrypt(gtInt64 ct) internal returns (int64) { return int64(uint64(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT64_T)), gtInt64.unwrap(ct)))); } function decrypt(gtInt128 ct) internal returns (int128) { return int128(uint128(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT128_T)), gtInt128.unwrap(ct)))); } function decrypt(gtInt256 ct) internal returns (int256) { return int256(ExtendedOperations(address(MPC_PRECOMPILE)).Decrypt(bytes1(uint8(MPC_TYPE.SUINT256_T)), gtInt256.unwrap(ct))); } function mux(gtBool bit, gtInt8 a, gtInt8 b) internal returns (gtInt8) { return gtInt8.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT8_T, MPC_TYPE.SUINT8_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt8.unwrap(a), gtInt8.unwrap(b))); } function mux(gtBool bit, gtInt16 a, gtInt16 b) internal returns (gtInt16) { return gtInt16.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT16_T, MPC_TYPE.SUINT16_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt16.unwrap(a), gtInt16.unwrap(b))); } function mux(gtBool bit, gtInt32 a, gtInt32 b) internal returns (gtInt32) { return gtInt32.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT32_T, MPC_TYPE.SUINT32_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt32.unwrap(a), gtInt32.unwrap(b))); } function mux(gtBool bit, gtInt64 a, gtInt64 b) internal returns (gtInt64) { return gtInt64.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT64_T, MPC_TYPE.SUINT64_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt64.unwrap(a), gtInt64.unwrap(b))); } function mux(gtBool bit, gtInt128 a, gtInt128 b) internal returns (gtInt128) { return gtInt128.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT128_T, MPC_TYPE.SUINT128_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt128.unwrap(a), gtInt128.unwrap(b))); } function mux(gtBool bit, gtInt256 a, gtInt256 b) internal returns (gtInt256) { return gtInt256.wrap(ExtendedOperations(address(MPC_PRECOMPILE)).Mux(combineEnumsToBytes3(MPC_TYPE.SUINT256_T, MPC_TYPE.SUINT256_T, ARGS.BOTH_SECRET), gtBool.unwrap(bit), gtInt256.unwrap(a), gtInt256.unwrap(b))); } function shl(gtInt8 a, uint8 b) internal returns (gtInt8) { return gtInt8.wrap(gtUint8.unwrap(shl(gtUint8.wrap(gtInt8.unwrap(a)), b))); } function shl(gtInt16 a, uint8 b) internal returns (gtInt16) { return gtInt16.wrap(gtUint16.unwrap(shl(gtUint16.wrap(gtInt16.unwrap(a)), b))); } function shl(gtInt32 a, uint8 b) internal returns (gtInt32) { return gtInt32.wrap(gtUint32.unwrap(shl(gtUint32.wrap(gtInt32.unwrap(a)), b))); } function shl(gtInt64 a, uint8 b) internal returns (gtInt64) { return gtInt64.wrap(gtUint64.unwrap(shl(gtUint64.wrap(gtInt64.unwrap(a)), b))); } function shl(gtInt128 a, uint8 b) internal returns (gtInt128) { return gtInt128.wrap(gtUint128.unwrap(shl(gtUint128.wrap(gtInt128.unwrap(a)), b))); } function shr(gtInt8 a, uint8 b) internal returns (gtInt8) { return gtInt8.wrap(gtUint8.unwrap(signedShr(gtUint8.wrap(gtInt8.unwrap(a)), b, 8))); } function shr(gtInt16 a, uint8 b) internal returns (gtInt16) { return gtInt16.wrap(gtUint16.unwrap(signedShr(gtUint16.wrap(gtInt16.unwrap(a)), b, 16))); } function shr(gtInt32 a, uint8 b) internal returns (gtInt32) { return gtInt32.wrap(gtUint32.unwrap(signedShr(gtUint32.wrap(gtInt32.unwrap(a)), b, 32))); } function shr(gtInt64 a, uint8 b) internal returns (gtInt64) { return gtInt64.wrap(gtUint64.unwrap(signedShr(gtUint64.wrap(gtInt64.unwrap(a)), b, 64))); } function shr(gtInt128 a, uint8 b) internal returns (gtInt128) { return gtInt128.wrap(gtUint128.unwrap(signedShr(gtUint128.wrap(gtInt128.unwrap(a)), b, 128))); } function fromSigned(gtInt128 a) internal pure returns (gtUint128) { return gtUint128.wrap(gtInt128.unwrap(a)); } function toSigned(gtUint128 a) internal pure returns (gtInt128) { return gtInt128.wrap(gtUint128.unwrap(a)); } function fromSigned(gtInt256 a) internal pure returns (gtUint256) { return gtUint256.wrap(gtInt256.unwrap(a)); } function toSigned(gtUint256 a) internal pure returns (gtInt256) { return gtInt256.wrap(gtUint256.unwrap(a)); } function int64ToUint64(int64 x) internal pure returns (uint64) { return uint64(uint256(uint64(x))); } function uint64ToInt64(uint64 x) internal pure returns (int64) { return int64(uint64(uint256(x))); } function int128ToUint128(int128 x) internal pure returns (uint128) { return uint128(uint256(uint128(x))); } function uint128ToInt128(uint128 x) internal pure returns (int128) { return int128(x); } function negate(gtInt128 a) internal returns (gtInt128) { return sub(setPublic128(int128(0)), a); } function negate(gtInt256 a) internal returns (gtInt256) { return sub(setPublic256(int256(0)), a); } function checkedAdd(gtInt8 a, gtInt8 b) internal returns (gtInt8) { (gtBool overflow, gtInt8 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAdd(gtInt16 a, gtInt16 b) internal returns (gtInt16) { (gtBool overflow, gtInt16 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAdd(gtInt32 a, gtInt32 b) internal returns (gtInt32) { (gtBool overflow, gtInt32 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAdd(gtInt64 a, gtInt64 b) internal returns (gtInt64) { (gtBool overflow, gtInt64 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAdd(gtInt128 a, gtInt128 b) internal returns (gtInt128) { (gtBool overflow, gtInt128 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAdd(gtInt256 a, gtInt256 b) internal returns (gtInt256) { (gtBool overflow, gtInt256 result) = checkedAddWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedAddWithOverflowBit(gtInt8 a, gtInt8 b) internal returns (gtBool, gtInt8) { gtInt8 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedAddWithOverflowBit(gtInt16 a, gtInt16 b) internal returns (gtBool, gtInt16) { gtInt16 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedAddWithOverflowBit(gtInt32 a, gtInt32 b) internal returns (gtBool, gtInt32) { gtInt32 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedAddWithOverflowBit(gtInt64 a, gtInt64 b) internal returns (gtBool, gtInt64) { gtInt64 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedAddWithOverflowBit(gtInt128 a, gtInt128 b) internal returns (gtBool, gtInt128) { gtInt128 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedAddWithOverflowBit(gtInt256 a, gtInt256 b) internal returns (gtBool, gtInt256) { gtInt256 result = add(a, b); return (signedAddOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSub(gtInt8 a, gtInt8 b) internal returns (gtInt8) { (gtBool overflow, gtInt8 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSub(gtInt16 a, gtInt16 b) internal returns (gtInt16) { (gtBool overflow, gtInt16 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSub(gtInt32 a, gtInt32 b) internal returns (gtInt32) { (gtBool overflow, gtInt32 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSub(gtInt64 a, gtInt64 b) internal returns (gtInt64) { (gtBool overflow, gtInt64 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSub(gtInt128 a, gtInt128 b) internal returns (gtInt128) { (gtBool overflow, gtInt128 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSub(gtInt256 a, gtInt256 b) internal returns (gtInt256) { (gtBool overflow, gtInt256 result) = checkedSubWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedSubWithOverflowBit(gtInt8 a, gtInt8 b) internal returns (gtBool, gtInt8) { gtInt8 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSubWithOverflowBit(gtInt16 a, gtInt16 b) internal returns (gtBool, gtInt16) { gtInt16 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSubWithOverflowBit(gtInt32 a, gtInt32 b) internal returns (gtBool, gtInt32) { gtInt32 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSubWithOverflowBit(gtInt64 a, gtInt64 b) internal returns (gtBool, gtInt64) { gtInt64 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSubWithOverflowBit(gtInt128 a, gtInt128 b) internal returns (gtBool, gtInt128) { gtInt128 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedSubWithOverflowBit(gtInt256 a, gtInt256 b) internal returns (gtBool, gtInt256) { gtInt256 result = sub(a, b); return (signedSubOverflow(signBit(a), signBit(b), signBit(result)), result); } function checkedMul(gtInt8 a, gtInt8 b) internal returns (gtInt8) { (gtBool overflow, gtInt8 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMul(gtInt16 a, gtInt16 b) internal returns (gtInt16) { (gtBool overflow, gtInt16 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMul(gtInt32 a, gtInt32 b) internal returns (gtInt32) { (gtBool overflow, gtInt32 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMul(gtInt64 a, gtInt64 b) internal returns (gtInt64) { (gtBool overflow, gtInt64 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMul(gtInt128 a, gtInt128 b) internal returns (gtInt128) { (gtBool overflow, gtInt128 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMul(gtInt256 a, gtInt256 b) internal returns (gtInt256) { (gtBool overflow, gtInt256 result) = checkedMulWithOverflowBit(a, b); return checkSignedRes(overflow, result); } function checkedMulWithOverflowBit(gtInt8 a, gtInt8 b) internal returns (gtBool, gtInt8) { (gtBool overflow, gtUint8 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint8(type(int8).max), uint8(1) << 7); } function checkedMulWithOverflowBit(gtInt16 a, gtInt16 b) internal returns (gtBool, gtInt16) { (gtBool overflow, gtUint16 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint16(type(int16).max), uint16(1) << 15); } function checkedMulWithOverflowBit(gtInt32 a, gtInt32 b) internal returns (gtBool, gtInt32) { (gtBool overflow, gtUint32 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint32(type(int32).max), uint32(1) << 31); } function checkedMulWithOverflowBit(gtInt64 a, gtInt64 b) internal returns (gtBool, gtInt64) { (gtBool overflow, gtUint64 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint64(type(int64).max), uint64(1) << 63); } function checkedMulWithOverflowBit(gtInt128 a, gtInt128 b) internal returns (gtBool, gtInt128) { (gtBool overflow, gtUint128 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint128(type(int128).max), uint128(1) << 127); } function checkedMulWithOverflowBit(gtInt256 a, gtInt256 b) internal returns (gtBool, gtInt256) { (gtBool overflow, gtUint256 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return signedMulResult(overflow, signBit(a), signBit(b), product, uint256(type(int256).max), uint256(1) << 255); } function checkSignedRes(gtBool bit, gtInt8 res) private returns (gtInt8) { checkOverflow(bit); return res; } function checkSignedRes(gtBool bit, gtInt16 res) private returns (gtInt16) { checkOverflow(bit); return res; } function checkSignedRes(gtBool bit, gtInt32 res) private returns (gtInt32) { checkOverflow(bit); return res; } function checkSignedRes(gtBool bit, gtInt64 res) private returns (gtInt64) { checkOverflow(bit); return res; } function checkSignedRes(gtBool bit, gtInt128 res) private returns (gtInt128) { checkOverflow(bit); return res; } function checkSignedRes(gtBool bit, gtInt256 res) private returns (gtInt256) { checkOverflow(bit); return res; } function signedGt(gtBool signA, gtBool signB, gtBool unsignedGt) private returns (gtBool) { gtBool signDiff = ne(signA, signB); gtBool aPositiveBNegative = and(signDiff, not(signA)); return or(aPositiveBNegative, and(not(signDiff), unsignedGt)); } function signedLt(gtBool signA, gtBool signB, gtBool unsignedLt) private returns (gtBool) { gtBool signDiff = ne(signA, signB); gtBool aNegativeBPositive = and(signDiff, signA); return or(aNegativeBPositive, and(not(signDiff), unsignedLt)); } function signedAddOverflow(gtBool signA, gtBool signB, gtBool signResult) private returns (gtBool) { return and(eq(signA, signB), ne(signResult, signA)); } function signedSubOverflow(gtBool signA, gtBool signB, gtBool signResult) private returns (gtBool) { return and(ne(signA, signB), ne(signResult, signA)); } function applyMulSign(gtBool signA, gtBool signB, gtUint128 product) private returns (gtUint128) { gtBool negative = xor(signA, signB); gtInt128 signedProduct = gtInt128.wrap(gtUint128.unwrap(product)); return gtUint128.wrap(gtInt128.unwrap(mux(negative, signedProduct, sub(setPublic128(int128(0)), signedProduct)))); } function applyMulSign(gtBool signA, gtBool signB, gtUint256 product) private returns (gtUint256) { gtBool negative = xor(signA, signB); gtInt256 signedProduct = gtInt256.wrap(gtUint256.unwrap(product)); return gtUint256.wrap(gtInt256.unwrap(mux(negative, signedProduct, sub(setPublic256(int256(0)), signedProduct)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint8 quotient) private returns (gtUint8) { gtBool negative = xor(signA, signB); gtInt8 signedQuotient = gtInt8.wrap(gtUint8.unwrap(quotient)); return gtUint8.wrap(gtInt8.unwrap(mux(negative, signedQuotient, sub(setPublic8(int8(0)), signedQuotient)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint16 quotient) private returns (gtUint16) { gtBool negative = xor(signA, signB); gtInt16 signedQuotient = gtInt16.wrap(gtUint16.unwrap(quotient)); return gtUint16.wrap(gtInt16.unwrap(mux(negative, signedQuotient, sub(setPublic16(int16(0)), signedQuotient)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint32 quotient) private returns (gtUint32) { gtBool negative = xor(signA, signB); gtInt32 signedQuotient = gtInt32.wrap(gtUint32.unwrap(quotient)); return gtUint32.wrap(gtInt32.unwrap(mux(negative, signedQuotient, sub(setPublic32(int32(0)), signedQuotient)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint64 quotient) private returns (gtUint64) { gtBool negative = xor(signA, signB); gtInt64 signedQuotient = gtInt64.wrap(gtUint64.unwrap(quotient)); return gtUint64.wrap(gtInt64.unwrap(mux(negative, signedQuotient, sub(setPublic64(int64(0)), signedQuotient)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint128 quotient) private returns (gtUint128) { gtBool negative = xor(signA, signB); gtInt128 signedQuotient = gtInt128.wrap(gtUint128.unwrap(quotient)); return gtUint128.wrap(gtInt128.unwrap(mux(negative, signedQuotient, sub(setPublic128(int128(0)), signedQuotient)))); } function applyDivSign(gtBool signA, gtBool signB, gtUint256 quotient) private returns (gtUint256) { gtBool negative = xor(signA, signB); gtInt256 signedQuotient = gtInt256.wrap(gtUint256.unwrap(quotient)); return gtUint256.wrap(gtInt256.unwrap(mux(negative, signedQuotient, sub(setPublic256(int256(0)), signedQuotient)))); } function signedShr(gtUint8 value, uint8 shift, uint8 width) private returns (gtUint8) { gtUint8 shifted = shr(value, shift); if (shift == 0) return shifted; uint8 mask = shift >= width ? type(uint8).max : uint8(type(uint8).max << (width - shift)); gtBool negative = eq(shr(value, width - 1), setPublic8(uint8(1))); return mux(negative, shifted, or(shifted, setPublic8(mask))); } function signedShr(gtUint16 value, uint8 shift, uint8 width) private returns (gtUint16) { gtUint16 shifted = shr(value, shift); if (shift == 0) return shifted; uint16 mask = shift >= width ? type(uint16).max : uint16(type(uint16).max << (width - shift)); gtBool negative = eq(shr(value, width - 1), setPublic16(uint16(1))); return mux(negative, shifted, or(shifted, setPublic16(mask))); } function signedShr(gtUint32 value, uint8 shift, uint8 width) private returns (gtUint32) { gtUint32 shifted = shr(value, shift); if (shift == 0) return shifted; uint32 mask = shift >= width ? type(uint32).max : uint32(type(uint32).max << (width - shift)); gtBool negative = eq(shr(value, width - 1), setPublic32(uint32(1))); return mux(negative, shifted, or(shifted, setPublic32(mask))); } function signedShr(gtUint64 value, uint8 shift, uint8 width) private returns (gtUint64) { gtUint64 shifted = shr(value, shift); if (shift == 0) return shifted; uint64 mask = shift >= width ? type(uint64).max : uint64(type(uint64).max << (width - shift)); gtBool negative = eq(shr(value, width - 1), setPublic64(uint64(1))); return mux(negative, shifted, or(shifted, setPublic64(mask))); } function signedShr(gtUint128 value, uint8 shift, uint8 width) private returns (gtUint128) { gtUint128 shifted = shr(value, shift); if (shift == 0) return shifted; uint128 mask = shift >= width ? type(uint128).max : uint128(type(uint128).max << (width - shift)); gtBool negative = eq(shr(value, width - 1), setPublic128(uint128(1))); return mux(negative, shifted, or(shifted, setPublic128(mask))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint8 product, uint8 maxPositive, uint8 maxNegativeMagnitude) private returns (gtBool, gtInt8) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic8(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic8(maxNegativeMagnitude))); gtInt8 signedProduct = gtInt8.wrap(gtUint8.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic8(int8(0)), signedProduct))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint16 product, uint16 maxPositive, uint16 maxNegativeMagnitude) private returns (gtBool, gtInt16) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic16(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic16(maxNegativeMagnitude))); gtInt16 signedProduct = gtInt16.wrap(gtUint16.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic16(int16(0)), signedProduct))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint32 product, uint32 maxPositive, uint32 maxNegativeMagnitude) private returns (gtBool, gtInt32) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic32(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic32(maxNegativeMagnitude))); gtInt32 signedProduct = gtInt32.wrap(gtUint32.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic32(int32(0)), signedProduct))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint64 product, uint64 maxPositive, uint64 maxNegativeMagnitude) private returns (gtBool, gtInt64) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic64(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic64(maxNegativeMagnitude))); gtInt64 signedProduct = gtInt64.wrap(gtUint64.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic64(int64(0)), signedProduct))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint128 product, uint128 maxPositive, uint128 maxNegativeMagnitude) private returns (gtBool, gtInt128) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic128(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic128(maxNegativeMagnitude))); gtInt128 signedProduct = gtInt128.wrap(gtUint128.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic128(int128(0)), signedProduct))); } function signedMulResult(gtBool unsignedOverflow, gtBool signA, gtBool signB, gtUint256 product, uint256 maxPositive, uint256 maxNegativeMagnitude) private returns (gtBool, gtInt256) { gtBool negative = xor(signA, signB); gtBool positiveOverflow = and(not(negative), gt(product, setPublic256(maxPositive))); gtBool negativeOverflow = and(negative, gt(product, setPublic256(maxNegativeMagnitude))); gtInt256 signedProduct = gtInt256.wrap(gtUint256.unwrap(product)); return (or(unsignedOverflow, or(positiveOverflow, negativeOverflow)), mux(negative, signedProduct, sub(setPublic256(int256(0)), signedProduct))); } function checkedAbsMul(gtInt128 a, gtInt128 b) private returns (gtUint128) { (, gtUint128 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return product; } function checkedAbsMul(gtInt256 a, gtInt256 b) private returns (gtUint256) { (, gtUint256 product) = checkedMulWithOverflowBit(absUnsigned(a), absUnsigned(b)); return product; } function absUnsigned(gtInt8 a) private returns (gtUint8) { return gtUint8.wrap(gtInt8.unwrap(mux(signBit(a), a, sub(setPublic8(int8(0)), a)))); } function absUnsigned(gtInt16 a) private returns (gtUint16) { return gtUint16.wrap(gtInt16.unwrap(mux(signBit(a), a, sub(setPublic16(int16(0)), a)))); } function absUnsigned(gtInt32 a) private returns (gtUint32) { return gtUint32.wrap(gtInt32.unwrap(mux(signBit(a), a, sub(setPublic32(int32(0)), a)))); } function absUnsigned(gtInt64 a) private returns (gtUint64) { return gtUint64.wrap(gtInt64.unwrap(mux(signBit(a), a, sub(setPublic64(int64(0)), a)))); } function absUnsigned(gtInt128 a) private returns (gtUint128) { return gtUint128.wrap(gtInt128.unwrap(mux(signBit(a), a, sub(setPublic128(int128(0)), a)))); } function absUnsigned(gtInt256 a) private returns (gtUint256) { return gtUint256.wrap(gtInt256.unwrap(mux(signBit(a), a, sub(setPublic256(int256(0)), a)))); } function signBit(gtInt8 a) private returns (gtBool) { return eq(shr(gtUint8.wrap(gtInt8.unwrap(a)), 7), setPublic8(uint8(1))); } function signBit(gtInt16 a) private returns (gtBool) { return eq(shr(gtUint16.wrap(gtInt16.unwrap(a)), 15), setPublic16(uint16(1))); } function signBit(gtInt32 a) private returns (gtBool) { return eq(shr(gtUint32.wrap(gtInt32.unwrap(a)), 31), setPublic32(uint32(1))); } function signBit(gtInt64 a) private returns (gtBool) { return eq(shr(gtUint64.wrap(gtInt64.unwrap(a)), 63), setPublic64(uint64(1))); } function signBit(gtInt128 a) private returns (gtBool) { return eq(shr(gtUint128.wrap(gtInt128.unwrap(a)), 127), setPublic128(uint128(1))); } function signBit(gtInt256 a) private returns (gtBool) { return eq(shr(gtUint256.wrap(gtInt256.unwrap(a)), 255), setPublic256(uint256(1))); } }