From 802628b97a340c1ede1ef172f6ea9d27f6200f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Wed, 12 Sep 2018 19:07:34 +0800 Subject: [PATCH] 1.0.3 --- NeoContract/CGAS.cs | 2 -- UnitTests/CGASTest.cs | 4 ++-- readme.md | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/NeoContract/CGAS.cs b/NeoContract/CGAS.cs index 2c4af9d..7b73ca1 100644 --- a/NeoContract/CGAS.cs +++ b/NeoContract/CGAS.cs @@ -284,8 +284,6 @@ private static bool Transfer(byte[] from, byte[] to, BigInteger amount, byte[] c throw new InvalidOperationException("The parameters from and to SHOULD be 20-byte addresses."); if (amount <= 0) throw new InvalidOperationException("The parameter amount MUST be greater than 0."); - if (ExecutionEngine.EntryScriptHash.AsBigInteger() != callscript.AsBigInteger()) - return false; if (!IsPayable(to)) return false; if (!Runtime.CheckWitness(from) && from.AsBigInteger() != callscript.AsBigInteger()) /*0.2*/ diff --git a/UnitTests/CGASTest.cs b/UnitTests/CGASTest.cs index 40ef440..3c250b5 100644 --- a/UnitTests/CGASTest.cs +++ b/UnitTests/CGASTest.cs @@ -15,8 +15,8 @@ namespace UnitTests { public static class CGASTest { - static readonly UInt160 SgasAddress = Wallet.ToScriptHash("Ae8AD6Rc3cvQapqttJcUTj9ULfLi2tLHmc"); - static readonly UInt160 ScriptHash = new UInt160("0x505663a29d83663a838eee091249abd167e928f5".Remove(0, 2).HexToBytes().Reverse().ToArray()); + static readonly UInt160 CgasAddress = Wallet.ToScriptHash("AScKxyXmNtEnTLTvbVhNQyTJmgytxhwSnM"); + static readonly UInt160 ScriptHash = new UInt160("0x74f2dc36a68fdc4682034178eb2220729231db76".Remove(0, 2).HexToBytes().Reverse().ToArray()); static readonly UInt160 User = Wallet.ToScriptHash("AJd31a8rYPEBkY1QSxpsGy8mdU4vTYTD4U"); static readonly byte[] UserScript = "2103ad1d70f140d84a90ad4491cdf175fa64bfa9287a006e8cbd8f8db8500b5205baac".HexToBytes(); diff --git a/readme.md b/readme.md index c814970..ed3a609 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,25 @@ # CGAS +## Release Note: + +**1.0.3** pre-release + +Script Hash: 0x74f2dc36a68fdc4682034178eb2220729231db76 + +CGAS Contract Address: AScKxyXmNtEnTLTvbVhNQyTJmgytxhwSnM + +**1.0.2** + +Script Hash: [0x505663a29d83663a838eee091249abd167e928f5](https://neotracker.io/contract/505663a29d83663a838eee091249abd167e928f5) + +CGAS Contract Address: Ae8AD6Rc3cvQapqttJcUTj9ULfLi2tLHmc + +1.0.**1** + +Script Hash: [0x9121e89e8a0849857262d67c8408601b5e8e0524](https://neotracker.io/contract/9121e89e8a0849857262d67c8408601b5e8e0524) + +CGAS Contract Address: AK4LdT5ZXR9DQZjfk5X6Xy79mE8ad8jKAW + [English](#en) [简体中文](#zh)