Skip to content

Commit 7a41889

Browse files
committed
minor fix
1 parent e5f26d4 commit 7a41889

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

examples/python/evm/swaps/account.swap_with_network_hoisting.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ async def main():
235235
print('Please uncomment the code below to execute the swap.')
236236

237237
# Uncomment below to execute actual swap (requires sufficient balance and allowances)
238-
238+
"""
239239
try:
240240
result = await network_account.swap(
241241
AccountSwapOptions( # TODO revise
@@ -264,9 +264,7 @@ async def main():
264264
print(f"Transaction Explorer: https://arbiscan.io/tx/{result.transaction_hash}")
265265
except Exception as error:
266266
print(f"Failed to swap on {NETWORK}: {error}")
267-
268-
269-
# recomment to here
267+
"""
270268

271269
# Example 3. account.quote_swap() + execute
272270
# This demonstrates the quote-then-execute pattern for more control.
@@ -302,7 +300,7 @@ async def main():
302300
print('Please uncomment the code below to execute the swap.')
303301

304302
# Uncomment to actually execute:
305-
303+
"""
306304
result = await swap_quote.execute()
307305
print(f"Transaction Hash: {result.transaction_hash}")
308306
print(f"Waiting for confirmation...")
@@ -319,8 +317,7 @@ async def main():
319317
print(f"Transaction Explorer: https://explorer.optimism.io/tx/{result.transaction_hash}")
320318
elif NETWORK == 'arbitrum':
321319
print(f"Transaction Explorer: https://arbiscan.io/tx/{result.transaction_hash}")
322-
323-
# recomment to here
320+
"""
324321

325322
except Exception as error:
326323
print(f"Quote and execute pattern failed on {NETWORK}: {error}")

examples/python/evm/swaps/smart_account.swap_with_network_hoisting.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
load_dotenv()
3333

3434
# Network configuration
35-
NETWORK = "arbitrum" # "optimism" or "arbitrum" for this example
35+
NETWORK = "optimism" # "optimism" or "arbitrum" for this example
3636

3737
# Token definitions for different networks
3838
TOKENS = {
@@ -218,7 +218,7 @@ async def main():
218218
print('Please uncomment the code below to execute the swap.')
219219

220220
# Uncomment below to execute actual smart account swap (requires sufficient balance and allowances)
221-
221+
"""
222222
try:
223223
result = await network_smart_account.swap(
224224
SmartAccountSwapOptions(
@@ -246,9 +246,7 @@ async def main():
246246
print(f"Transaction Explorer: https://arbiscan.io/tx/{result.user_op_hash}")
247247
except Exception as error:
248248
print(f"Failed to swap with smart account on {NETWORK}: {error}")
249-
250-
251-
# recomment to here
249+
"""
252250

253251
# Example 3. smart_account.quote_swap() + execute
254252
# This demonstrates the quote-then-execute pattern for smart accounts with more control.
@@ -284,7 +282,7 @@ async def main():
284282
print('Please uncomment the code below to execute the swap.')
285283

286284
# Uncomment to actually execute:
287-
285+
"""
288286
print(f"✅ Conditions met, executing smart account swap...")
289287
result = await swap_quote.execute()
290288
print(f"User Operation Hash: {result.user_op_hash}")
@@ -301,9 +299,7 @@ async def main():
301299
print(f"Transaction Explorer: https://explorer.optimism.io/tx/{result.user_op_hash}")
302300
elif NETWORK == 'arbitrum':
303301
print(f"Transaction Explorer: https://arbiscan.io/tx/{result.user_op_hash}")
304-
305-
306-
# recomment to here
302+
"""
307303

308304
except Exception as error:
309305
print(f"Smart account quote and execute pattern failed on {NETWORK}: {error}")

0 commit comments

Comments
 (0)