Translate EVM bytecode into opcodes using pure Regex :)
Demo: https://twitter.com/0x796/status/1608039943582142464
Try here: https://regex101.com/
Use PCRE2 (Perl compatible) Regex flavor.
Search:
| >>> yswap = Contract.from_explorer('0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51') | |
| >>> yusd = Contract.from_explorer('0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c') | |
| >>> ycrv = Contract.from_explorer('0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8') | |
| # coins are 0 = idai, 1 = iusdc, 2 = iusdt, 3 = itusd | |
| # underlying coins are 0 = dai, 1 = usdc, 2 = usdt, 3 = tusd | |
| # this gets us the i-counterparts which also sit in money markets | |
| >>> coins = [Contract.from_explorer(yswap.coins(i)) for i in range(4)] | |
| >>> dec = [10 ** coin.decimals() for coin in coins] | |
| [1000000000000000000, 1000000, 1000000, 1000000000000000000] |
| from brownie import accounts, chain, Contract, Wei | |
| from eth_abi.packed import encode_abi_packed | |
| user = accounts[0] | |
| weth = Contract('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', owner=user) | |
| dai = '0x6B175474E89094C44Da98b954EedeAC495271d0F' | |
| rai = '0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919' | |
| # https://github.com/Uniswap/uniswap-v3-periphery/blob/main/deploys.md | |
| quoter = Contract('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6') |
| // https://rxjs.dev/api | |
| const { from, timer } = require('rxjs'); | |
| const { last, map, catchError, switchMap } = require('rxjs/operators'); | |
| // https://danfo.jsdata.org/ | |
| const dfd = require('danfojs-node'); | |
| let latestBlocktime = 2.2; | |
| function getBlocktime() { | |
| return from(dfd.readCSV('https://polygonscan.com/chart/blocktime?output=csv')).pipe( |
| import httpx | |
| import cytoolz as tz # type: ignore | |
| from cytoolz import curried as c # type: ignore | |
| black_list_crypto: list = ['FTT', 'SOL', 'CHZ', 'BNT', 'SUSHI'] | |
| COLLATERAL: int = 1500 | |
| BASE_SPREAD: float = 0.0025 | |
| gtrade_trading_vars: dict = httpx.get("https://gains-farm-v2-mainnet.herokuapp.com/trading-variables").json() | |
| FROM_SYMBOLS_ALL: list = [x['from'] for x in gtrade_trading_vars['pairs']] |
Translate EVM bytecode into opcodes using pure Regex :)
Demo: https://twitter.com/0x796/status/1608039943582142464
Try here: https://regex101.com/
Use PCRE2 (Perl compatible) Regex flavor.
Search:
| """ | |
| pip install httpx orjson websockets loguru chime | |
| to run: | |
| python -u "<folder_path>/wss_logger.py" | |
| """ | |
| import sys | |
| import asyncio | |
| import httpx |
| I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
| The following are my contribution signatures: | |
| Circuit: semaphore16 | |
| Contributor # 182 | |
| Hash: aaf3a1da 5881ccef 2947e06c 6b79febf | |
| eb07c335 9e34cd10 60f57ea7 39e446a2 | |
| 11d3df5e b024ce28 bef24ee4 293307eb | |
| 7b562eec e4df87b3 fab92b8a 2126610e | |
| #Using Scrapy with Selenium to scape a rendered page [Updated] | |
| from scrapy.contrib.spiders.init import InitSpider | |
| from scrapy.http import Request, FormRequest | |
| from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
| from scrapy.contrib.spiders import CrawlSpider, Rule | |
| from scrapy.spider import BaseSpider | |
| from scrapy.selector import HtmlXPathSelector | |
| from selenium import selenium |
| #!/usr/local/bin/python | |
| ''' | |
| Date July 4, 2012 | |
| Author: Justin Jessup | |
| GNU GENERAL PUBLIC LICENSE | |
| Version 3, 29 June 2007 | |
| Disclaimer: | |
| All software provided as is. All software covered under the GPL license and free for public redistribution. |
| from scrapy.contrib.spiders import CrawlSpider, Rule | |
| from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
| from scrapy.selector import HtmlXPathSelector | |
| from myspider.items import CraigslistSampleItem | |
| class MySpider(CrawlSpider): | |
| name = "craigs" | |
| allowed_domains = ["sfbay.craigslist.org"] | |
| start_urls = ["http://sfbay.craigslist.org/"] |