shadowPaySDK 16.7.2025.7__py3-none-any.whl → 16.7.2025.8__py3-none-any.whl
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.
- shadowPaySDK/interface/erc20.py +1 -0
- shadowPaySDK/types/EVMcheque.py +11 -9
- {shadowpaysdk-16.7.2025.7.dist-info → shadowpaysdk-16.7.2025.8.dist-info}/METADATA +1 -1
- {shadowpaysdk-16.7.2025.7.dist-info → shadowpaysdk-16.7.2025.8.dist-info}/RECORD +7 -7
- {shadowpaysdk-16.7.2025.7.dist-info → shadowpaysdk-16.7.2025.8.dist-info}/WHEEL +0 -0
- {shadowpaysdk-16.7.2025.7.dist-info → shadowpaysdk-16.7.2025.8.dist-info}/licenses/LICENSE +0 -0
- {shadowpaysdk-16.7.2025.7.dist-info → shadowpaysdk-16.7.2025.8.dist-info}/top_level.txt +0 -0
shadowPaySDK/interface/erc20.py
CHANGED
shadowPaySDK/types/EVMcheque.py
CHANGED
@@ -217,7 +217,7 @@ class Cheque:
|
|
217
217
|
)
|
218
218
|
estimated_gas = self.contract.functions.InitTokenCheque(
|
219
219
|
Web3.to_checksum_address(token_address),
|
220
|
-
|
220
|
+
amount,
|
221
221
|
Web3.to_checksum_address(reciver)
|
222
222
|
).estimate_gas({
|
223
223
|
'from': address,
|
@@ -225,7 +225,7 @@ class Cheque:
|
|
225
225
|
})
|
226
226
|
txn = self.contract.functions.InitTokenCheque(
|
227
227
|
Web3.to_checksum_address(token_address),
|
228
|
-
|
228
|
+
amount,
|
229
229
|
Web3.to_checksum_address(reciver)
|
230
230
|
).build_transaction({
|
231
231
|
'from': address,
|
@@ -309,9 +309,9 @@ class Cheque:
|
|
309
309
|
estimated_gas = self.contract.functions.InitSwapCheque(
|
310
310
|
Web3.to_checksum_address(reciver),
|
311
311
|
Web3.to_checksum_address(token_in),
|
312
|
-
|
312
|
+
amount_in,
|
313
313
|
Web3.to_checksum_address(token_out),
|
314
|
-
|
314
|
+
amount_out,
|
315
315
|
).estimate_gas({
|
316
316
|
'from': address,
|
317
317
|
'gasPrice': self.w3.eth.gas_price
|
@@ -319,9 +319,9 @@ class Cheque:
|
|
319
319
|
txn = self.contract.functions.InitSwapCheque(
|
320
320
|
Web3.to_checksum_address(reciver),
|
321
321
|
Web3.to_checksum_address(token_in),
|
322
|
-
|
322
|
+
amount_in,
|
323
323
|
Web3.to_checksum_address(token_out),
|
324
|
-
|
324
|
+
amount_out
|
325
325
|
).build_transaction({
|
326
326
|
'from': address,
|
327
327
|
'nonce': self.w3.eth.get_transaction_count(address),
|
@@ -370,6 +370,7 @@ class Cheque:
|
|
370
370
|
)
|
371
371
|
if not approve:
|
372
372
|
return False
|
373
|
+
print(f"contract balance: {erc20.get_balance(wallet_address=self.contract.address)}")
|
373
374
|
estimated_gas = self.contract.functions.CashOutSwapCheque(
|
374
375
|
Web3.to_bytes(hexstr=cheque_id)
|
375
376
|
).estimate_gas({
|
@@ -409,12 +410,13 @@ class Cheque:
|
|
409
410
|
async def getTreasery(self):
|
410
411
|
return self.contract.functions.getTreasery().call()
|
411
412
|
async def getSwaoDetail(self, cheque_id: str):
|
412
|
-
|
413
|
-
s =
|
414
|
-
return{
|
413
|
+
cheque_id_bytes32 = Web3.to_bytes(hexstr=cheque_id).rjust(32, b'\x00') # паддинг до bytes32
|
414
|
+
s = self.contract.functions.getSwapDetail(cheque_id_bytes32).call()
|
415
|
+
return {
|
415
416
|
"tokenOut": s[0],
|
416
417
|
"amountOut": s[1],
|
417
418
|
}
|
419
|
+
|
418
420
|
class NFTcheque:
|
419
421
|
def __init__(self, w3:Web3, token:str, amount:int, spender:str):
|
420
422
|
self.w3 = w3
|
@@ -1,16 +1,16 @@
|
|
1
1
|
shadowPaySDK/__init__.py,sha256=CMwAuP_6hJN-WueU-XlTNta9Oyd28sFo8OojdgD_pxA,681
|
2
2
|
shadowPaySDK/const.py,sha256=E-w8fivcd-yeHmpOpDAwTIP5FvsArFBHNWbhJ5K01yw,10386
|
3
3
|
shadowPaySDK/interface/__init__.py,sha256=ggSZCV22udnzXm_Wv_3x6VN3hNIAEiwgwHZc2Jwc688,146
|
4
|
-
shadowPaySDK/interface/erc20.py,sha256=
|
4
|
+
shadowPaySDK/interface/erc20.py,sha256=zUTdwhf1hznSGxeEw0HsEFVf1nafHPcxj1X3djPczSo,4477
|
5
5
|
shadowPaySDK/interface/erc721.py,sha256=4AlWfDjrvl85wFocnN93j-oM54kTsLLwv9SdtcLj4eM,3094
|
6
6
|
shadowPaySDK/interface/sol.py,sha256=LsgwE8BzCstsVAxgcbKcYiXAORYMBHcQmNZdzsNkaLQ,7998
|
7
|
-
shadowPaySDK/types/EVMcheque.py,sha256=
|
7
|
+
shadowPaySDK/types/EVMcheque.py,sha256=_zZR9NmUMiuYVA8setWpPerSgEoUswalhJB-rPWIvTU,15777
|
8
8
|
shadowPaySDK/types/SOLcheque.py,sha256=ZzQgQXBerwa9lelbV8O6JBr1nevCAmJDxrdo8FtKT-4,11795
|
9
9
|
shadowPaySDK/types/__init__.py,sha256=sG6pNZfKGvENXqsnv6MrQtKrJ898fAXkMvAZY1k1-Qg,97
|
10
10
|
shadowPaySDK/utils/__init__.py,sha256=aja3iYO4rT-ptMM-pzw0GRFTziBdXdcEi-4kE84zH64,61
|
11
11
|
shadowPaySDK/utils/utils.py,sha256=g4bGvLDdjhNGsAj1eaZnNWFNaiN-cVhhM-5PrnG5aIQ,720
|
12
|
-
shadowpaysdk-16.7.2025.
|
13
|
-
shadowpaysdk-16.7.2025.
|
14
|
-
shadowpaysdk-16.7.2025.
|
15
|
-
shadowpaysdk-16.7.2025.
|
16
|
-
shadowpaysdk-16.7.2025.
|
12
|
+
shadowpaysdk-16.7.2025.8.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
|
13
|
+
shadowpaysdk-16.7.2025.8.dist-info/METADATA,sha256=KzWfWZJCFFBNqN6-aQrQEHpCwRXCRKMDqM5XveVixj8,1045
|
14
|
+
shadowpaysdk-16.7.2025.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
shadowpaysdk-16.7.2025.8.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
|
16
|
+
shadowpaysdk-16.7.2025.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|