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:
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:
import numpy as np | |
import cvxpy as cp | |
import itertools | |
# Problem data | |
global_indices = list(range(4)) | |
# 0 = TOKEN-0 | |
# 1 = TOKEN-1 | |
# 2 = TOKEN-2 |
# `solc` compiler runtime output with extra bits removed. | |
# solcr [OPTIONS] <CONTRACT_FILE> | |
# example: solcr contract.sol | |
solcr() { | |
solc "$@" --bin-runtime --metadata-hash none | | |
grep '60806040' | | |
sed -e 's/.\{27\}$//g'; | |
} |
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!
The advantages of versions 0.8.*
over <0.8.0
are:
0.8.0
(can be more gas efficient than some
library based safemath).0.8.2
, leads to cheaper runtime gas.
Especially relevant when the contract has small functions. ForI want to open PDF files with Zathura on Mac. Problem is - Zathura does not have a proper App Bundle. So you cannot go in Finder to a pdf file, navigate to ‘Get Info’ and set pdf files to be opened with Zathura.
Luckily, you can create a custom App Bundle that wraps up a script that does that
But that is not as straightforward as you think it is, you can’t just execute a shell script. What if the file already opened with one of the instances of zathura process? Since Zathura is not a native OSX app, it will create a new process instance every time you open it.
The following script opens a file in Zathura, and if it was already opened, it would only activate the right window.
I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.
estimateGas
will return the gas required by my transactionCalling estimateGas
will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i
This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.
The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.
npx create-react-app cra-ts --template typescript
2023-09-26 Казань. Митап по функциональному программированию в Казани Регистрация
Темы:
— про software transactional memory (STM) и том, какие проблемы она решает;
— как работать с иммутабельными данными удобно и без боли.
You can find what kernel modules are loaded using lsmod
.
However some kernel modules are required at stage 1 boot. Basically preloaded in the initial ram disk before switching to the root filesystem. These kernel modules are mostly needed to deal with peripherals, storage devices, filesystems and network devices. You may need to be wary of these required modules:
sd_mod
- SCSI, SATA, and PATA (IDE) devices