Skip to content

Instantly share code, notes, and snippets.

View pcaversaccio's full-sized avatar
πŸ’―
Percent Commitment

sudo rm -rf --no-preserve-root / pcaversaccio

πŸ’―
Percent Commitment
View GitHub Profile
allowances: HashMap[address, HashMap[address, uint256]]
balanceOf: HashMap[address, uint256]
totalSupply: uint256
bundle: ERC20Bundle
def __init__():
... # do things with initializing and totalSupply
@external
@tinchoabbate
tinchoabbate / ezine.txt
Last active December 28, 2023 17:22
First e-zine of The Red Guild. Released for the first time during the security awareness campaign in Ethereum Argentina 2023.
Now available at https://theredguild.org/ezines/1.html
@charles-cooper
charles-cooper / boa_asan.py
Last active January 16, 2024 14:36
address sanitizer
# usage:
# install asan fork of vyper 0.3.10 (`pip install git+https://github.com/charles-cooper/vyper@asan`)
# change `import boa` to `import boa; import boa_asan` in scripts
from eth.exceptions import VMError
import boa.environment
class MemoryAccessViolation(VMError):
pass
@ccerv1
ccerv1 / RPGF3_projects_on_EAS.py
Created November 4, 2023 09:06
Approved RPGF3 projects on EAS
import json
import os
import requests
PROJECT_APP_SCHEMA = "0x76e98cce95f3ba992c2ee25cef25f756495147608a3da3aa2e5ca43109fe77cc"
PROJECT_REVIEW_SCHEMA = "0xebbf697d5d3ca4b53579917ffc3597fb8d1a85b8c6ca10ec10039709903b9277"
REVIEWER_ADDRESS = "0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9"
DATA_EXPORT_JSON = "rpgf3_applicant_data.json"
@samczsun
samczsun / README.md
Last active March 9, 2025 01:00
SEAL 911 Members

This document has been moved!

@devtooligan
devtooligan / TestIsPayable.sol
Created July 1, 2023 19:54
Utility to check if a function is payable
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "forge-std/Test.sol";
contract Utility {
error BadCalldata();
error NonPayable();
error Payable();
error NoCode();
@DanielVF
DanielVF / compare_live.fish
Created June 27, 2023 14:03
Compare deployed contracts to version in local repo
#!/opt/homebrew/bin/fish
# Usage:
# ./compare_live.fish CONTRACT_ADDRESS
# Config
set SRC_DIR /PATH/TO/REPO/CONTRACTS
set OZ_DIR $SRC_DIR/node_modules
# Download
@devtooligan
devtooligan / cursedbeaconproxy.sol
Last active April 9, 2024 16:10
PoC of crit bug found in Astaria.xyz's custom BeaconProxy contract
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
contract SheHateMe {
receive() external payable {}
function getImpl(uint8 x) public returns (address) {
return address(this);
@devtooligan
devtooligan / emitRevertTest.sol
Last active June 15, 2023 22:36
Foundry test - Emit event and revert
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "forge-std/Test.sol";
contract Reverter {
event Test();
function emitAndRevert() external {
emit Test();
@bbuenz
bbuenz / convertocryptobib.py
Last active May 25, 2023 20:02
Script to convert bib entries to matching cryptobib entries
import bibtexparser
from bibtexparser.bibdatabase import BibDatabase
from pybtex.database import parse_file
from pybtex.database import BibliographyData, Entry
from pybtex.utils import OrderedCaseInsensitiveDict
import re
if __name__ == '__main__':
# with open('bitcoin.bib') as bibfile:
# bib_database : BibDatabase=bibtexparser.load(bibfile)