From 1ebd8ef082fcf71c9f506991c5bf0450dc811c9b Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Wed, 2 Dec 2020 10:47:40 +0800
Subject: [PATCH 1/3] Sync to https://github.com/neo-project/neo/pull/2096
---
neo-cli/CLI/MainService.NEP5.cs | 5 +++--
neo-cli/CLI/MainService.Wallet.cs | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/neo-cli/CLI/MainService.NEP5.cs b/neo-cli/CLI/MainService.NEP5.cs
index 04099184e..78602fb4a 100644
--- a/neo-cli/CLI/MainService.NEP5.cs
+++ b/neo-cli/CLI/MainService.NEP5.cs
@@ -20,7 +20,7 @@ partial class MainService
/// From
/// Signer's accounts
[ConsoleCommand("transfer", Category = "NEP5 Commands")]
- private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, UInt160 from = null, UInt160[] signersAccounts = null)
+ private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, string data, UInt160 from = null, UInt160[] signersAccounts = null)
{
var asset = new AssetDescriptor(tokenHash);
var value = BigDecimal.Parse(amount.ToString(CultureInfo.InvariantCulture), asset.Decimals);
@@ -36,7 +36,8 @@ private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, UI
{
AssetId = tokenHash,
Value = value,
- ScriptHash = to
+ ScriptHash = to,
+ Data = data
}
}, from: from, cosigners: signersAccounts?.Select(p => new Signer
{
diff --git a/neo-cli/CLI/MainService.Wallet.cs b/neo-cli/CLI/MainService.Wallet.cs
index f557aa846..8d3cb72d0 100644
--- a/neo-cli/CLI/MainService.Wallet.cs
+++ b/neo-cli/CLI/MainService.Wallet.cs
@@ -450,7 +450,7 @@ private void OnSignCommand(JObject jsonObjectToSign)
/// From
/// Signer's accounts
[ConsoleCommand("send", Category = "Wallet Commands")]
- private void OnSendCommand(UInt160 asset, UInt160 to, string amount, UInt160 from = null, UInt160[] signerAccounts = null)
+ private void OnSendCommand(UInt160 asset, UInt160 to, string amount, string data = null, UInt160 from = null, UInt160[] signerAccounts = null)
{
if (NoWallet()) return;
string password = ReadUserInput("password", true);
@@ -480,7 +480,8 @@ private void OnSendCommand(UInt160 asset, UInt160 to, string amount, UInt160 fro
{
AssetId = asset,
Value = decimalAmount,
- ScriptHash = to
+ ScriptHash = to,
+ Data = data
}
}, from: from, cosigners: signerAccounts?.Select(p => new Signer
{
From f8f16089db04c0ccea8e092b8c2ddc9c129f26bc Mon Sep 17 00:00:00 2001
From: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Date: Wed, 2 Dec 2020 16:22:13 +0800
Subject: [PATCH 2/3] Update neo-cli/CLI/MainService.NEP5.cs
Co-authored-by: Shargon
---
neo-cli/CLI/MainService.NEP5.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/neo-cli/CLI/MainService.NEP5.cs b/neo-cli/CLI/MainService.NEP5.cs
index 78602fb4a..6801c7590 100644
--- a/neo-cli/CLI/MainService.NEP5.cs
+++ b/neo-cli/CLI/MainService.NEP5.cs
@@ -20,7 +20,7 @@ partial class MainService
/// From
/// Signer's accounts
[ConsoleCommand("transfer", Category = "NEP5 Commands")]
- private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, string data, UInt160 from = null, UInt160[] signersAccounts = null)
+ private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, string data = null, UInt160 from = null, UInt160[] signersAccounts = null)
{
var asset = new AssetDescriptor(tokenHash);
var value = BigDecimal.Parse(amount.ToString(CultureInfo.InvariantCulture), asset.Decimals);
From aa59fcd0fae47bf465453aa6c9357d6b07cb60d3 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Thu, 3 Dec 2020 10:25:45 +0800
Subject: [PATCH 3/3] update to 3.0.0-CI01091
---
neo-cli/neo-cli.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/neo-cli/neo-cli.csproj b/neo-cli/neo-cli.csproj
index aa3950e85..1aeca3965 100644
--- a/neo-cli/neo-cli.csproj
+++ b/neo-cli/neo-cli.csproj
@@ -28,7 +28,7 @@
-
+