diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactory.csproj b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactory.csproj index 6e12954..99c8955 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactory.csproj +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactory.csproj @@ -1,15 +1,16 @@  - net6.0 + net8.0 - - + - + + + diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Admin.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Admin.cs index 5656225..5d13158 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Admin.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Admin.cs @@ -1,8 +1,6 @@ -using Neo; -using Neo.SmartContract.Framework; +using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; -using Neo.SmartContract.Framework.Attributes; namespace FlamingoSwapFactory { @@ -10,9 +8,8 @@ public partial class FlamingoSwapFactoryContract { #region Admin -#warning 检查此处的 Admin 地址是否为最新地址 - [InitialValue("NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE", Neo.SmartContract.ContractParameterType.Hash160)] - static readonly UInt160 superAdmin = default; +#warning Check if the admin here is the latest! + static readonly UInt160 superAdmin = "NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE"; const string AdminKey = nameof(superAdmin); // When this contract address is included in the transaction signature, diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Event.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Event.cs index cb14534..e248fdf 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Event.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Event.cs @@ -1,5 +1,5 @@ -using System.ComponentModel; -using Neo; +using Neo.SmartContract.Framework; +using System.ComponentModel; namespace FlamingoSwapFactory { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Helper.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Helper.cs index fb4409a..e930f37 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Helper.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.Helper.cs @@ -1,7 +1,7 @@ -using System.Numerics; -using Neo.SmartContract.Framework; -using Neo.SmartContract.Framework.Services; +using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Attributes; +using Neo.SmartContract.Framework.Services; +using System.Numerics; namespace FlamingoSwapFactory { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.cs index 77370db..5164b1e 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/FlamingoSwapFactoryContract.cs @@ -1,10 +1,9 @@ -using System.ComponentModel; -using FlamingoSwapFactory.Models; -using Neo; +using FlamingoSwapFactory.Models; using Neo.SmartContract.Framework; +using Neo.SmartContract.Framework.Attributes; using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; -using Neo.SmartContract.Framework.Attributes; +using System.ComponentModel; namespace FlamingoSwapFactory { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/ExchangePair.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/ExchangePair.cs index 7edb43a..2c12bc9 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/ExchangePair.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/ExchangePair.cs @@ -1,4 +1,4 @@ -using Neo; +using Neo.SmartContract.Framework; namespace FlamingoSwapFactory.Models { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/KeyValue.cs b/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/KeyValue.cs index 9638d48..5117bca 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/KeyValue.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapFactory/Models/KeyValue.cs @@ -1,4 +1,4 @@ -using Neo; +using Neo.SmartContract.Framework; namespace FlamingoSwapFactory.Models { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBook.csproj b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBook.csproj index ec0abe1..c64fef1 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBook.csproj +++ b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBook.csproj @@ -1,12 +1,13 @@  - - net6.0 - - - - - - - - + + net8.0 + + + + + + + + + \ No newline at end of file diff --git a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBookContract.Admin.cs b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBookContract.Admin.cs index a2ad05c..ba1e1c6 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBookContract.Admin.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/FlamingoSwapOrderBookContract.Admin.cs @@ -1,6 +1,4 @@ -using Neo; -using Neo.SmartContract; -using Neo.SmartContract.Framework; +using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Attributes; using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; @@ -12,14 +10,11 @@ public partial class FlamingoSwapOrderBookContract #region Admin #warning Update the admin address if necessary - [InitialValue("NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE", ContractParameterType.Hash160)] - static readonly UInt160 superAdmin = default; + static readonly UInt160 superAdmin = "NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE"; - [InitialValue("0xc0695bdb8a87a40aff33c73ff6349ccc05fa9f01", ContractParameterType.Hash160)] - static readonly UInt160 Factory = default; + static readonly UInt160 Factory = "0xc0695bdb8a87a40aff33c73ff6349ccc05fa9f01"; - [InitialValue("0xd6abe115ecb75e1fa0b42f5e85934ce8c1ae2893", ContractParameterType.Hash160)] - static readonly UInt160 bNEO = default; + static readonly UInt160 bNEO = "0xd6abe115ecb75e1fa0b42f5e85934ce8c1ae2893"; static readonly uint ORDER_PER_PAGE = 1 << 8; diff --git a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/Models/BookInfo.cs b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/Models/BookInfo.cs index e456a04..f728312 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/Models/BookInfo.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapOrderBook/Models/BookInfo.cs @@ -1,4 +1,4 @@ -using Neo; +using Neo.SmartContract.Framework; using System.Numerics; namespace FlamingoSwapOrderBook diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPair.csproj b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPair.csproj index 421d2b5..97cc3ce 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPair.csproj +++ b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPair.csproj @@ -1,13 +1,14 @@  - net6.0 + net8.0 - - + - + + + diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Admin.cs b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Admin.cs index 4a363e3..101cafc 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Admin.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Admin.cs @@ -1,10 +1,8 @@ -using System.Numerics; -using System.ComponentModel; -using Neo; using Neo.SmartContract.Framework; -using Neo.SmartContract.Framework.Services; -using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Attributes; +using Neo.SmartContract.Framework.Native; +using Neo.SmartContract.Framework.Services; +using System.Numerics; namespace FlamingoSwapPair { @@ -13,11 +11,9 @@ partial class FlamingoSwapPairContract #region Settings //Test - [InitialValue("NVGUQ1qyL4SdSm7sVmGVkXetjEsvw2L3NT", Neo.SmartContract.ContractParameterType.Hash160)] - static readonly UInt160 superAdmin = default; + static readonly UInt160 superAdmin = "NVGUQ1qyL4SdSm7sVmGVkXetjEsvw2L3NT"; - [InitialValue("0xf9c55e595b39ded1e866efcc163445a168d378d5", Neo.SmartContract.ContractParameterType.Hash160)] - static readonly UInt160 WhiteListContract = default; + static readonly UInt160 WhiteListContract = "0xf9c55e595b39ded1e866efcc163445a168d378d5"; ////Main //[InitialValue("NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE", Neo.SmartContract.ContractParameterType.Hash160)] @@ -29,16 +25,15 @@ partial class FlamingoSwapPairContract #region TokenAB - [DisplayName("symbol")] + [Safe] public static string Symbol() => "FLP-fWBTC-fUSDT"; //symbol of the token - #region tokenA - [InitialValue("0x9b9f7db02c0a2d6aa5ad9be7bba843027bf5b5f2", Neo.SmartContract.ContractParameterType.Hash160)] //bENO - static readonly UInt160 TokenA = default; + #region tokenA + //bENO + static readonly UInt160 TokenA = "0x9b9f7db02c0a2d6aa5ad9be7bba843027bf5b5f2"; #endregion - [InitialValue("0xa2d5f4378c42d118ebc7e1690f9478d3e00aefa1", Neo.SmartContract.ContractParameterType.Hash160)] - static readonly UInt160 TokenB = default; + static readonly UInt160 TokenB = "0xa2d5f4378c42d118ebc7e1690f9478d3e00aefa1"; #endregion diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Event.cs b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Event.cs index 2c41127..183f604 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Event.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Event.cs @@ -1,6 +1,6 @@ -using System.ComponentModel; +using Neo.SmartContract.Framework; +using System.ComponentModel; using System.Numerics; -using Neo; namespace FlamingoSwapPair { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Nep17.cs b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Nep17.cs index 1e65020..d60ae8f 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Nep17.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPair/FlamingoSwapPairContract.Nep17.cs @@ -1,15 +1,18 @@ -using System.Numerics; -using Neo; +using Neo.SmartContract.Framework; +using Neo.SmartContract.Framework.Attributes; using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; +using System.Numerics; namespace FlamingoSwapPair { partial class FlamingoSwapPairContract { + [Safe] public static ulong Decimals() => 8; + [Safe] public static BigInteger TotalSupply() => TotalSupplyStorage.Get(); - + [Safe] public static BigInteger BalanceOf(UInt160 account) { Assert(account.IsValid, "Invalid Account"); diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Admin.cs b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Admin.cs index 698ad35..02375f1 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Admin.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Admin.cs @@ -1,8 +1,6 @@ -using Neo; -using Neo.SmartContract.Framework; +using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; -using Neo.SmartContract.Framework.Attributes; namespace FlamingoSwapPairWhiteList { @@ -10,9 +8,8 @@ public partial class FlamingoSwapPairWhiteList { #region Admin -#warning 检查此处的 Admin 地址是否为最新地址 - [InitialValue("NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE", Neo.SmartContract.ContractParameterType.Hash160)] - static readonly UInt160 superAdmin = default; +#warning Please check if the admin here is the latest! + static readonly UInt160 superAdmin = "NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE"; const string AdminKey = nameof(superAdmin); diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Event.cs b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Event.cs index a6b8b3c..78f2aeb 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Event.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.Event.cs @@ -1,5 +1,5 @@ -using System.ComponentModel; -using Neo; +using Neo.SmartContract.Framework; +using System.ComponentModel; namespace FlamingoSwapPairWhiteList { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.csproj b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.csproj index 6e12954..99c8955 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.csproj +++ b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/FlamingoSwapPairWhiteList.csproj @@ -1,15 +1,16 @@  - net6.0 + net8.0 - - + - + + + diff --git a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/KeyValue.cs b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/KeyValue.cs index d7ef789..d92f5ba 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/KeyValue.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapPairWhiteList/KeyValue.cs @@ -1,5 +1,5 @@ -using System.Numerics; -using Neo; +using Neo.SmartContract.Framework; +using System.Numerics; namespace FlamingoSwapPairWhiteList { diff --git a/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouter.csproj b/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouter.csproj index e7971ea..1a4671a 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouter.csproj +++ b/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouter.csproj @@ -1,14 +1,15 @@  - net6.0 + net8.0 - - + - + + + diff --git a/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouterContract.Admin.cs b/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouterContract.Admin.cs index b94f28f..5f655de 100644 --- a/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouterContract.Admin.cs +++ b/Swap/flamingo-contract-swap/FlamingoSwapRouter/FlamingoSwapRouterContract.Admin.cs @@ -1,20 +1,14 @@ -using Neo; -using Neo.SmartContract.Framework; -using Neo.SmartContract.Framework.Services; +using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Native; -using Neo.SmartContract; -using Neo.SmartContract.Framework.Attributes; +using Neo.SmartContract.Framework.Services; namespace FlamingoSwapRouter { public partial class FlamingoSwapRouterContract { #region Admin - [InitialValue("NVGUQ1qyL4SdSm7sVmGVkXetjEsvw2L3NT", ContractParameterType.Hash160)] - static readonly UInt160 superAdmin = default; - - [InitialValue("0x52bf47559436d3572a9b1cb83c056dc39cb42d0d", ContractParameterType.Hash160)] - static readonly UInt160 Factory = default; + static readonly UInt160 superAdmin = "NVGUQ1qyL4SdSm7sVmGVkXetjEsvw2L3NT"; + static readonly UInt160 Factory = "0x52bf47559436d3572a9b1cb83c056dc39cb42d0d"; //[InitialValue("NdDvLrbtqeCVQkaLstAwh3md8SYYwqWRaE", ContractParameterType.Hash160)] //static readonly UInt160 superAdmin = default; diff --git a/Swap/flamingo-contract-swap/FlashLoanTemple/FlashLoanTemple.csproj b/Swap/flamingo-contract-swap/FlashLoanTemple/FlashLoanTemple.csproj index 1af96b8..489ea78 100644 --- a/Swap/flamingo-contract-swap/FlashLoanTemple/FlashLoanTemple.csproj +++ b/Swap/flamingo-contract-swap/FlashLoanTemple/FlashLoanTemple.csproj @@ -1,13 +1,13 @@ - net6.0 + net8.0 - + diff --git a/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplate.csproj b/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplate.csproj index ec0abe1..c64fef1 100644 --- a/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplate.csproj +++ b/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplate.csproj @@ -1,12 +1,13 @@  - - net6.0 - - - - - - - - + + net8.0 + + + + + + + + + \ No newline at end of file diff --git a/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplateContract.Event.cs b/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplateContract.Event.cs index b46ebf8..8cfe1db 100644 --- a/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplateContract.Event.cs +++ b/Swap/flamingo-contract-swap/ProxyTemplate/ProxyTemplateContract.Event.cs @@ -1,6 +1,6 @@ -using System.ComponentModel; +using Neo.SmartContract.Framework; +using System.ComponentModel; using System.Numerics; -using Neo; namespace ProxyTemplate { diff --git a/Swap/flamingo-contract-swap/flamingo-contract-swap/Swap.cs b/Swap/flamingo-contract-swap/flamingo-contract-swap/Swap.cs index 0f90e07..7d2ad14 100644 --- a/Swap/flamingo-contract-swap/flamingo-contract-swap/Swap.cs +++ b/Swap/flamingo-contract-swap/flamingo-contract-swap/Swap.cs @@ -1,7 +1,4 @@ -using Neo.SmartContract.Framework; - - -namespace flamingo_contract_swap +namespace flamingo_contract_swap { public partial class Swap : SmartContract {