shadowPaySDK 0.2.0.11__tar.gz → 0.2.0.13__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.11 → shadowpaysdk-0.2.0.13}/PKG-INFO +1 -1
  2. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/setup.py +1 -1
  3. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/types/EVMcheque.py +16 -4
  4. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK.egg-info/PKG-INFO +1 -1
  5. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/LICENSE +0 -0
  6. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/README.md +0 -0
  7. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/setup.cfg +0 -0
  8. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/__init__.py +0 -0
  9. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/api.py +0 -0
  10. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/const.py +0 -0
  11. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/interface/__init__.py +0 -0
  12. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/interface/erc20.py +0 -0
  13. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/interface/erc721.py +0 -0
  14. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/interface/sol.py +0 -0
  15. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/types/SOLcheque.py +0 -0
  16. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/types/__init__.py +0 -0
  17. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/utils/__init__.py +0 -0
  18. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK/utils/utils.py +0 -0
  19. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
  20. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
  21. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/shadowPaySDK.egg-info/requires.txt +0 -0
  22. {shadowpaysdk-0.2.0.11 → shadowpaysdk-0.2.0.13}/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.11
3
+ Version: 0.2.0.13
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.11',
5
+ version='0.2.0.13',
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',
@@ -67,18 +67,30 @@ class Cheque:
67
67
  async def InitCheque(self, amount, receiver:list, private_key:Optional[str] = None):
68
68
  if not isinstance(receiver,list):
69
69
  raise ValueError("Receiver must be a list of addresses, [""0x1234...5678", "0x2345...6789""]")
70
-
70
+ if private_key:
71
+ address = self.w3.eth.account.from_key(private_key).address
72
+ elif self.private_key:
73
+ address = self.w3.eth.account.from_key(self.private_key).address
74
+ elif self.address:
75
+ address = self.address
76
+ else:
77
+ raise ValueError("No private key or address provided")
78
+
79
+
80
+
81
+
82
+
71
83
  receiver = [Web3.to_checksum_address(addr) for addr in receiver]
72
84
  estimated_gas = self.contract.functions.InitCheque(receiver).estimate_gas({
73
- 'from': self.w3.eth.account.from_key(private_key or self.private_key).address,
85
+ 'from': address,
74
86
  'value': self.w3.to_wei(amount, 'ether'),
75
87
  'gasPrice': self.w3.eth.gas_price
76
88
  })
77
89
  txn = self.contract.functions.InitCheque(receiver).build_transaction({
78
- 'from': self.w3.eth.account.from_key(private_key or self.private_key).address or self.address,
90
+ 'from': address,
79
91
  'value': self.w3.to_wei(amount, 'ether'),
80
92
  'nonce': self.w3.eth.get_transaction_count(
81
- self.w3.eth.account.from_key(private_key or self.private_key).address or self.address
93
+ address
82
94
  ),
83
95
  'gas': estimated_gas,
84
96
  'gasPrice': self.w3.eth.gas_price,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 0.2.0.11
3
+ Version: 0.2.0.13
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