charli3_dendrite 1.2.4.dev0__tar.gz → 1.2.5.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/PKG-INFO +1 -1
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/pyproject.toml +2 -2
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/__init__.py +1 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/splash.py +236 -13
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/LICENSE +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/README.md +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/backend_base.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/blockfrost/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/blockfrost/models.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/dbsync/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/dbsync/models.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/ogmios_kupo/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/ogmios_kupo/models.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/utils.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dataclasses/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dataclasses/datums.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dataclasses/models.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/amm_base.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/amm_types.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/cswap.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/minswap.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/muesli.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/spectrum.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/sundae.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/vyfi.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/wingriders.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/core/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/core/base.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/core/errors.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/__init__.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/axo.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/djed.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/geniusyield.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/ob_base.py +0 -0
- {charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/utility.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "charli3_dendrite"
|
|
3
|
-
version = "1.2.
|
|
3
|
+
version = "1.2.5-dev1"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Elder Millenial <eldermillenial@protonmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -49,7 +49,7 @@ module = ["pycardano", "pycardano.*", "dotenv", "nox"]
|
|
|
49
49
|
ignore_missing_imports = true
|
|
50
50
|
|
|
51
51
|
[tool.bumpversion]
|
|
52
|
-
current_version = "1.2.
|
|
52
|
+
current_version = "1.2.5-dev1"
|
|
53
53
|
parse = """(?x)
|
|
54
54
|
(?P<major>\\d+)\\.
|
|
55
55
|
(?P<minor>\\d+)\\.
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/__init__.py
RENAMED
|
@@ -14,6 +14,7 @@ from charli3_dendrite.dexs.amm.spectrum import SpectrumCPPState
|
|
|
14
14
|
from charli3_dendrite.dexs.amm.splash import SplashCPPBidirState
|
|
15
15
|
from charli3_dendrite.dexs.amm.splash import SplashCPPState
|
|
16
16
|
from charli3_dendrite.dexs.amm.splash import SplashSSPState
|
|
17
|
+
from charli3_dendrite.dexs.amm.splash import SplashCPPRoyaltyState
|
|
17
18
|
from charli3_dendrite.dexs.amm.sundae import SundaeSwapCPPState
|
|
18
19
|
from charli3_dendrite.dexs.amm.sundae import SundaeSwapV3CPPState
|
|
19
20
|
from charli3_dendrite.dexs.amm.vyfi import VyFiCPPState
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/splash.py
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"""Minswap DEX Module."""
|
|
2
2
|
|
|
3
|
-
from dataclasses import dataclass
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from random import choice
|
|
5
|
+
from string import hexdigits
|
|
4
6
|
from typing import Any
|
|
5
7
|
from typing import List
|
|
6
8
|
from typing import Union
|
|
@@ -71,7 +73,11 @@ class SplashOrderDatum(OrderDatum):
|
|
|
71
73
|
fee: int
|
|
72
74
|
redeemer_address: PlutusFullAddress
|
|
73
75
|
cancel_pkh: bytes
|
|
74
|
-
permitted_executors: List[bytes]
|
|
76
|
+
permitted_executors: List[bytes] = field(
|
|
77
|
+
default_factory=lambda: [
|
|
78
|
+
b"\\\xb2\xc9h\xe5\xd1\xc7\x19zl\xe7aYg1\n7UE\xd9\xbce\x06:\x96C5\xb2"
|
|
79
|
+
]
|
|
80
|
+
)
|
|
75
81
|
|
|
76
82
|
def address_source(self) -> Address:
|
|
77
83
|
"""This method should return the source address associated with the order."""
|
|
@@ -88,6 +94,43 @@ class SplashOrderDatum(OrderDatum):
|
|
|
88
94
|
"""This method should return the type of the order."""
|
|
89
95
|
return OrderType.swap
|
|
90
96
|
|
|
97
|
+
@classmethod
|
|
98
|
+
def create_datum(
|
|
99
|
+
cls,
|
|
100
|
+
address_source: Address,
|
|
101
|
+
in_assets: Assets,
|
|
102
|
+
out_assets: Assets,
|
|
103
|
+
batcher_fee: Assets,
|
|
104
|
+
deposit: Assets,
|
|
105
|
+
address_target: Address | None = None,
|
|
106
|
+
datum_target: PlutusData | None = None,
|
|
107
|
+
) -> "CSwapOrderDatum":
|
|
108
|
+
"""Create a CSwap order datum."""
|
|
109
|
+
# Validate ADA-only restriction
|
|
110
|
+
merged_assets = in_assets + out_assets
|
|
111
|
+
|
|
112
|
+
full_address = PlutusFullAddress.from_address(address_source)
|
|
113
|
+
|
|
114
|
+
beacon = "".join(choice(hexdigits) for _ in range(56))
|
|
115
|
+
|
|
116
|
+
numerator, denominator = float.as_integer_ratio(
|
|
117
|
+
in_assets.quantity() / out_assets.quantity(),
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
return cls(
|
|
121
|
+
tag=b"\x00",
|
|
122
|
+
beacon=beacon,
|
|
123
|
+
in_asset=AssetClass.from_assets(in_assets),
|
|
124
|
+
tradable_input=in_assets.quantity(),
|
|
125
|
+
cost_per_ex_step=batcher_fee.quantity(),
|
|
126
|
+
min_marginal_output=out_assets.quantity(),
|
|
127
|
+
output=AssetClass.from_assets(out_assets),
|
|
128
|
+
base_price=Rationale(numerator=numerator, denominator=denominator),
|
|
129
|
+
fee=0,
|
|
130
|
+
redeemer_address=full_address,
|
|
131
|
+
cancel_pkh=address_source.payment_part.payload,
|
|
132
|
+
)
|
|
133
|
+
|
|
91
134
|
|
|
92
135
|
@dataclass
|
|
93
136
|
class SplashSSPPoolDatum(PoolDatum):
|
|
@@ -159,6 +202,31 @@ class SplashCPPBidirPoolDatum(PoolDatum):
|
|
|
159
202
|
return self.asset_x.assets + self.asset_y.assets
|
|
160
203
|
|
|
161
204
|
|
|
205
|
+
@dataclass
|
|
206
|
+
class SplashCPPRoyaltyPoolDatum(PoolDatum):
|
|
207
|
+
"""The pool datum for the Spectrum DEX."""
|
|
208
|
+
|
|
209
|
+
pool_nft: AssetClass
|
|
210
|
+
asset_x: AssetClass
|
|
211
|
+
asset_y: AssetClass
|
|
212
|
+
lp_token: AssetClass
|
|
213
|
+
pool_fee: int
|
|
214
|
+
treasury_fee: int
|
|
215
|
+
royalty_fee: int
|
|
216
|
+
treasury_x: int
|
|
217
|
+
treasury_y: int
|
|
218
|
+
royalty_x: int
|
|
219
|
+
royalty_y: int
|
|
220
|
+
admin_address: List[PlutusFullAddress]
|
|
221
|
+
treasury_address: bytes
|
|
222
|
+
royalty_pub_key: bytes
|
|
223
|
+
nonce: int
|
|
224
|
+
|
|
225
|
+
def pool_pair(self) -> Assets | None:
|
|
226
|
+
"""Returns the pool pair assets if available."""
|
|
227
|
+
return self.asset_x.assets + self.asset_y.assets
|
|
228
|
+
|
|
229
|
+
|
|
162
230
|
@dataclass
|
|
163
231
|
class SwapAction(PlutusData):
|
|
164
232
|
CONSTR_ID = 0
|
|
@@ -519,7 +587,9 @@ class SplashCPPState(SplashBaseState, AbstractConstantProductPoolState):
|
|
|
519
587
|
def post_init(cls, values):
|
|
520
588
|
super().post_init(values)
|
|
521
589
|
|
|
522
|
-
datum: SplashCPPPoolDatum =
|
|
590
|
+
datum: SplashCPPPoolDatum = cls.pool_datum_class().from_cbor(
|
|
591
|
+
values["datum_cbor"]
|
|
592
|
+
)
|
|
523
593
|
|
|
524
594
|
values["fee"] = 100000 - datum.pool_fee + datum.treasury_fee
|
|
525
595
|
|
|
@@ -532,25 +602,35 @@ class SplashCPPState(SplashBaseState, AbstractConstantProductPoolState):
|
|
|
532
602
|
# https://github.com/splashprotocol/splash-core/blob/9fd951054ac7143de6acf491f36d1073e729ba90/plutarch-validators/WhalePoolsDex/PContracts/PPool.hs#L367
|
|
533
603
|
values["inactive"] = assets.quantity() < 100000000
|
|
534
604
|
|
|
605
|
+
def _treasury_x(self) -> int:
|
|
606
|
+
return self.pool_datum.treasury_x
|
|
607
|
+
|
|
608
|
+
def _treasury_y(self) -> int:
|
|
609
|
+
return self.pool_datum.treasury_y
|
|
610
|
+
|
|
535
611
|
def get_amount_out(
|
|
536
612
|
self,
|
|
537
613
|
asset: Assets,
|
|
538
614
|
precise: bool = True,
|
|
539
615
|
) -> tuple[Assets, float]:
|
|
540
|
-
amount_out,
|
|
616
|
+
amount_out, slippage = super().get_amount_out(asset=asset, precise=precise)
|
|
617
|
+
|
|
618
|
+
if isinstance(self.fee, (int, float)) or len(self.fee) == 1:
|
|
619
|
+
fee = self.fee
|
|
620
|
+
else:
|
|
621
|
+
fee = self.fee[0] if asset.unit() == self.assets.unit_a else self.fee[1]
|
|
541
622
|
|
|
542
|
-
|
|
543
|
-
fee = pool_datum.pool_fee - pool_datum.treasury_fee
|
|
623
|
+
fee = 100000 - fee
|
|
544
624
|
dx = asset.quantity()
|
|
545
625
|
dxf = dx * fee
|
|
546
626
|
rx = self.assets[asset.unit()]
|
|
547
627
|
|
|
548
628
|
if asset.unit() == self.assets.unit():
|
|
549
|
-
ry = self.assets.quantity(1) +
|
|
550
|
-
rx +=
|
|
629
|
+
ry = self.assets.quantity(1) + self._treasury_y()
|
|
630
|
+
rx += self._treasury_x()
|
|
551
631
|
else:
|
|
552
|
-
ry = self.assets.quantity(0) +
|
|
553
|
-
rx +=
|
|
632
|
+
ry = self.assets.quantity(0) + self._treasury_x()
|
|
633
|
+
rx += self._treasury_y()
|
|
554
634
|
|
|
555
635
|
# Check to make sure the output passes invariant, and decrease until it does
|
|
556
636
|
dy = -amount_out.quantity()
|
|
@@ -567,7 +647,7 @@ class SplashCPPState(SplashBaseState, AbstractConstantProductPoolState):
|
|
|
567
647
|
assert -dy * (rx * 100000 + dxf) <= ry * dxf
|
|
568
648
|
assert -dx * (ry * 100000 + dyf) <= rx * dyf
|
|
569
649
|
|
|
570
|
-
return amount_out,
|
|
650
|
+
return amount_out, slippage
|
|
571
651
|
|
|
572
652
|
def swap_utxo(
|
|
573
653
|
self,
|
|
@@ -688,8 +768,8 @@ class SplashCPPBidirState(SplashCPPState):
|
|
|
688
768
|
)
|
|
689
769
|
|
|
690
770
|
values["fee"] = [
|
|
691
|
-
(100000 - datum.pool_fee_x + datum.treasury_fee)
|
|
692
|
-
(100000 - datum.pool_fee_y + datum.treasury_fee)
|
|
771
|
+
(100000 - datum.pool_fee_x + datum.treasury_fee),
|
|
772
|
+
(100000 - datum.pool_fee_y + datum.treasury_fee),
|
|
693
773
|
]
|
|
694
774
|
|
|
695
775
|
assets = values["assets"]
|
|
@@ -698,3 +778,146 @@ class SplashCPPBidirState(SplashCPPState):
|
|
|
698
778
|
|
|
699
779
|
# Verify pool is active
|
|
700
780
|
values["inactive"] = assets.quantity() < 100000000
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
class SplashCPPRoyaltyState(SplashCPPState):
|
|
784
|
+
"""Splash StableSwap Pool State."""
|
|
785
|
+
|
|
786
|
+
fee: int = 30
|
|
787
|
+
_batcher = Assets(lovelace=1000000)
|
|
788
|
+
_deposit = Assets(lovelace=1500000)
|
|
789
|
+
|
|
790
|
+
def _treasury_x(self) -> int:
|
|
791
|
+
return self.pool_datum.treasury_x + self.pool_datum.royalty_x
|
|
792
|
+
|
|
793
|
+
def _treasury_y(self) -> int:
|
|
794
|
+
return self.pool_datum.treasury_y + self.pool_datum.royalty_y
|
|
795
|
+
|
|
796
|
+
@classmethod
|
|
797
|
+
def pool_selector(cls) -> PoolSelector:
|
|
798
|
+
return PoolSelector(
|
|
799
|
+
addresses=[
|
|
800
|
+
"addr1w89ksjnfu7ys02tedvslc9g2wk90tu5qte0dt4dge60hdugfqe64t",
|
|
801
|
+
],
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
@classmethod
|
|
805
|
+
def pool_datum_class(self) -> type[SplashCPPRoyaltyPoolDatum]:
|
|
806
|
+
return SplashCPPRoyaltyPoolDatum
|
|
807
|
+
|
|
808
|
+
@classmethod
|
|
809
|
+
def post_init(cls, values):
|
|
810
|
+
super().post_init(values)
|
|
811
|
+
|
|
812
|
+
datum: SplashCPPRoyaltyPoolDatum = SplashCPPRoyaltyPoolDatum.from_cbor(
|
|
813
|
+
values["datum_cbor"],
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
values["fee"] = 100000 - datum.pool_fee + datum.treasury_fee + datum.royalty_fee
|
|
817
|
+
|
|
818
|
+
assets = values["assets"]
|
|
819
|
+
assets.root[assets.unit(0)] -= datum.treasury_x + datum.royalty_x
|
|
820
|
+
assets.root[assets.unit(1)] -= datum.treasury_y + datum.royalty_y
|
|
821
|
+
|
|
822
|
+
# Verify pool is active
|
|
823
|
+
values["inactive"] = assets.quantity() < 100000000
|
|
824
|
+
|
|
825
|
+
# def swap_utxo(
|
|
826
|
+
# self,
|
|
827
|
+
# address_source: Address,
|
|
828
|
+
# in_assets: Assets,
|
|
829
|
+
# out_assets: Assets,
|
|
830
|
+
# tx_builder: TransactionBuilder | None = None,
|
|
831
|
+
# extra_assets: Assets | None = None,
|
|
832
|
+
# address_target: Address | None = None,
|
|
833
|
+
# datum_target: PlutusData | None = None,
|
|
834
|
+
# ) -> tuple[TransactionOutput | None, PlutusData]:
|
|
835
|
+
# assert self.tx_hash is not None
|
|
836
|
+
# assert self.pool_nft is not None
|
|
837
|
+
# assert self.lp_tokens is not None
|
|
838
|
+
# assert tx_builder is not None
|
|
839
|
+
|
|
840
|
+
# order_info = get_backend().get_pool_in_tx(
|
|
841
|
+
# self.tx_hash,
|
|
842
|
+
# assets=[self.pool_nft.unit()],
|
|
843
|
+
# addresses=self.pool_selector().addresses,
|
|
844
|
+
# )
|
|
845
|
+
|
|
846
|
+
# # Get the output assets
|
|
847
|
+
# out_assets, _ = self.get_amount_out(asset=in_assets)
|
|
848
|
+
|
|
849
|
+
# # Create the output redeemer
|
|
850
|
+
# redeemer = Redeemer(
|
|
851
|
+
# CPPoolRedeemer(
|
|
852
|
+
# action=2,
|
|
853
|
+
# self_index=-1,
|
|
854
|
+
# ),
|
|
855
|
+
# )
|
|
856
|
+
|
|
857
|
+
# # Create the pool input UTxO
|
|
858
|
+
# pool_datum_class = self.pool_datum_class()
|
|
859
|
+
# pool_datum = pool_datum_class.from_cbor(
|
|
860
|
+
# self.pool_datum.to_cbor(),
|
|
861
|
+
# )
|
|
862
|
+
# assets = self.assets + self.pool_nft + self.lp_tokens
|
|
863
|
+
# assets.root[self.assets.unit()] += (
|
|
864
|
+
# pool_datum.treasury_x + self.pool_datum.royalty_x
|
|
865
|
+
# )
|
|
866
|
+
# assets.root[self.assets.unit(1)] += (
|
|
867
|
+
# pool_datum.treasury_y + self.pool_datum.royalty_y
|
|
868
|
+
# )
|
|
869
|
+
# input_utxo = UTxO(
|
|
870
|
+
# TransactionInput(
|
|
871
|
+
# transaction_id=TransactionId(bytes.fromhex(self.tx_hash)),
|
|
872
|
+
# index=self.tx_index,
|
|
873
|
+
# ),
|
|
874
|
+
# output=TransactionOutput(
|
|
875
|
+
# address=order_info[0].address,
|
|
876
|
+
# amount=asset_to_value(assets),
|
|
877
|
+
# datum=self.pool_datum,
|
|
878
|
+
# ),
|
|
879
|
+
# )
|
|
880
|
+
|
|
881
|
+
# # Create the pool output UTxO
|
|
882
|
+
# new_assets = Assets.model_validate(assets.model_dump())
|
|
883
|
+
# new_assets.root[in_assets.unit()] += in_assets.quantity()
|
|
884
|
+
# new_assets.root[out_assets.unit()] += -out_assets.quantity()
|
|
885
|
+
# new_pool_datum = pool_datum_class.from_cbor(
|
|
886
|
+
# self.pool_datum.to_cbor(),
|
|
887
|
+
# )
|
|
888
|
+
|
|
889
|
+
# if in_assets.unit() == new_pool_datum.asset_x.assets.unit():
|
|
890
|
+
# new_pool_datum.treasury_x += int(
|
|
891
|
+
# in_assets.quantity() * new_pool_datum.treasury_fee // 100000,
|
|
892
|
+
# )
|
|
893
|
+
# new_pool_datum.royalty_x += int(
|
|
894
|
+
# in_assets.quantity() * new_pool_datum.royalty_fee // 100000,
|
|
895
|
+
# )
|
|
896
|
+
# elif in_assets.unit() == new_pool_datum.asset_y.assets.unit():
|
|
897
|
+
# new_pool_datum.treasury_y += int(
|
|
898
|
+
# in_assets.quantity() * new_pool_datum.treasury_fee // 100000,
|
|
899
|
+
# )
|
|
900
|
+
# new_pool_datum.royalty_y += int(
|
|
901
|
+
# in_assets.quantity() * new_pool_datum.royalty_fee // 100000,
|
|
902
|
+
# )
|
|
903
|
+
# else:
|
|
904
|
+
# raise ValueError("Invalid input asset")
|
|
905
|
+
|
|
906
|
+
# txo = TransactionOutput(
|
|
907
|
+
# address=order_info[0].address,
|
|
908
|
+
# amount=asset_to_value(new_assets),
|
|
909
|
+
# datum=new_pool_datum,
|
|
910
|
+
# )
|
|
911
|
+
|
|
912
|
+
# # Add the script input
|
|
913
|
+
# pool_hash = Address.decode(order_info[0].address).payment_part.payload
|
|
914
|
+
# script = (
|
|
915
|
+
# get_backend()
|
|
916
|
+
# .get_script_from_address(
|
|
917
|
+
# Address(payment_part=ScriptHash(payload=pool_hash)),
|
|
918
|
+
# )
|
|
919
|
+
# .to_utxo()
|
|
920
|
+
# )
|
|
921
|
+
# tx_builder.add_script_input(utxo=input_utxo, script=script, redeemer=redeemer)
|
|
922
|
+
|
|
923
|
+
# return txo, self.pool_datum
|
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/backend/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/cswap.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/minswap.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/muesli.py
RENAMED
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/sundae.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/amm/vyfi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/core/base.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/core/errors.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/__init__.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/axo.py
RENAMED
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/djed.py
RENAMED
|
File without changes
|
|
File without changes
|
{charli3_dendrite-1.2.4.dev0 → charli3_dendrite-1.2.5.dev1}/src/charli3_dendrite/dexs/ob/ob_base.py
RENAMED
|
File without changes
|
|
File without changes
|