iwa 0.0.64__py3-none-any.whl → 0.0.66__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.
- iwa/core/services/transfer/__init__.py +2 -2
- iwa/plugins/olas/service_manager/drain.py +7 -0
- iwa/web/routers/state.py +8 -0
- iwa/web/static/app.js +15 -1
- iwa/web/static/index.html +2 -2
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/METADATA +1 -1
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/RECORD +11 -11
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/WHEEL +0 -0
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/entry_points.txt +0 -0
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/licenses/LICENSE +0 -0
- {iwa-0.0.64.dist-info → iwa-0.0.66.dist-info}/top_level.txt +0 -0
|
@@ -136,8 +136,8 @@ class TransferService(
|
|
|
136
136
|
|
|
137
137
|
amount_eth = float(chain_interface.web3.from_wei(amount_wei, "ether"))
|
|
138
138
|
logger.info(
|
|
139
|
-
f"Sending {amount_eth:.4f} {
|
|
140
|
-
f"from {from_address_or_tag} to {to_address_or_tag}"
|
|
139
|
+
f"Sending {amount_eth:.4f} {token_symbol} "
|
|
140
|
+
f"from {from_tag or from_address_or_tag} to {to_tag or to_address_or_tag}"
|
|
141
141
|
)
|
|
142
142
|
|
|
143
143
|
if is_safe:
|
|
@@ -80,6 +80,13 @@ class DrainManagerMixin:
|
|
|
80
80
|
logger.error("Failed to prepare claim transaction")
|
|
81
81
|
return False, 0
|
|
82
82
|
|
|
83
|
+
# Simulate transaction to catch revert before sending
|
|
84
|
+
try:
|
|
85
|
+
staking_contract.chain_interface.web3.eth.call(claim_tx)
|
|
86
|
+
except Exception as e:
|
|
87
|
+
logger.warning(f"Claim would revert, skipping: {e}")
|
|
88
|
+
return False, 0
|
|
89
|
+
|
|
83
90
|
success, receipt = self.wallet.sign_and_send_transaction(
|
|
84
91
|
claim_tx,
|
|
85
92
|
signer_address_or_tag=owner_address,
|
iwa/web/routers/state.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from fastapi import APIRouter, Depends
|
|
4
4
|
|
|
5
5
|
from iwa.core.chain import ChainInterfaces
|
|
6
|
+
from iwa.core.models import Config
|
|
6
7
|
from iwa.web.dependencies import verify_auth
|
|
7
8
|
|
|
8
9
|
router = APIRouter(prefix="/api", tags=["state"])
|
|
@@ -25,12 +26,19 @@ def get_state(auth: bool = Depends(verify_auth)):
|
|
|
25
26
|
# Get token symbols from the interface (dict of symbol -> address)
|
|
26
27
|
tokens[name] = list(interface.tokens.keys())
|
|
27
28
|
|
|
29
|
+
# Get whitelist from config
|
|
30
|
+
config = Config()
|
|
31
|
+
whitelist = {}
|
|
32
|
+
if config.core and config.core.whitelist:
|
|
33
|
+
whitelist = {tag: str(addr) for tag, addr in config.core.whitelist.items()}
|
|
34
|
+
|
|
28
35
|
return {
|
|
29
36
|
"chains": chain_names,
|
|
30
37
|
"tokens": tokens,
|
|
31
38
|
"native_currencies": native_currencies,
|
|
32
39
|
"default_chain": "gnosis",
|
|
33
40
|
"testing": ChainInterfaces().gnosis.is_tenderly,
|
|
41
|
+
"whitelist": whitelist,
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
|
iwa/web/static/app.js
CHANGED
|
@@ -12,6 +12,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
12
12
|
olasServicesCache: {}, // { chain: [services] }
|
|
13
13
|
stakingContractsCache: null, // Cached staking contracts
|
|
14
14
|
olasPriceCache: null, // Cached OLAS price in EUR
|
|
15
|
+
whitelist: {}, // { tag: address } from config
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
// Real-time countdown updater for unstake availability
|
|
@@ -138,6 +139,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
138
139
|
state.chains = data.chains;
|
|
139
140
|
state.tokens = data.tokens;
|
|
140
141
|
state.nativeCurrencies = data.native_currencies || {};
|
|
142
|
+
state.whitelist = data.whitelist || {};
|
|
141
143
|
|
|
142
144
|
// Update status indicator for testing mode
|
|
143
145
|
const statusText = document.getElementById("status-text");
|
|
@@ -518,12 +520,24 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
518
520
|
)
|
|
519
521
|
.join("");
|
|
520
522
|
|
|
521
|
-
|
|
523
|
+
// Build To options: own accounts + whitelisted addresses
|
|
524
|
+
const accountOptions = state.accounts
|
|
522
525
|
.map(
|
|
523
526
|
(acc) =>
|
|
524
527
|
`<option value="${escapeHtml(acc.tag)}">${escapeHtml(acc.tag)}</option>`,
|
|
525
528
|
)
|
|
526
529
|
.join("");
|
|
530
|
+
const whitelistOptions = Object.entries(state.whitelist)
|
|
531
|
+
.map(
|
|
532
|
+
([tag, addr]) =>
|
|
533
|
+
`<option value="${escapeHtml(addr)}">${escapeHtml(tag)} (whitelist)</option>`,
|
|
534
|
+
)
|
|
535
|
+
.join("");
|
|
536
|
+
toSelect.innerHTML =
|
|
537
|
+
accountOptions +
|
|
538
|
+
(whitelistOptions
|
|
539
|
+
? `<optgroup label="Whitelist">${whitelistOptions}</optgroup>`
|
|
540
|
+
: "");
|
|
527
541
|
|
|
528
542
|
tokenSelect.innerHTML =
|
|
529
543
|
`<option value="native">${escapeHtml(nativeSymbol)}</option>` +
|
iwa/web/static/index.html
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
<div class="form-group">
|
|
120
120
|
<label>Amount</label>
|
|
121
|
-
<input type="number" id="tx-amount" step="
|
|
121
|
+
<input type="number" id="tx-amount" step="any" placeholder="0.00" required />
|
|
122
122
|
</div>
|
|
123
123
|
<div class="form-group">
|
|
124
124
|
<label>Token</label>
|
|
@@ -538,6 +538,6 @@
|
|
|
538
538
|
</div>
|
|
539
539
|
<!-- Modals (minimal implementation for now) -->
|
|
540
540
|
<div id="toast-container" class="toast-container"></div>
|
|
541
|
-
<script src="/static/app.js?v=1.0.
|
|
541
|
+
<script src="/static/app.js?v=1.0.6"></script>
|
|
542
542
|
</body>
|
|
543
543
|
</html>
|
|
@@ -43,7 +43,7 @@ iwa/core/services/plugin.py,sha256=GNNlbtELyHl7MNVChrypF76GYphxXduxDog4kx1MLi8,3
|
|
|
43
43
|
iwa/core/services/safe.py,sha256=vqvpk7aIqHljaG1zYYpmKdW4mi5OVuoyXcpReISPYM0,15744
|
|
44
44
|
iwa/core/services/safe_executor.py,sha256=TqpDgtvh8d5cedYAKBj7s1SW7EnomTT9MW_GnYWMxDE,17157
|
|
45
45
|
iwa/core/services/transaction.py,sha256=FrGRWn1xo5rbGIr2ToZ2kPzapr3zmWW38oycyB87TK8,19971
|
|
46
|
-
iwa/core/services/transfer/__init__.py,sha256=
|
|
46
|
+
iwa/core/services/transfer/__init__.py,sha256=7p22xtwrH0murXWTuTGNw0WRKBDqjJEnnVaUpWd8Vfo,5589
|
|
47
47
|
iwa/core/services/transfer/base.py,sha256=sohz-Ss2i-pGYGl4x9bD93cnYKcSvsXaXyvyRawvgQs,9043
|
|
48
48
|
iwa/core/services/transfer/erc20.py,sha256=e6RD1_QcI_-iJvP85kj7aw4p6NnCPjZcm-QSKi14RRA,10104
|
|
49
49
|
iwa/core/services/transfer/multisend.py,sha256=MuOTjzUQoYg1eSixXKhJGBmB1c0ymLelvk4puHm_VGE,15194
|
|
@@ -93,7 +93,7 @@ iwa/plugins/olas/scripts/test_full_mech_flow.py,sha256=Fqoq5bn7Z_3YyRrnuqNAZy9cw
|
|
|
93
93
|
iwa/plugins/olas/scripts/test_simple_lifecycle.py,sha256=8T50tOZx3afeECSfCNAb0rAHNtYOsBaeXlMwKXElCk8,2099
|
|
94
94
|
iwa/plugins/olas/service_manager/__init__.py,sha256=GXiThMEY3nPgHUl1i-DLrF4h96z9jPxxI8Jepo2E1PM,1926
|
|
95
95
|
iwa/plugins/olas/service_manager/base.py,sha256=EBPg0ymqgtAb7ZvVSfTt31QYgv_6gp4UAc6je00NLAg,5009
|
|
96
|
-
iwa/plugins/olas/service_manager/drain.py,sha256=
|
|
96
|
+
iwa/plugins/olas/service_manager/drain.py,sha256=tJLqvMEPOymxukFuxt-AdgOB4bIIciKcXoxOPx9j-LM,13983
|
|
97
97
|
iwa/plugins/olas/service_manager/lifecycle.py,sha256=Jz2WTsBE_kGjFnsnpQlUBmMM2csOuqEfYdvj4cLrNuU,50586
|
|
98
98
|
iwa/plugins/olas/service_manager/mech.py,sha256=NVzVbEmyOe3wK92VEzCCOSuy3HDkEP1MSoVt7Av8Psk,27949
|
|
99
99
|
iwa/plugins/olas/service_manager/staking.py,sha256=kT9OOQ4fi3FrIJB2T2gsvmv7DBRD6pDxqcXXh2o6iwc,29600
|
|
@@ -150,7 +150,7 @@ iwa/web/dependencies.py,sha256=0_dAJlRh6gKrUDRPKUe92eshFsg572yx_H0lQgSqGDA,2103
|
|
|
150
150
|
iwa/web/models.py,sha256=MSD9WPy_Nz_amWgoo2KSDTn4ZLv_AV0o0amuNtSf-68,3035
|
|
151
151
|
iwa/web/server.py,sha256=4ZLVFEKoGs_NoCcXMeyYzDNdxUXazjwHQaX7CR1pwHE,5239
|
|
152
152
|
iwa/web/routers/accounts.py,sha256=VhCHrwzRWqZcSW-tTEqFWT5hFl-IYEWpqXeuN8xM3-4,3922
|
|
153
|
-
iwa/web/routers/state.py,sha256=
|
|
153
|
+
iwa/web/routers/state.py,sha256=wsBAOIWZeMWjMwLiiWVhuEXHAceI0IIq6CPpmh7SbIc,2469
|
|
154
154
|
iwa/web/routers/swap.py,sha256=8xycAytquR29ELxW3vx428W8s9bI_w_x2kpRhhJ0KXY,22630
|
|
155
155
|
iwa/web/routers/transactions.py,sha256=bRjfD7zcuX3orVIHzOMVsIkEtcE_pM_KCom4cdAKV6Q,5602
|
|
156
156
|
iwa/web/routers/olas/__init__.py,sha256=Jo6Dm1e8fHafCD800fbxsxeFz3tvuEEKXEf5-9tj5Qg,947
|
|
@@ -159,14 +159,14 @@ iwa/web/routers/olas/funding.py,sha256=f8fADNtbZEBFl-vuVKfas6os38Vot6K5tJBTenZmC
|
|
|
159
159
|
iwa/web/routers/olas/general.py,sha256=dPsBQppTGoQY1RztliUhseOHOZGeeCR10lhThD9kyXo,803
|
|
160
160
|
iwa/web/routers/olas/services.py,sha256=jDbxLUJBN48vs2-fXrIpxhPSM6quqYxggmMOkUVEIaI,18200
|
|
161
161
|
iwa/web/routers/olas/staking.py,sha256=jktJ2C1Q9X4aC0tWJByN3sHpEXY0EIvr3rr4N0MtXXc,14081
|
|
162
|
-
iwa/web/static/app.js,sha256=
|
|
163
|
-
iwa/web/static/index.html,sha256=
|
|
162
|
+
iwa/web/static/app.js,sha256=VCm9zPJERb9pX6zbFQ_7D47UnztGdibrkZ1dmwhsvdc,114949
|
|
163
|
+
iwa/web/static/index.html,sha256=Qg06MFK__2KxwWTr8hhjX_GwsoN53QsLCTypu4fBR-Q,28516
|
|
164
164
|
iwa/web/static/style.css,sha256=7i6T96pS7gXSLDZfyp_87gRlyB9rpsFWJEHJ-dRY1ug,24371
|
|
165
165
|
iwa/web/tests/test_web_endpoints.py,sha256=vA25YghHNB23sbmhD4ciesn_f_okSq0tjlkrSiKZ0rs,24007
|
|
166
166
|
iwa/web/tests/test_web_olas.py,sha256=GunKEAzcbzL7FoUGMtEl8wqiqwYwA5lB9sOhfCNj0TA,16312
|
|
167
167
|
iwa/web/tests/test_web_swap.py,sha256=7A4gBJFL01kIXPtW1E1J17SCsVc_0DmUn-R8kKrnnVA,2974
|
|
168
168
|
iwa/web/tests/test_web_swap_coverage.py,sha256=zGNrzlhZ_vWDCvWmLcoUwFgqxnrp_ACbo49AtWBS_Kw,5584
|
|
169
|
-
iwa-0.0.
|
|
169
|
+
iwa-0.0.66.dist-info/licenses/LICENSE,sha256=eIubm_IlBHPYRQlLNZKbBNKhJUUP3JH0A2miZUhAVfI,1078
|
|
170
170
|
tests/legacy_cow.py,sha256=oOkZvIxL70ReEoD9oHQbOD5GpjIr6AGNHcOCgfPlerU,8389
|
|
171
171
|
tests/legacy_safe.py,sha256=AssM2g13E74dNGODu_H0Q0y412lgqsrYnEzI97nm_Ts,2972
|
|
172
172
|
tests/legacy_transaction_retry_logic.py,sha256=D9RqZ7DBu61Xr2djBAodU2p9UE939LL-DnQXswX5iQk,1497
|
|
@@ -224,8 +224,8 @@ tests/test_utils.py,sha256=vkP49rYNI8BRzLpWR3WnKdDr8upeZjZcs7Rx0pjbQMo,1292
|
|
|
224
224
|
tests/test_workers.py,sha256=MInwdkFY5LdmFB3o1odIaSD7AQZb3263hNafO1De5PE,2793
|
|
225
225
|
tools/create_and_stake_service.py,sha256=1xwy_bJQI1j9yIQ968Oc9Db_F6mk1659LuuZntTASDE,3742
|
|
226
226
|
tools/verify_drain.py,sha256=PkMjblyOOAuQge88FwfEzRtCYeEtJxXhPBmtQYCoQ-8,6743
|
|
227
|
-
iwa-0.0.
|
|
228
|
-
iwa-0.0.
|
|
229
|
-
iwa-0.0.
|
|
230
|
-
iwa-0.0.
|
|
231
|
-
iwa-0.0.
|
|
227
|
+
iwa-0.0.66.dist-info/METADATA,sha256=XgG92uv_4y_Td88AjTYAknzLghILTIyM7KwLSbS3MUI,7337
|
|
228
|
+
iwa-0.0.66.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
229
|
+
iwa-0.0.66.dist-info/entry_points.txt,sha256=nwB6kscrfA7M00pYmL2j-sBH6eF6h2ga9IK1BZxdiyQ,241
|
|
230
|
+
iwa-0.0.66.dist-info/top_level.txt,sha256=kedS9cRUbm4JE2wYeabIXilhHjN8KCw0IGbqqqsw0Bs,16
|
|
231
|
+
iwa-0.0.66.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|