-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🐛 Improvement & Bug Fixes * 🐛 Fix open/increase/decrease/collect/close with closed atas Fix open/increase/decrease/collect/close with closed atas and added tests for native mint * 🐛 Fix not deterministic bug with liquidity * 🐛 Add fee payer * 🐛 Remove test delay * 🐛 Fix ATA & Set release to 0.1 * 🐛 Fix race condition in unit tests
- Loading branch information
1 parent
093e620
commit 29d66e2
Showing
53 changed files
with
2,762 additions
and
722 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -615,3 +615,4 @@ riderModule.iml | |
/_ReSharper.Caches/ | ||
_site/ | ||
api/ | ||
test-ledger/ |
Large diffs are not rendered by default.
Oops, something went wrong.
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,26 @@ | ||
using System.Numerics; | ||
|
||
namespace Solana.Unity.Dex.Math; | ||
|
||
public class DecimalUtil | ||
{ | ||
public static double FromUlong(ulong value, int shift = 0) | ||
{ | ||
return value / System.Math.Pow(10, shift); | ||
} | ||
|
||
public static double FromBigInteger(BigInteger value, int shift = 0) | ||
{ | ||
return FromUlong((ulong)value, shift); | ||
} | ||
|
||
public static ulong ToUlong(double value, int shift = 0) | ||
{ | ||
return (ulong)(value * System.Math.Pow(10, shift)); | ||
} | ||
|
||
public static ulong ToUlong(float value, int shift = 0) | ||
{ | ||
return ToUlong((double)value, shift); | ||
} | ||
} |
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,16 @@ | ||
using Solana.Unity.Wallet; | ||
using System.Numerics; | ||
|
||
namespace Solana.Unity.Dex.Models; | ||
|
||
public class Pool | ||
{ | ||
public PublicKey Address { get; set; } | ||
|
||
public PublicKey TokenMintA { get; set; } | ||
public PublicKey TokenMintB { get; set; } | ||
|
||
public BigInteger Liquidity { get; set; } | ||
public ushort Fee { get; set; } | ||
public ushort TickSpacing { get; set; } | ||
} |
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
Oops, something went wrong.