shadowPaySDK 0.2.0.4__tar.gz → 0.2.0.5__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.
Files changed (22) hide show
  1. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/PKG-INFO +1 -1
  2. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/setup.py +1 -1
  3. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/interface/erc20.py +2 -2
  4. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/types/EVMcheque.py +4 -7
  5. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK.egg-info/PKG-INFO +1 -1
  6. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/LICENSE +0 -0
  7. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/README.md +0 -0
  8. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/setup.cfg +0 -0
  9. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/__init__.py +0 -0
  10. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/api.py +0 -0
  11. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/const.py +0 -0
  12. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/interface/__init__.py +0 -0
  13. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/interface/erc721.py +0 -0
  14. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/interface/sol.py +0 -0
  15. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/types/SOLcheque.py +0 -0
  16. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/types/__init__.py +0 -0
  17. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/utils/__init__.py +0 -0
  18. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK/utils/utils.py +0 -0
  19. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
  20. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
  21. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK.egg-info/requires.txt +0 -0
  22. {shadowpaysdk-0.2.0.4 → shadowpaysdk-0.2.0.5}/shadowPaySDK.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 0.2.0.4
3
+ Version: 0.2.0.5
4
4
  Summary: ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction
5
5
  Author: dazarius_
6
6
  Author-email: your@email.com
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='shadowPaySDK',
5
- version='0.2.0.4',
5
+ version='0.2.0.5',
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',
@@ -9,7 +9,7 @@ class ERC20Token:
9
9
  def __init__(self, w3:Web3, explorer: Optional[str] = None):
10
10
  self.web3 = w3
11
11
  self.explorer = explorer
12
-
12
+
13
13
  self.address = None
14
14
  self.contract = None
15
15
 
@@ -109,5 +109,5 @@ class ERC20Token:
109
109
  tx_receipt = self.web3.eth.wait_for_transaction_receipt(tx_hash)
110
110
  if tx_receipt.status != 1:
111
111
  raise ValueError(f"aaprove fail.\n {self._format_tx(self.web3.to_hex(tx_hash))}")
112
- return f"approve: {self._format_tx(self.web3.to_hex(tx_hash))}"
112
+ return f"{self._format_tx(self.web3.to_hex(tx_hash))}"
113
113
 
@@ -139,14 +139,11 @@ class Cheque:
139
139
 
140
140
  erc20 = shadowPaySDK.ERC20Token(w3=self.w3)
141
141
  erc20.set_params(token_address=token_address)
142
- decimals = erc20.get_decimals(
143
- token_address
144
- )
142
+ decimals = erc20.get_decimals()
145
143
  erc20.ensure_allowance(
146
144
  private_key=self.private_key,
147
145
  spender=self.contract.address,
148
146
  amount=amount,
149
- token=token_address
150
147
  )
151
148
  estimated_gas = self.contract.functions.InitTokenCheque(
152
149
  Web3.to_checksum_address(token_address),
@@ -224,10 +221,10 @@ class Cheque:
224
221
  private_key=self.private_key,
225
222
  spender=self.contract.address,
226
223
  amount=amount_in,
227
- token=token_in
228
224
  )
229
- decimals = erc20.get_decimals(token_in)
230
- token_out_decinals = erc20.get_decimals(token_out)
225
+ decimals = erc20.get_decimals()
226
+ erc20.set_params(token_address=token_out)
227
+ token_out_decinals = erc20.get_decimals()
231
228
  estimated_gas = self.contract.functions.InitSwapCheque(
232
229
  Web3.to_checksum_address(reciver),
233
230
  Web3.to_checksum_address(token_in),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 0.2.0.4
3
+ Version: 0.2.0.5
4
4
  Summary: ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction
5
5
  Author: dazarius_
6
6
  Author-email: your@email.com
File without changes
File without changes
File without changes