Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
🚨 BREAKING: $117M in assets stolen from @Balancer in the last 2 hours after a major hack!!!
🔹 Assets stolen are across multiple chains: #Ethereum, #Base, #Optimism, #Sonic, #Polygon, #Berachain – mainly in Liquid Staking Tokens (LSTs) of $ETH.
Top 5 stolen assets:
• 7,838 $WETH (~$29.1M)
• 6,841 $OSETH (~$26.8M)
• 4,459 $WSTETH (~$20.1M)
• 2,405 $SFRXETH (~$10M)
• 2,038 $RSETH (~$8.67M)
🔹 The hacker is acting quickly: Converting LSTs into $ETH in real-time!
🔹 Big move: Whale account 0x009, dormant for 3 YEARS, just resurfaced after the exploit and withdrew $7.38M worth of assets from #Balancer!
⚠️ ALERT: If you’re still on #Balancer, secure your funds NOW before it’s too late! 🔐
Follow @spotonchain for more updates about the hack!
https://x.com/spotonchain/status/1985289043383300351