diff --git a/generator/api.index.txt b/generator/api.index.txt index 74fd5cb..ca2430c 100644 --- a/generator/api.index.txt +++ b/generator/api.index.txt @@ -1,4 +1,4 @@ -1.34.3 +1.35.0 TYPES client.ClientErrorCode client.ClientError @@ -155,6 +155,8 @@ abi.ParamsOfDecodeBoc abi.ResultOfDecodeBoc abi.ParamsOfAbiEncodeBoc abi.ResultOfAbiEncodeBoc +abi.ParamsOfCalcFunctionId +abi.ResultOfCalcFunctionId boc.BocCacheType boc.BocErrorCode boc.ParamsOfParse @@ -344,6 +346,7 @@ abi.encode_initial_data abi.decode_initial_data abi.decode_boc abi.encode_boc +abi.calc_function_id boc.parse_message boc.parse_transaction boc.parse_account diff --git a/generator/api.json b/generator/api.json index 4be8e1e..28071e1 100644 --- a/generator/api.json +++ b/generator/api.json @@ -1,5 +1,5 @@ { - "version": "1.34.3", + "version": "1.35.0", "modules": [ { "name": "client", @@ -5374,6 +5374,13 @@ "value": "314", "summary": null, "description": null + }, + { + "name": "InvalidFunctionName", + "type": "Number", + "value": "315", + "summary": null, + "description": null } ], "summary": null, @@ -6950,6 +6957,52 @@ ], "summary": null, "description": null + }, + { + "name": "ParamsOfCalcFunctionId", + "type": "Struct", + "struct_fields": [ + { + "name": "abi", + "type": "Ref", + "ref_name": "abi.Abi", + "summary": "Contract ABI.", + "description": null + }, + { + "name": "function_name", + "type": "String", + "summary": "Contract function name", + "description": null + }, + { + "name": "output", + "type": "Optional", + "optional_inner": { + "type": "Boolean" + }, + "summary": "If set to `true` output function ID will be returned which is used in contract response. Default is `false`", + "description": null + } + ], + "summary": null, + "description": null + }, + { + "name": "ResultOfCalcFunctionId", + "type": "Struct", + "struct_fields": [ + { + "name": "function_id", + "type": "Number", + "number_type": "UInt", + "number_size": 32, + "summary": "Contract function ID", + "description": null + } + ], + "summary": null, + "description": null } ], "functions": [ @@ -7484,6 +7537,44 @@ ] }, "errors": null + }, + { + "name": "calc_function_id", + "summary": "Calculates contract function ID by contract ABI", + "description": null, + "params": [ + { + "name": "_context", + "type": "Generic", + "generic_name": "Arc", + "generic_args": [ + { + "type": "Ref", + "ref_name": "ClientContext" + } + ], + "summary": null, + "description": null + }, + { + "name": "params", + "type": "Ref", + "ref_name": "abi.ParamsOfCalcFunctionId", + "summary": null, + "description": null + } + ], + "result": { + "type": "Generic", + "generic_name": "ClientResult", + "generic_args": [ + { + "type": "Ref", + "ref_name": "abi.ResultOfCalcFunctionId" + } + ] + }, + "errors": null } ] }, @@ -10512,6 +10603,15 @@ }, "summary": "transaction logical time", "description": null + }, + { + "name": "chksig_always_succeed", + "type": "Optional", + "optional_inner": { + "type": "Boolean" + }, + "summary": "Overrides standard TVM behaviour. If set to `true` then CHKSIG always will return `true`.", + "description": null } ], "summary": null, diff --git a/runtimes/linux-x64/native/libton_client.so b/runtimes/linux-x64/native/libton_client.so index d44bbe6..6cf0ad3 100644 Binary files a/runtimes/linux-x64/native/libton_client.so and b/runtimes/linux-x64/native/libton_client.so differ diff --git a/runtimes/osx-x64/native/libton_client.dylib b/runtimes/osx-x64/native/libton_client.dylib index b1031f2..0629d79 100644 Binary files a/runtimes/osx-x64/native/libton_client.dylib and b/runtimes/osx-x64/native/libton_client.dylib differ diff --git a/runtimes/win-x64/native/ton_client.dll b/runtimes/win-x64/native/ton_client.dll index 0c33062..757f127 100644 Binary files a/runtimes/win-x64/native/ton_client.dll and b/runtimes/win-x64/native/ton_client.dll differ diff --git a/runtimes/win-x86/native/ton_client.dll b/runtimes/win-x86/native/ton_client.dll index d0b6735..547135e 100644 Binary files a/runtimes/win-x86/native/ton_client.dll and b/runtimes/win-x86/native/ton_client.dll differ diff --git a/src/TonClient/Modules/AbiModule.cs b/src/TonClient/Modules/AbiModule.cs index d0f9761..7a6666d 100644 --- a/src/TonClient/Modules/AbiModule.cs +++ b/src/TonClient/Modules/AbiModule.cs @@ -6,7 +6,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, abi module. +* TON API version 1.35.0, abi module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ @@ -28,6 +28,7 @@ public enum AbiErrorCode InvalidFunctionId = 312, InvalidData = 313, EncodeInitialDataFailed = 314, + InvalidFunctionName = 315, } public abstract class Abi @@ -1052,6 +1053,38 @@ public class ResultOfAbiEncodeBoc public string Boc { get; set; } } + public class ParamsOfCalcFunctionId + { + /// + /// Contract ABI. + /// + [JsonProperty("abi", NullValueHandling = NullValueHandling.Ignore)] + [JsonConverter(typeof(PolymorphicTypeConverter))] + public Abi Abi { get; set; } + + /// + /// Contract function name + /// + [JsonProperty("function_name", NullValueHandling = NullValueHandling.Ignore)] + public string FunctionName { get; set; } + + /// + /// If set to `true` output function ID will be returned which is used in contract response. Default is + /// `false` + /// + [JsonProperty("output", NullValueHandling = NullValueHandling.Ignore)] + public bool? Output { get; set; } + } + + public class ResultOfCalcFunctionId + { + /// + /// Contract function ID + /// + [JsonProperty("function_id", NullValueHandling = NullValueHandling.Ignore)] + public uint FunctionId { get; set; } + } + /// /// Provides message encoding and decoding according to the ABI specification. /// @@ -1189,6 +1222,11 @@ public interface IAbiModule /// Encodes given parameters in JSON into a BOC using param types from ABI. /// Task EncodeBocAsync(ParamsOfAbiEncodeBoc @params); + + /// + /// Calculates contract function ID by contract ABI + /// + Task CalcFunctionIdAsync(ParamsOfCalcFunctionId @params); } internal class AbiModule : IAbiModule @@ -1269,6 +1307,11 @@ public async Task EncodeBocAsync(ParamsOfAbiEncodeBoc @par { return await _client.CallFunctionAsync("abi.encode_boc", @params).ConfigureAwait(false); } + + public async Task CalcFunctionIdAsync(ParamsOfCalcFunctionId @params) + { + return await _client.CallFunctionAsync("abi.calc_function_id", @params).ConfigureAwait(false); + } } } diff --git a/src/TonClient/Modules/BocModule.cs b/src/TonClient/Modules/BocModule.cs index 789e93f..c08e48d 100644 --- a/src/TonClient/Modules/BocModule.cs +++ b/src/TonClient/Modules/BocModule.cs @@ -5,7 +5,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, boc module. +* TON API version 1.35.0, boc module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/ClientModule.cs b/src/TonClient/Modules/ClientModule.cs index 9df013b..924c8c1 100644 --- a/src/TonClient/Modules/ClientModule.cs +++ b/src/TonClient/Modules/ClientModule.cs @@ -6,7 +6,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, client module. +* TON API version 1.35.0, client module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/CryptoModule.cs b/src/TonClient/Modules/CryptoModule.cs index a50f519..d1d7f9f 100644 --- a/src/TonClient/Modules/CryptoModule.cs +++ b/src/TonClient/Modules/CryptoModule.cs @@ -6,7 +6,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, crypto module. +* TON API version 1.35.0, crypto module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/DebotModule.cs b/src/TonClient/Modules/DebotModule.cs index cd2b798..40ad8eb 100644 --- a/src/TonClient/Modules/DebotModule.cs +++ b/src/TonClient/Modules/DebotModule.cs @@ -5,7 +5,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, debot module. +* TON API version 1.35.0, debot module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/NetModule.cs b/src/TonClient/Modules/NetModule.cs index 5ed5699..24ff074 100644 --- a/src/TonClient/Modules/NetModule.cs +++ b/src/TonClient/Modules/NetModule.cs @@ -6,7 +6,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, net module. +* TON API version 1.35.0, net module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/ProcessingModule.cs b/src/TonClient/Modules/ProcessingModule.cs index 3170f26..8330f97 100644 --- a/src/TonClient/Modules/ProcessingModule.cs +++ b/src/TonClient/Modules/ProcessingModule.cs @@ -5,7 +5,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, processing module. +* TON API version 1.35.0, processing module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/ProofsModule.cs b/src/TonClient/Modules/ProofsModule.cs index 3a58b16..47810de 100644 --- a/src/TonClient/Modules/ProofsModule.cs +++ b/src/TonClient/Modules/ProofsModule.cs @@ -5,7 +5,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, proofs module. +* TON API version 1.35.0, proofs module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/src/TonClient/Modules/TvmModule.cs b/src/TonClient/Modules/TvmModule.cs index 5e15297..cb8e5ff 100644 --- a/src/TonClient/Modules/TvmModule.cs +++ b/src/TonClient/Modules/TvmModule.cs @@ -5,7 +5,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, tvm module. +* TON API version 1.35.0, tvm module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ @@ -54,6 +54,12 @@ public class ExecutionOptions /// [JsonProperty("transaction_lt", NullValueHandling = NullValueHandling.Ignore)] public BigInteger TransactionLt { get; set; } + + /// + /// Overrides standard TVM behaviour. If set to `true` then CHKSIG always will return `true`. + /// + [JsonProperty("chksig_always_succeed", NullValueHandling = NullValueHandling.Ignore)] + public bool? ChksigAlwaysSucceed { get; set; } } public abstract class AccountForExecutor diff --git a/src/TonClient/Modules/UtilsModule.cs b/src/TonClient/Modules/UtilsModule.cs index e3dea1e..e9b8f4f 100644 --- a/src/TonClient/Modules/UtilsModule.cs +++ b/src/TonClient/Modules/UtilsModule.cs @@ -6,7 +6,7 @@ using TonSdk.Modules; /* -* TON API version 1.34.3, utils module. +* TON API version 1.35.0, utils module. * THIS FILE WAS GENERATED AUTOMATICALLY. */ diff --git a/tests/Modules/ClientModuleTests.cs b/tests/Modules/ClientModuleTests.cs index fe31691..bf4c143 100644 --- a/tests/Modules/ClientModuleTests.cs +++ b/tests/Modules/ClientModuleTests.cs @@ -25,7 +25,7 @@ public async Task Should_Return_Version() var result = await _client.Client.VersionAsync(); Assert.NotEmpty(result.Version); Assert.Matches(@"\d+\.\d+\.\d+", result.Version); - Assert.Equal("1.34.3", result.Version); + Assert.Equal("1.35.0", result.Version); } [Fact]