shadowPaySDK 16.7.2025.6__tar.gz → 16.7.2025.8__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.
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/PKG-INFO +1 -1
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/setup.py +1 -1
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/interface/erc20.py +1 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/types/EVMcheque.py +11 -10
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/PKG-INFO +1 -1
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/LICENSE +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/README.md +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/setup.cfg +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/const.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/interface/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/interface/erc721.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/interface/sol.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/types/SOLcheque.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/types/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/utils/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK/utils/utils.py +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/requires.txt +0 -0
- {shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/top_level.txt +0 -0
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='shadowPaySDK',
|
5
|
-
version='16.07.2025.
|
5
|
+
version='16.07.2025.8',
|
6
6
|
description='ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction',
|
7
7
|
long_description=open('README.md').read(),
|
8
8
|
long_description_content_type='text/markdown',
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import shadowPaySDK
|
2
2
|
from shadowPaySDK.const import __SHADOWPAY_ABI__ERC20__, __ALLOW_CHAINS__, __SHADOWPAY_CONTRACT_ADDRESS__ERC20__
|
3
|
-
from shadowPaySDK.api import __CREATE__CHEQUE__
|
4
3
|
from web3 import Web3
|
5
4
|
from typing import Optional
|
6
5
|
import httpx
|
@@ -218,7 +217,7 @@ class Cheque:
|
|
218
217
|
)
|
219
218
|
estimated_gas = self.contract.functions.InitTokenCheque(
|
220
219
|
Web3.to_checksum_address(token_address),
|
221
|
-
|
220
|
+
amount,
|
222
221
|
Web3.to_checksum_address(reciver)
|
223
222
|
).estimate_gas({
|
224
223
|
'from': address,
|
@@ -226,7 +225,7 @@ class Cheque:
|
|
226
225
|
})
|
227
226
|
txn = self.contract.functions.InitTokenCheque(
|
228
227
|
Web3.to_checksum_address(token_address),
|
229
|
-
|
228
|
+
amount,
|
230
229
|
Web3.to_checksum_address(reciver)
|
231
230
|
).build_transaction({
|
232
231
|
'from': address,
|
@@ -310,9 +309,9 @@ class Cheque:
|
|
310
309
|
estimated_gas = self.contract.functions.InitSwapCheque(
|
311
310
|
Web3.to_checksum_address(reciver),
|
312
311
|
Web3.to_checksum_address(token_in),
|
313
|
-
|
312
|
+
amount_in,
|
314
313
|
Web3.to_checksum_address(token_out),
|
315
|
-
|
314
|
+
amount_out,
|
316
315
|
).estimate_gas({
|
317
316
|
'from': address,
|
318
317
|
'gasPrice': self.w3.eth.gas_price
|
@@ -320,9 +319,9 @@ class Cheque:
|
|
320
319
|
txn = self.contract.functions.InitSwapCheque(
|
321
320
|
Web3.to_checksum_address(reciver),
|
322
321
|
Web3.to_checksum_address(token_in),
|
323
|
-
|
322
|
+
amount_in,
|
324
323
|
Web3.to_checksum_address(token_out),
|
325
|
-
|
324
|
+
amount_out
|
326
325
|
).build_transaction({
|
327
326
|
'from': address,
|
328
327
|
'nonce': self.w3.eth.get_transaction_count(address),
|
@@ -371,6 +370,7 @@ class Cheque:
|
|
371
370
|
)
|
372
371
|
if not approve:
|
373
372
|
return False
|
373
|
+
print(f"contract balance: {erc20.get_balance(wallet_address=self.contract.address)}")
|
374
374
|
estimated_gas = self.contract.functions.CashOutSwapCheque(
|
375
375
|
Web3.to_bytes(hexstr=cheque_id)
|
376
376
|
).estimate_gas({
|
@@ -410,12 +410,13 @@ class Cheque:
|
|
410
410
|
async def getTreasery(self):
|
411
411
|
return self.contract.functions.getTreasery().call()
|
412
412
|
async def getSwaoDetail(self, cheque_id: str):
|
413
|
-
|
414
|
-
s =
|
415
|
-
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 {
|
416
416
|
"tokenOut": s[0],
|
417
417
|
"amountOut": s[1],
|
418
418
|
}
|
419
|
+
|
419
420
|
class NFTcheque:
|
420
421
|
def __init__(self, w3:Web3, token:str, amount:int, spender:str):
|
421
422
|
self.w3 = w3
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{shadowpaysdk-16.7.2025.6 → shadowpaysdk-16.7.2025.8}/shadowPaySDK.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|