From 31baa43eb012dc7c9423f16b6c690739c111cf30 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Thu, 29 Aug 2024 03:05:39 +0200 Subject: [PATCH 01/10] [Models/Extrinsic] fix `ChargeAssetTxPayment` type, but extrinsics tests fail still --- Substrate.NetApi.Test/Extrinsic/PayloadTest.cs | 3 ++- .../Extrinsic/SignedExtensionsTest.cs | 3 ++- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 4 ++-- .../Model/Extrinsics/ChargeAssetTxPayment.cs | 10 ++++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs index a3e375d..f3e4336 100644 --- a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs @@ -3,6 +3,7 @@ using Substrate.NetApi.Model.Extrinsics; using Substrate.NetApi.Model.Types.Base; using NUnit.Framework; +using Substrate.NetApi.Model.Types.Primitive; namespace Substrate.NetApi.Test.Extrinsic { @@ -52,7 +53,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, 0); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); diff --git a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs index c3aa7db..1eb57b4 100644 --- a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs @@ -2,6 +2,7 @@ using Substrate.NetApi.Model.Extrinsics; using Substrate.NetApi.Model.Types.Base; using NUnit.Framework; +using Substrate.NetApi.Model.Types.Primitive; namespace Substrate.NetApi.Test.Extrinsic { @@ -36,7 +37,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, 0); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 2530a34..1951cd2 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -19,7 +19,7 @@ public class ExtrinsicsTest public MiniSecret MiniSecretBob => new MiniSecret(Utils.HexToByteArray("0x398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89"), ExpandMode.Ed25519); public Account Bob => Account.Build(KeyType.Sr25519, MiniSecretBob.ExpandToSecret().ToEd25519Bytes(), MiniSecretBob.GetPair().Public.Key); - protected const string WebSocketUrl = "ws://127.0.0.1:9999"; + protected const string WebSocketUrl = "wss://rpc-paseo.ajuna.network"; protected SubstrateClient _substrateClient; @@ -40,7 +40,7 @@ public async Task CloseAsync() [OneTimeSetUp] public async Task SetupAsync() { - _chargeType = ChargeTransactionPayment.Default(); + _chargeType = ChargeAssetTxPayment.Default(); _substrateClient = new SubstrateClient(new Uri(WebSocketUrl), _chargeType); try diff --git a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs index 38ee08f..1aae184 100644 --- a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs +++ b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Substrate.NetApi.Model.Types.Base; +using Substrate.NetApi.Model.Types.Primitive; namespace Substrate.NetApi.Model.Extrinsics { @@ -15,14 +16,14 @@ public abstract class ChargeType : BaseType public class ChargeAssetTxPayment : ChargeType { private CompactInteger _tip; - private CompactInteger _assetId; + private BaseOpt _assetId; /// /// Charge Asset Tx Payment Constructor /// /// /// - public ChargeAssetTxPayment(CompactInteger tip, CompactInteger asset) + public ChargeAssetTxPayment(CompactInteger tip, BaseOpt asset) { _tip = tip; _assetId = asset; @@ -46,7 +47,8 @@ public override byte[] Encode() public override void Decode(byte[] byteArray, ref int p) { _tip = CompactInteger.Decode(byteArray, ref p); - _assetId = CompactInteger.Decode(byteArray, ref p); + _assetId = new BaseOpt(); + _assetId.Decode(byteArray, ref p); } /// @@ -55,7 +57,7 @@ public override void Decode(byte[] byteArray, ref int p) /// public static ChargeAssetTxPayment Default() { - return new ChargeAssetTxPayment(0, 0); + return new ChargeAssetTxPayment(0, new BaseOpt()); } } From d187623fde9808e2dddb011e54787dd8b7baf10c Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:40:53 +0200 Subject: [PATCH 02/10] fix charge asset tx payment extension types in tests. --- Substrate.NetApi.Test/Extrinsic/PayloadTest.cs | 2 +- Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs index f3e4336..a51390c 100644 --- a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs @@ -53,7 +53,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); diff --git a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs index 1eb57b4..8723ddd 100644 --- a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs @@ -37,7 +37,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); From fa1ca0c8253b77ef62dd4e9b7a2d6e070c20548f Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 31 Aug 2024 04:50:43 +0200 Subject: [PATCH 03/10] Properly define the signed extension --- .../Extrinsic/PayloadTest.cs | 2 +- .../Extrinsic/SignedExtensionsTest.cs | 2 +- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 3 +- .../Model/Extrinsics/ChargeAssetTxPayment.cs | 54 ++++++++++++++++--- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs index a51390c..a9a961b 100644 --- a/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/PayloadTest.cs @@ -53,7 +53,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); diff --git a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs index 8723ddd..9ed4e62 100644 --- a/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs +++ b/Substrate.NetApi.Test/Extrinsic/SignedExtensionsTest.cs @@ -37,7 +37,7 @@ public void EncodeExtraTest() var startEra = new Hash(); startEra.Create(blockHash); - var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); + var assetTxPayment = new ChargeAssetTxPayment(0, new BaseOpt()); var signedExtensions = new SignedExtensions(259, 1, genesis, startEra, era, 0, assetTxPayment); diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 1951cd2..ab0b9dd 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -73,6 +73,7 @@ public async Task Extrinsic_SubmitAndWatchExtrinsicAsync() { var iType = new BaseVec(new U8[] { (U8)0x04, (U8)0xFF }); + var assetCharge = ChargeAssetTxPayment.NewWithAsset(0, new I32(0)); var method = new Method(0, "System", 0, "remark", new IType[] { iType }); var taskCompletionSource = new TaskCompletionSource<(bool, Hash)>(); @@ -92,7 +93,7 @@ await _substrateClient.Author.SubmitAndWatchExtrinsicAsync((string subscriptionI Assert.Fail("Extrinsic was invalid!"); break; } - }, method, Alice, _chargeType, 64, CancellationToken.None); + }, method, Alice, assetCharge, 64, CancellationToken.None); var finished = await Task.WhenAny(taskCompletionSource.Task, Task.Delay(TimeSpan.FromMinutes(1))); Assert.AreEqual(taskCompletionSource.Task, finished, "Test timed out waiting for final callback"); diff --git a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs index 1aae184..ded1410 100644 --- a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs +++ b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs @@ -8,7 +8,31 @@ namespace Substrate.NetApi.Model.Extrinsics /// Charge Type /// public abstract class ChargeType : BaseType - { } + { + } + + /// + /// Asset Identifier for AssetHubs and the Ajuna Chain. + /// + public enum NativeOrWithId + { + /// + /// Native token. However, in the `ChargeAssetTxPayment` this is unused, as the none implies the Native asset. + /// + Native = 0, + /// + /// Some asset with a corresponding asset should be used for payment. + /// + WithId = 1, + } + + /// + /// Asset Identifier for AssetHubs and the Ajuna Chain. + /// + public sealed class EnumNativeOrWithId : BaseEnumExt + { + } + /// /// Charge Asset Tx Payment @@ -16,17 +40,17 @@ public abstract class ChargeType : BaseType public class ChargeAssetTxPayment : ChargeType { private CompactInteger _tip; - private BaseOpt _assetId; + private BaseOpt _assetId; /// /// Charge Asset Tx Payment Constructor /// /// - /// - public ChargeAssetTxPayment(CompactInteger tip, BaseOpt asset) + /// + public ChargeAssetTxPayment(CompactInteger tip, BaseOpt assetId) { _tip = tip; - _assetId = asset; + _assetId = assetId; } /// @@ -37,7 +61,7 @@ public override byte[] Encode() // Tip bytes.AddRange(_tip.Encode()); - // Asset Id + // AssetId bytes.AddRange(_assetId.Encode()); return bytes.ToArray(); @@ -47,7 +71,7 @@ public override byte[] Encode() public override void Decode(byte[] byteArray, ref int p) { _tip = CompactInteger.Decode(byteArray, ref p); - _assetId = new BaseOpt(); + _assetId = new BaseOpt(); _assetId.Decode(byteArray, ref p); } @@ -57,7 +81,21 @@ public override void Decode(byte[] byteArray, ref int p) /// public static ChargeAssetTxPayment Default() { - return new ChargeAssetTxPayment(0, new BaseOpt()); + return new ChargeAssetTxPayment(0, new BaseOpt()); + } + + /// + /// Defines extrinsic payment with the asset id + /// + /// + /// + /// + public static ChargeAssetTxPayment NewWithAsset(CompactInteger tip, I32 assetId) + { + var asset = new EnumNativeOrWithId(); + asset.Create(NativeOrWithId.WithId, assetId); + + return new ChargeAssetTxPayment(tip, new BaseOpt(asset)); } } From 116b50910ec068ba47c0a88cb205097934375586 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:17:23 +0200 Subject: [PATCH 04/10] Add debug messages to ExtrinsicsTest.cs --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index ab0b9dd..78f98bd 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -7,6 +7,7 @@ using Substrate.NetApi.Model.Types.Base; using Substrate.NetApi.Model.Types.Primitive; using System; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; @@ -79,6 +80,8 @@ public async Task Extrinsic_SubmitAndWatchExtrinsicAsync() var taskCompletionSource = new TaskCompletionSource<(bool, Hash)>(); await _substrateClient.Author.SubmitAndWatchExtrinsicAsync((string subscriptionId, ExtrinsicStatus extrinsicUpdate) => { + Debug.WriteLine($"ExtrinsicUpdate: {extrinsicUpdate.ExtrinsicState}"); + switch (extrinsicUpdate.ExtrinsicState) { case ExtrinsicState.Finalized: @@ -112,6 +115,8 @@ public async Task Extrinsic_TransactionV1SubmitAndWatchAsync() _ = await _substrateClient.TransactionWatchCalls.TransactionWatchV1SubmitAndWatchAsync( (subscriptionId, extrinsicUpdate) => { + Debug.WriteLine($"ExtrinsicUpdate: {extrinsicUpdate.TransactionEvent.ToString()}"); + switch (extrinsicUpdate.TransactionEvent) { case TransactionEvent.Finalized: From aa01b0d26458be4b274d915f4dc868d708d002f5 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:22:51 +0200 Subject: [PATCH 05/10] revert test node address to local node in ExtrinsicsTest.cs --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 78f98bd..d7747f1 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -20,7 +20,7 @@ public class ExtrinsicsTest public MiniSecret MiniSecretBob => new MiniSecret(Utils.HexToByteArray("0x398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89"), ExpandMode.Ed25519); public Account Bob => Account.Build(KeyType.Sr25519, MiniSecretBob.ExpandToSecret().ToEd25519Bytes(), MiniSecretBob.GetPair().Public.Key); - protected const string WebSocketUrl = "wss://rpc-paseo.ajuna.network"; + protected const string WebSocketUrl = "ws://127.0.0.1:9944"; protected SubstrateClient _substrateClient; From 9f084b3a6a49ef586beee03836e75d61e4f2c0cb Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:23:42 +0200 Subject: [PATCH 06/10] fix assert message --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index d7747f1..2b53b79 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -20,7 +20,7 @@ public class ExtrinsicsTest public MiniSecret MiniSecretBob => new MiniSecret(Utils.HexToByteArray("0x398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89"), ExpandMode.Ed25519); public Account Bob => Account.Build(KeyType.Sr25519, MiniSecretBob.ExpandToSecret().ToEd25519Bytes(), MiniSecretBob.GetPair().Public.Key); - protected const string WebSocketUrl = "ws://127.0.0.1:9944"; + protected const string WebSocketUrl = "ws://127.0.0.1:9999"; protected SubstrateClient _substrateClient; @@ -51,7 +51,7 @@ public async Task SetupAsync() catch (Exception ex) { Console.WriteLine($"Failed to connect to Substrate node: {ex.Message}"); - Assert.Ignore("Skipped test because no active Substrate node was found on 127.0.0.1:9944"); + Assert.Ignore("Skipped test because no active Substrate node was found on 127.0.0.1:9999"); } } From fbd69ec988f09aad7fd0657ebbb98b6033c3bc79 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:29:02 +0200 Subject: [PATCH 07/10] [ExtrinsicTest] add comment about non-native tx payment --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 2b53b79..011dc3e 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -74,6 +74,7 @@ public async Task Extrinsic_SubmitAndWatchExtrinsicAsync() { var iType = new BaseVec(new U8[] { (U8)0x04, (U8)0xFF }); + // Pay in with the asset with asset id one, e.g. DOT on Ajuna Polkadot or PAS on Ajuna Paseo. var assetCharge = ChargeAssetTxPayment.NewWithAsset(0, new I32(0)); var method = new Method(0, "System", 0, "remark", new IType[] { iType }); From 2fb2e2f886623de20cb944559842fe8e1696c700 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sun, 1 Sep 2024 03:46:17 +0200 Subject: [PATCH 08/10] Fix test doc --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 011dc3e..763c434 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -66,7 +66,7 @@ public async Task TearDownAsync() } /// - /// Extrinsic Submit And Watch + /// Extrinsic Submit And Watch with non-native payment. /// /// [Test] @@ -74,7 +74,7 @@ public async Task Extrinsic_SubmitAndWatchExtrinsicAsync() { var iType = new BaseVec(new U8[] { (U8)0x04, (U8)0xFF }); - // Pay in with the asset with asset id one, e.g. DOT on Ajuna Polkadot or PAS on Ajuna Paseo. + // Pay with a non-native asset with `assetId=0`, e.g. DOT on Ajuna Polkadot or PAS on Ajuna Paseo. var assetCharge = ChargeAssetTxPayment.NewWithAsset(0, new I32(0)); var method = new Method(0, "System", 0, "remark", new IType[] { iType }); From 420ff339c6752f33d6072bd885e75922260eacb6 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:22:07 +0200 Subject: [PATCH 09/10] Fix: Charge assetId is U32 instead of I32 --- Substrate.NetApi.TestNode/ExtrinsicsTest.cs | 3 +-- Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs index 763c434..9c6cd8b 100644 --- a/Substrate.NetApi.TestNode/ExtrinsicsTest.cs +++ b/Substrate.NetApi.TestNode/ExtrinsicsTest.cs @@ -1,5 +1,4 @@ using NUnit.Framework; -using NUnit.Framework.Internal; using Substrate.NET.Schnorrkel.Keys; using Substrate.NetApi.Model.Extrinsics; using Substrate.NetApi.Model.Rpc; @@ -75,7 +74,7 @@ public async Task Extrinsic_SubmitAndWatchExtrinsicAsync() var iType = new BaseVec(new U8[] { (U8)0x04, (U8)0xFF }); // Pay with a non-native asset with `assetId=0`, e.g. DOT on Ajuna Polkadot or PAS on Ajuna Paseo. - var assetCharge = ChargeAssetTxPayment.NewWithAsset(0, new I32(0)); + var assetCharge = ChargeAssetTxPayment.NewWithAsset(0, new U32(0)); var method = new Method(0, "System", 0, "remark", new IType[] { iType }); var taskCompletionSource = new TaskCompletionSource<(bool, Hash)>(); diff --git a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs index ded1410..8957132 100644 --- a/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs +++ b/Substrate.NetApi/Model/Extrinsics/ChargeAssetTxPayment.cs @@ -29,7 +29,7 @@ public enum NativeOrWithId /// /// Asset Identifier for AssetHubs and the Ajuna Chain. /// - public sealed class EnumNativeOrWithId : BaseEnumExt + public sealed class EnumNativeOrWithId : BaseEnumExt { } @@ -90,7 +90,7 @@ public static ChargeAssetTxPayment Default() /// /// /// - public static ChargeAssetTxPayment NewWithAsset(CompactInteger tip, I32 assetId) + public static ChargeAssetTxPayment NewWithAsset(CompactInteger tip, U32 assetId) { var asset = new EnumNativeOrWithId(); asset.Create(NativeOrWithId.WithId, assetId); From 790616beb45370d456868efe6c8f10dcdec20f9b Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:24:37 +0200 Subject: [PATCH 10/10] bump version to v0.9.24-rc2 --- Substrate.NetApi/Substrate.NetApi.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Substrate.NetApi/Substrate.NetApi.csproj b/Substrate.NetApi/Substrate.NetApi.csproj index 9128034..c9f35d0 100644 --- a/Substrate.NetApi/Substrate.NetApi.csproj +++ b/Substrate.NetApi/Substrate.NetApi.csproj @@ -3,7 +3,7 @@ Substrate.NET.API netstandard2.0;netstandard2.1;net6.0 - 0.9.24-rc1 + 0.9.24-rc2 Substrate Gaming Substrate Gaming true