From 9b42ca1086756f8dfce0a7527291b0852eb74944 Mon Sep 17 00:00:00 2001 From: Paul van Grol Date: Fri, 12 Jul 2024 14:45:15 +0200 Subject: [PATCH 01/10] Update Asset Index to be BigInt --- dotnet-algorand-sdk/V2/Indexer/LookupApi.cs | 10 +++++----- dotnet-algorand-sdk/V2/Indexer/Model/Model.cs | 2 +- dotnet-algorand-sdk/V2/Indexer/SearchApi.cs | 10 +++++----- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs index f504a0fe..ffde10af 100644 --- a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs +++ b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs @@ -16,7 +16,7 @@ namespace Algorand.V2.Indexer { using System = global::System; using Algorand.V2.Indexer.Model; - + using System.Numerics; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.5.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))")] public partial interface ILookupApi @@ -116,13 +116,13 @@ public partial interface ILookupApi /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all); + System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken); /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// Maximum number of results to return. There could be additional pages even if the limit is not reached. @@ -786,7 +786,7 @@ public async System.Threading.Tasks.Task LogsAsync(int application_id /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - public System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all) + public System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all) { return AssetsAsync(asset_id, include_all, System.Threading.CancellationToken.None); } @@ -795,7 +795,7 @@ public System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? in /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - public async System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken) { if (asset_id == null) throw new System.ArgumentNullException("asset_id"); diff --git a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs index e8e8c2a7..04a2154b 100644 --- a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs +++ b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs @@ -342,7 +342,7 @@ public partial class Asset { /// unique asset identifier [Newtonsoft.Json.JsonProperty("index")] //, Required = Newtonsoft.Json.Required.Always)] - public int Index { get; set; } + public BigInteger Index { get; set; } /// Whether or not this asset is currently deleted. [Newtonsoft.Json.JsonProperty("deleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] diff --git a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs index af0e6adf..8050b52a 100644 --- a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs +++ b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs @@ -16,7 +16,7 @@ namespace Algorand.V2.Indexer { using System = global::System; using Algorand.V2.Indexer.Model; - + using System.Numerics; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.5.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))")] public partial interface ISearchApi @@ -74,7 +74,7 @@ public partial interface ISearchApi /// Asset ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id); + System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. @@ -86,7 +86,7 @@ public partial interface ISearchApi /// Asset ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id, System.Threading.CancellationToken cancellationToken); /// Maximum number of results to return. There could be additional pages even if the limit is not reached. /// The next page of results. Use the next token provided by the previous results. @@ -442,7 +442,7 @@ public async System.Threading.Tasks.Task ApplicationsAsync(int? appli /// Asset ID /// (empty) /// A server side error occurred. - public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id) + public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id) { return AssetsAsync(include_all, limit, next, creator, name, unit, asset_id, System.Threading.CancellationToken.None); } @@ -457,7 +457,7 @@ public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int /// Asset ID /// (empty) /// A server side error occurred. - public async System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/assets?"); diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index 4a72c335..b880816e 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta13 + 0.2.2.0-beta14 Riley Ge Tson Tec Algorand .NET SDK From f09e192798767da73b891efefa31fc862b180a45 Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Fri, 12 Jul 2024 21:01:32 +0200 Subject: [PATCH 02/10] Update Algorand .NET SDK to 0.2.2.0-beta15 Updated the Algorand .NET SDK version from 0.2.2.0-beta14 to 0.2.2.0-beta15 to incorporate the latest features and bug fixes. --- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index b880816e..26b318ad 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta14 + 0.2.2.0-beta15 Riley Ge Tson Tec Algorand .NET SDK From 7117e4aacf44cf539a0337db7ffbc2cc384610fa Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Fri, 12 Jul 2024 22:05:04 +0200 Subject: [PATCH 03/10] Update Algorand .NET SDK to 0.2.2.0-beta16 Updated the Algorand .NET SDK version from 0.2.2.0-beta15 to 0.2.2.0-beta16 to incorporate the latest features and bug fixes. --- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index 26b318ad..fb7cc629 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta15 + 0.2.2.0-beta16 Riley Ge Tson Tec Algorand .NET SDK From 02f8283250d51ac4640382f3731c54c5b1520e06 Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Mon, 15 Jul 2024 14:07:27 +0200 Subject: [PATCH 04/10] Update asset_id param type to ulong in SearchApi Changed the parameter type for `asset_id` from `int?` to `ulong?` in the `AccountsAsync` and `TransactionsAsync` methods within the `SearchApi.cs` file, affecting both overloads of each method in the `Algorand.V2.Indexer` namespace. --- dotnet-algorand-sdk/V2/Indexer/SearchApi.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs index 8050b52a..26f5018b 100644 --- a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs +++ b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs @@ -32,7 +32,7 @@ public partial interface ISearchApi /// Application ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id); + System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Asset ID @@ -46,7 +46,7 @@ public partial interface ISearchApi /// Application ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken); /// Application ID /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. @@ -111,7 +111,7 @@ public partial interface ISearchApi /// Application ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id); + System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Maximum number of results to return. There could be additional pages even if the limit is not reached. @@ -137,7 +137,7 @@ public partial interface ISearchApi /// Application ID /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken); } @@ -186,7 +186,7 @@ public string BaseUrl /// Application ID /// (empty) /// A server side error occurred. - public System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id) + public System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id) { return AccountsAsync(asset_id, limit, next, currency_greater_than, include_all, currency_less_than, auth_addr, round, application_id, System.Threading.CancellationToken.None); } @@ -203,7 +203,7 @@ public System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? l /// Application ID /// (empty) /// A server side error occurred. - public async System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/accounts?"); @@ -593,7 +593,7 @@ public async System.Threading.Tasks.Task AssetsAsync(bool? include_al /// Application ID /// (empty) /// A server side error occurred. - public System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id) + public System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id) { return TransactionsAsync(limit, next, note_prefix, tx_type, sig_type, txid, round, min_round, max_round, asset_id, before_time, after_time, currency_greater_than, currency_less_than, address, address_role, exclude_close_to, rekey_to, application_id, System.Threading.CancellationToken.None); } @@ -622,7 +622,7 @@ public System.Threading.Tasks.Task TransactionsAsync(int? limit, stri /// Application ID /// (empty) /// A server side error occurred. - public async System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/transactions?"); From d20b6a0d32af3b2705dd10f32d8b1724b64c1dff Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Mon, 15 Jul 2024 14:08:02 +0200 Subject: [PATCH 05/10] Update Algorand .NET SDK to 0.2.2.0-beta17 Updated the Algorand .NET SDK version from 0.2.2.0-beta16 to 0.2.2.0-beta17 to incorporate the latest features and bug fixes. --- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index fb7cc629..ab127eea 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta16 + 0.2.2.0-beta17 Riley Ge Tson Tec Algorand .NET SDK From 6322583276794aabf987f659eb697695091fe712 Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Thu, 18 Jul 2024 11:56:06 +0200 Subject: [PATCH 06/10] Refine MetadataHash validation in Utils.cs Removed the automatic generation of `asset.MetadataHash` in the Algorand namespace within Utils.cs. Now, the validation logic only allows a `MetadataHash` that is exactly 32 bytes long and throws an exception for any other length, ensuring that a valid hash must be explicitly provided. --- dotnet-algorand-sdk/Util/Utils.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dotnet-algorand-sdk/Util/Utils.cs b/dotnet-algorand-sdk/Util/Utils.cs index bfa3e577..f02ce139 100644 --- a/dotnet-algorand-sdk/Util/Utils.cs +++ b/dotnet-algorand-sdk/Util/Utils.cs @@ -635,9 +635,7 @@ private static void ValidateAsset(V2.Algod.Model.AssetParams asset) if (asset.Clawback is null) asset.Clawback = asset.Manager; else if (asset.Clawback != "" && !Address.IsValid(asset.Clawback)) throw new ArgumentException("The clawback address is not valid."); - if (asset.MetadataHash is null || asset.MetadataHash.Length == 0) - asset.MetadataHash = Encoding.UTF8.GetBytes(GetRandomAssetMetaHash());//auto generate metahash by sdk - else if (asset.MetadataHash.Length != 32) + if (asset.MetadataHash is not null && asset.MetadataHash.Length != 32) throw new ArgumentException("The metadata hash should be 32 bytes."); if (asset.DefaultFrozen is null) asset.DefaultFrozen = false; From 650e939ab4d251325ab357a9530bcaa876eaadd8 Mon Sep 17 00:00:00 2001 From: Raymen Scholten Date: Thu, 18 Jul 2024 11:56:16 +0200 Subject: [PATCH 07/10] Update Algorand .NET SDK to 0.2.2.0-beta18 Updated the Algorand .NET SDK version from 0.2.2.0-beta17 to 0.2.2.0-beta18 to incorporate the latest features and bug fixes. --- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index ab127eea..ab72f1fe 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta17 + 0.2.2.0-beta18 Riley Ge Tson Tec Algorand .NET SDK From 07e83b108776074ef5563b5e209b6b843aa9ae4f Mon Sep 17 00:00:00 2001 From: Paul van Grol Date: Tue, 8 Oct 2024 14:09:38 +0200 Subject: [PATCH 08/10] Update AssetTotal to be BigInteger --- dotnet-algorand-sdk/Transaction.cs | 9 +++++---- dotnet-algorand-sdk/V2/Algod/Model/Model.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dotnet-algorand-sdk/Transaction.cs b/dotnet-algorand-sdk/Transaction.cs index 92e582df..6b709dcc 100644 --- a/dotnet-algorand-sdk/Transaction.cs +++ b/dotnet-algorand-sdk/Transaction.cs @@ -4,6 +4,7 @@ using System.Text; using System.Linq; using System.Collections.Generic; +using System.Numerics; namespace Algorand { @@ -311,7 +312,7 @@ public Transaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastVal /// account which can freeze or unfreeze holder accounts /// account which can issue clawbacks against holder accounts private Transaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastValid, byte[] note, - string genesisID, Digest genesisHash, ulong? assetTotal, int assetDecimals, bool defaultFrozen, + string genesisID, Digest genesisHash, BigInteger? assetTotal, int assetDecimals, bool defaultFrozen, string assetUnitName, string assetName, string url, byte[] metadataHash, Address manager, Address reserve, Address freeze, Address clawback) { @@ -578,7 +579,7 @@ private Transaction(Type type, /// account which can issue clawbacks against holder accounts /// public static Transaction CreateAssetCreateTransaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastValid, byte[] note, - string genesisID, Digest genesisHash, ulong? assetTotal, int assetDecimals, bool defaultFrozen, + string genesisID, Digest genesisHash, BigInteger? assetTotal, int assetDecimals, bool defaultFrozen, string assetUnitName, string assetName, string url, byte[] metadataHash, Address manager, Address reserve, Address freeze, Address clawback) { @@ -1059,7 +1060,7 @@ public class AssetParams /// [JsonProperty(PropertyName = "t")] [DefaultValue(0)] - public ulong? assetTotal = 0; + public BigInteger? assetTotal = 0; /// /// Decimals specifies the number of digits to display after the decimal @@ -1131,7 +1132,7 @@ public class AssetParams public Address assetClawback = new Address(); public AssetParams( - ulong? assetTotal, + BigInteger? assetTotal, int assetDecimals, bool defaultFrozen, string assetUnitName, diff --git a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs index f7c420cd..682479a2 100644 --- a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs +++ b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs @@ -233,7 +233,7 @@ public partial class AssetParams /// \[t\] The total number of units of this asset. [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] - public ulong? Total { get; set; } + public BigInteger? Total { get; set; } /// \[un\] Name of a unit of this asset, as supplied by the creator. Included only when the name of a unit of this asset is composed of printable utf-8 characters. [Newtonsoft.Json.JsonProperty("unit-name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] From 07d76fb9deaf26bbbe3c6eedf8c27be949b1b603 Mon Sep 17 00:00:00 2001 From: Paul van Grol Date: Tue, 8 Oct 2024 14:11:55 +0200 Subject: [PATCH 09/10] Update to beta 19 --- dotnet-algorand-sdk/dotnet-algorand-sdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj index ab72f1fe..90ee523a 100644 --- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj +++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj @@ -6,7 +6,7 @@ Algorand true true - 0.2.2.0-beta18 + 0.2.2.0-beta19 Riley Ge Tson Tec Algorand .NET SDK From 2e69cccec5aecb4a0bd9c03155d4d3cfc3ab3f23 Mon Sep 17 00:00:00 2001 From: Paul van Grol Date: Tue, 8 Oct 2024 14:14:02 +0200 Subject: [PATCH 10/10] Change all assetIds to be ulong --- dotnet-algorand-sdk/V2/Algod/Model/Model.cs | 4 ++-- dotnet-algorand-sdk/V2/Indexer/LookupApi.cs | 8 ++++---- dotnet-algorand-sdk/V2/Indexer/Model/Model.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs index 682479a2..00919820 100644 --- a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs +++ b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs @@ -149,7 +149,7 @@ public partial class Asset { /// unique asset identifier [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Always)] - public BigInteger Index { get; set; } + public ulong Index { get; set; } [Newtonsoft.Json.JsonProperty("params", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] @@ -171,7 +171,7 @@ public partial class AssetHolding /// Asset ID of the holding. [Newtonsoft.Json.JsonProperty("asset-id", Required = Newtonsoft.Json.Required.Always)] - public BigInteger AssetId { get; set; } + public ulong AssetId { get; set; } /// \[f\] whether or not the holding is frozen. [Newtonsoft.Json.JsonProperty("is-frozen", Required = Newtonsoft.Json.Required.Always)] diff --git a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs index ffde10af..df7e5db9 100644 --- a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs +++ b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs @@ -116,13 +116,13 @@ public partial interface ILookupApi /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all); + System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken); /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// Maximum number of results to return. There could be additional pages even if the limit is not reached. @@ -786,7 +786,7 @@ public async System.Threading.Tasks.Task LogsAsync(int application_id /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - public System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all) + public System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all) { return AssetsAsync(asset_id, include_all, System.Threading.CancellationToken.None); } @@ -795,7 +795,7 @@ public System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, b /// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. /// (empty) /// A server side error occurred. - public async System.Threading.Tasks.Task AssetsAsync(BigInteger asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken) { if (asset_id == null) throw new System.ArgumentNullException("asset_id"); diff --git a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs index 04a2154b..6fad0675 100644 --- a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs +++ b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs @@ -342,7 +342,7 @@ public partial class Asset { /// unique asset identifier [Newtonsoft.Json.JsonProperty("index")] //, Required = Newtonsoft.Json.Required.Always)] - public BigInteger Index { get; set; } + public ulong Index { get; set; } /// Whether or not this asset is currently deleted. [Newtonsoft.Json.JsonProperty("deleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1132,7 +1132,7 @@ public partial class TransactionAssetTransfer /// \[xaid\] ID of the asset being transferred. [Newtonsoft.Json.JsonProperty("asset-id")] //, Required = Newtonsoft.Json.Required.Always)] - public BigInteger AssetId { get; set; } + public ulong AssetId { get; set; } /// Number of assets transfered to the close-to account as part of the transaction. [Newtonsoft.Json.JsonProperty("close-amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]