shadowPaySDK 0.2.0.18__py3-none-any.whl → 0.2.0.19__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.
@@ -23,7 +23,7 @@ class Cheque:
23
23
  def get_id(self, tx):
24
24
  if isinstance(tx, str):
25
25
  try:
26
- tx = self.w3.eth.get_transaction_receipt(tx)
26
+ tx = self.w3.eth.wait_for_transaction_receipt(tx)
27
27
  except Exception as e:
28
28
  print(f"Failed to get transaction receipt: {str(e)}")
29
29
  return False
@@ -276,9 +276,8 @@ class Cheque:
276
276
  erc20 = shadowPaySDK.ERC20Token(w3=self.w3)
277
277
  erc20.set_params(token_address=token_in)
278
278
  approve = erc20.allowance(
279
- private_key=self.private_key,
280
279
  spender=self.contract.address,
281
- amount=amount_in,
280
+ owner=address,
282
281
  )
283
282
  decimals = erc20.get_decimals()
284
283
  erc20.set_params(token_address=token_out)
@@ -290,7 +289,7 @@ class Cheque:
290
289
  Web3.to_checksum_address(token_out),
291
290
  int(amount_out * (10 ** token_out_decinals)),
292
291
  ).estimate_gas({
293
- 'from': self.w3.eth.account.from_key(self.private_key).address,
292
+ 'from': address,
294
293
  'gasPrice': self.w3.eth.gas_price
295
294
  })
296
295
  txn = self.contract.functions.InitSwapCheque(
@@ -300,8 +299,8 @@ class Cheque:
300
299
  Web3.to_checksum_address(token_out),
301
300
  int(amount_out * (10 ** token_out_decinals))
302
301
  ).build_transaction({
303
- 'from': self.w3.eth.account.from_key(self.private_key).address,
304
- 'nonce': self.w3.eth.get_transaction_count(self.w3.eth.account.from_key(self.private_key).address),
302
+ 'from': address,
303
+ 'nonce': self.w3.eth.get_transaction_count(address),
305
304
  'gas': estimated_gas,
306
305
  'gasPrice': self.w3.eth.gas_price
307
306
  })
@@ -309,7 +308,7 @@ class Cheque:
309
308
  return {
310
309
  "build_tx": txn
311
310
  }
312
- signed_txn = self.w3.eth.account.sign_transaction(txn, self.private_key)
311
+ signed_txn = self.w3.eth.account.sign_transaction(txn, key)
313
312
  txn_hash = self.w3.eth.send_raw_transaction(signed_txn.raw_transaction)
314
313
  txn_receipt = self.w3.eth.wait_for_transaction_receipt(txn_hash)
315
314
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 0.2.0.18
3
+ Version: 0.2.0.19
4
4
  Summary: ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction
5
5
  Author: dazarius_
6
6
  Author-email: your@email.com
@@ -5,13 +5,13 @@ shadowPaySDK/interface/__init__.py,sha256=ggSZCV22udnzXm_Wv_3x6VN3hNIAEiwgwHZc2J
5
5
  shadowPaySDK/interface/erc20.py,sha256=7p8eU5LzhI2MsH80PZhq6IRhbfMGlNYucGl3OtyS9SI,4669
6
6
  shadowPaySDK/interface/erc721.py,sha256=4AlWfDjrvl85wFocnN93j-oM54kTsLLwv9SdtcLj4eM,3094
7
7
  shadowPaySDK/interface/sol.py,sha256=flMfmW14J4ybfVshUUTw6iklKa5x-zJzjxRi011XKXA,7230
8
- shadowPaySDK/types/EVMcheque.py,sha256=3Nzj-61dWKWG_6lcqR1n24gVqhDb3qt-e_jZ_UceWrg,14765
8
+ shadowPaySDK/types/EVMcheque.py,sha256=8M1EzpZGqf4uidrd9yDKiR7BvIl85p93A_9AMZtshSs,14570
9
9
  shadowPaySDK/types/SOLcheque.py,sha256=S6LnKxiWDj1KGRgFFAaHy03c7mxv4msaR-2cfVIhD2Y,818
10
10
  shadowPaySDK/types/__init__.py,sha256=sG6pNZfKGvENXqsnv6MrQtKrJ898fAXkMvAZY1k1-Qg,97
11
11
  shadowPaySDK/utils/__init__.py,sha256=aja3iYO4rT-ptMM-pzw0GRFTziBdXdcEi-4kE84zH64,61
12
12
  shadowPaySDK/utils/utils.py,sha256=g4bGvLDdjhNGsAj1eaZnNWFNaiN-cVhhM-5PrnG5aIQ,720
13
- shadowpaysdk-0.2.0.18.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
14
- shadowpaysdk-0.2.0.18.dist-info/METADATA,sha256=7n5ROtuI7gEUvNAHnlkQKxtux-owZebiyzFWjTKV6x8,840
15
- shadowpaysdk-0.2.0.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- shadowpaysdk-0.2.0.18.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
17
- shadowpaysdk-0.2.0.18.dist-info/RECORD,,
13
+ shadowpaysdk-0.2.0.19.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
14
+ shadowpaysdk-0.2.0.19.dist-info/METADATA,sha256=is9sOQPaOhCwxHI1XbP2xw9a6Adt2uwPk3u7Aa1x568,840
15
+ shadowpaysdk-0.2.0.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ shadowpaysdk-0.2.0.19.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
17
+ shadowpaysdk-0.2.0.19.dist-info/RECORD,,