shadowPaySDK 0.2.0.4__py3-none-any.whl → 0.2.0.5__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 +2 -2
- shadowPaySDK/types/EVMcheque.py +4 -7
- {shadowpaysdk-0.2.0.4.dist-info → shadowpaysdk-0.2.0.5.dist-info}/METADATA +1 -1
- {shadowpaysdk-0.2.0.4.dist-info → shadowpaysdk-0.2.0.5.dist-info}/RECORD +7 -7
- {shadowpaysdk-0.2.0.4.dist-info → shadowpaysdk-0.2.0.5.dist-info}/WHEEL +0 -0
- {shadowpaysdk-0.2.0.4.dist-info → shadowpaysdk-0.2.0.5.dist-info}/licenses/LICENSE +0 -0
- {shadowpaysdk-0.2.0.4.dist-info → shadowpaysdk-0.2.0.5.dist-info}/top_level.txt +0 -0
shadowPaySDK/interface/erc20.py
CHANGED
@@ -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"
|
112
|
+
return f"{self._format_tx(self.web3.to_hex(tx_hash))}"
|
113
113
|
|
shadowPaySDK/types/EVMcheque.py
CHANGED
@@ -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(
|
230
|
-
|
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),
|
@@ -2,16 +2,16 @@ shadowPaySDK/__init__.py,sha256=lV_L5SuQMPAt5XDkeZScJqLo43gtP-pNbsuErOSNOVw,727
|
|
2
2
|
shadowPaySDK/api.py,sha256=cv5Z171cOh-Idi-lMA4AORzeGDPPrk8BCQ9e5V9MAaM,1461
|
3
3
|
shadowPaySDK/const.py,sha256=T7TJPKFLqCtxwpUYO1AOryGMr65G-vVuotxfL8gWcME,9898
|
4
4
|
shadowPaySDK/interface/__init__.py,sha256=QceU3dWteSgwvMnR3JDVdmS8OgdRPjvl9JzRs7IsA74,152
|
5
|
-
shadowPaySDK/interface/erc20.py,sha256=
|
5
|
+
shadowPaySDK/interface/erc20.py,sha256=TIsek7ykuYsLMj5no-uastA5gYsIbk-F_Dq-5XPk_6w,4298
|
6
6
|
shadowPaySDK/interface/erc721.py,sha256=4AlWfDjrvl85wFocnN93j-oM54kTsLLwv9SdtcLj4eM,3094
|
7
7
|
shadowPaySDK/interface/sol.py,sha256=xgJZsg4xE-_dRctGUW_mHuGj_o_0OlKNp4Gr7IXvTEc,5586
|
8
|
-
shadowPaySDK/types/EVMcheque.py,sha256=
|
8
|
+
shadowPaySDK/types/EVMcheque.py,sha256=XmKONZ5Sk2v4Ro2vY7qR-aciq-d2OQmecL0IF_wuweM,11938
|
9
9
|
shadowPaySDK/types/SOLcheque.py,sha256=gmivsCK4hm_6pzQ9whPGuQ_f7qfcUfiJfQgb5ZsJYDo,884
|
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.
|
14
|
-
shadowpaysdk-0.2.0.
|
15
|
-
shadowpaysdk-0.2.0.
|
16
|
-
shadowpaysdk-0.2.0.
|
17
|
-
shadowpaysdk-0.2.0.
|
13
|
+
shadowpaysdk-0.2.0.5.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
|
14
|
+
shadowpaysdk-0.2.0.5.dist-info/METADATA,sha256=8ss0DAS4p2tncgKTw5DQdCs5FmGUZ2al-Wa3ljVhIKI,839
|
15
|
+
shadowpaysdk-0.2.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
16
|
+
shadowpaysdk-0.2.0.5.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
|
17
|
+
shadowpaysdk-0.2.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|