forked from continuation-team/unity-ton-connect
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from MrVeit/dev
Release 0.5.0
- Loading branch information
Showing
27 changed files
with
366 additions
and
229 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Uniton Connect/Configs/Jettons Storage/Jettons/Jetton_AquaUSD.asset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 389a63dfb53dc8a4783bb7b37b8fd51f, type: 3} | ||
m_Name: Jetton_AquaUSD | ||
m_EditorClassIdentifier: | ||
<Type>k__BackingField: 4 | ||
<Name>k__BackingField: AquaUSD | ||
<MasterAddress>k__BackingField: 0:160f2c40452977a25d86d5130b3307a9af7bfa4deaf996cde388096178ab2182 | ||
<IconUrl>k__BackingField: https://cache.tonapi.io/imgproxy/ya8_uDrmedWuCUiYk6Tr5ZjkUSCmRCTsySyefHoFQQs/rs:fill:200:200:1/g:no/aHR0cHM6Ly9hcHAuYXF1YXByb3RvY29sLnh5ei9hc3NldHMvYXF1YXVzZC1pY29uLnBuZw.webp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ public enum JettonTypes | |
NOT, | ||
DOGS, | ||
USDT, | ||
AquaUSD, | ||
jUSDT, | ||
jUSDC, | ||
Custom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using UnitonConnect.Core.Utils.Debugging; | ||
|
||
namespace UnitonConnect.Core.Common | ||
{ | ||
public static class ClassicJettonNames | ||
{ | ||
public const string USDT_NAME = "Tether USD"; | ||
public const string GRAM_NAME = "Gram"; | ||
public const string NOT_NAME = "Notcoin"; | ||
public const string DOGS_NAME = "Dogs"; | ||
|
||
public const string USDT_NAME = "Tether USD"; | ||
public const string AQUA_USD_NAME = "AquaUSD"; | ||
public const string WRAPPED_USDT_NAME = "jUSDT"; | ||
public const string WRAPPED_USDC_NAME = "jUSDC"; | ||
|
||
public static bool IsStablecoin(string jettonName) | ||
{ | ||
var stablecoins = new List<string>() | ||
{ | ||
USDT_NAME, AQUA_USD_NAME, | ||
WRAPPED_USDT_NAME, WRAPPED_USDC_NAME | ||
}; | ||
|
||
var foundedStable = stablecoins.FirstOrDefault( | ||
(targetStable) => targetStable == jettonName); | ||
|
||
UnitonConnectLogger.Log($"Parsed stablecoin in common storage: {foundedStable}"); | ||
|
||
return !string.IsNullOrEmpty(foundedStable); | ||
} | ||
} | ||
} |
Oops, something went wrong.