First things first, you need to install the cairo-lang package, preferably in a virtual env you can later use and upgrade. Currently only python 3.7 and 3.8 is supported
python3 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate
" Vim syntax file | |
" | |
" Language: CAIRO | |
if exists("b:current_syntax") | |
finish | |
endif | |
syntax include @python syntax/python.vim |
# add this to your hardhat config | |
# compilers: [ | |
# { | |
# version: "0.8.13", | |
# settings: { | |
# viaIR: true, | |
# outputSelection: { | |
# "*": { | |
# "*": ["irOptimized"], | |
# }, |
CRITICAL! Almost all USDC liquidity on the REKT/USDC uniswap pool can be stolen, due to an authorization issue with burnFrom()
on the REKT token.
Uniswap v2 pools get the prices for their swaps by comparing the relative amounts of each of the two tokens that they hold. If the pool holds very little of token A, and a lot of token B, then it only takes a little of token A to buy a lot of token B.
Currently REKT and USDC are fairly priced in the pool. If there were to suddenly be very little REKT in the pool, but the same amount of USDC, then very little REKT would be able to buy a lot of USDC.
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
contract Caller { | |
uint256 flag = 0; | |
event InsideBeforeDelegate(); | |
event InsideAfterDelegate(); | |
event OutsideAfterAllWtf(); |
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract Token { | |
address public owner; | |
uint256 public totalSupply; | |
mapping (address => uint256) public balanceOf; | |
mapping (address => mapping (address => uint256)) public allowance; | |
string public symbol = "TOKEN"; | |
uint256 public decimals = 18; |
#!/bin/bash | |
# This script is intended to make switching between laptop and external displays easier when using i3+dmenu | |
# To run this script, map it to some shortcut in your i3 config, e.g: | |
# bindsym $mod+p exec --no-startup-id $config/display.sh |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
sudo apt-get install checkinstall | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
cd ~ |
<?xml version="1.0"?> | |
<ThermalConfiguration> | |
<Platform> | |
<Name>T430</Name> | |
<ProductName>*</ProductName> | |
<Preference>QUIET</Preference> | |
<ThermalSensors> | |
<ThermalSensor> | |
<Type>pkg-temp-0</Type> | |
<Path>/sys/class/thermal/thermal_zone0/temp</Path> |