From 61fccc83c282efa8ad830467de3741dcc33228f6 Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Thu, 15 Jun 2023 23:01:01 -0400 Subject: [PATCH] Add cost types for int256 arithmetics --- Stellar-contract-config-setting.x | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Stellar-contract-config-setting.x b/Stellar-contract-config-setting.x index c2725e0..4dc0a2d 100644 --- a/Stellar-contract-config-setting.x +++ b/Stellar-contract-config-setting.x @@ -140,7 +140,17 @@ enum ContractCostType { // Cost of computing an ECDSA secp256k1 signature from bytes. ComputeEcdsaSecp256k1Sig = 23, // Cost of recovering an ECDSA secp256k1 key from a signature. - RecoverEcdsaSecp256k1Key = 24 + RecoverEcdsaSecp256k1Key = 24, + // Cost of int256 addition (`+`) and subtraction (`-`) operations + Int256AddSub = 25, + // Cost of int256 multiplication (`*`) operation + Int256Mul = 26, + // Cost of int256 division (`/`) operation + Int256Div = 27, + // Cost of int256 power (`exp`) operation + Int256Pow = 28, + // Cost of int256 shift (`shl`, `shr`) operation + Int256Shift = 29 }; struct ContractCostParamEntry {