Skip to content

Instantly share code, notes, and snippets.

View afa7789's full-sized avatar
🐍
Don't thread on me.

Arthur Abeilice afa7789

🐍
Don't thread on me.
  • Belo Horizonte, Minas Gerais, Brazil
  • X @afa7789
View GitHub Profile
@afa7789
afa7789 / gno_usage.md
Created September 24, 2025 13:17
how to use gno gist. First Draft.

Gno Package Deployment and Call Process

Prerequisites

  • Make sure you have Gno CLI tools installed (gnokey, gnodev, etc).
  • Start a local Gno node for development:
gnodev start --chainid dev
  • Create and fund a key for signing transactions:
@afa7789
afa7789 / main.go
Created August 16, 2025 17:11
FRI implementation in go, based of rust code from: Okm165/zkp_systems_workshops
// code done with Claude Code ( no merits takens )
// based of https://github.com/Okm165/zkp_systems_workshops/blob/master/3_polynomial_commitment_scheme/src/main.rs
// running:
// go run main.go
// Package main provides a simplified educational implementation of the FRI
// (Fast Reed-Solomon Interactive Oracle Proof of Proximity) protocol in Go.
//
// This implementation is designed for teaching purposes to demonstrate the core
// concepts of FRI, which is a foundational component in many modern STARK
// (Scalable Transparent Argument of Knowledge) systems.
@afa7789
afa7789 / proxy_guide_sol.md
Created August 9, 2025 14:39
Proxy Pattern Guide

Smart Contract Proxy Patterns Guide

What is the AppStorage Pattern?

The AppStorage pattern uses a deterministic storage slot to organize contract data:

library AppStorage {
    bytes32 constant POSITION = keccak256("app.storage.v1");
 
@afa7789
afa7789 / init.vim
Last active July 3, 2025 20:15
neovim config ( para não esquecer )
Your Neovim (`v0.11.2`) uses **Vim-Plug** with plugins in `~/.vim/plugged`: `coc.nvim` (LSP), `papercolor-theme` (theme), `fzf` (fuzzy finder), `tagbar` (code tags), `vim-go` (Go support, causing `noshellslash` error), `nerdtree` (file explorer), `vim-multiple-cursors` (multi-cursor editing), and `vim-solidity` (Solidity syntax). Config is in `~/.config/nvim/init.vim`, with settings for syntax, indentation, search, and `coc.nvim` mappings. No `~/.vimrc` or `init.lua`.
**To reset and reinstall** (avoiding `vim-go`):
```bash
cp -r ~/.config/nvim ~/.config/nvim.bak
rm -rf ~/.vim/plugged ~/.local/share/nvim ~/.cache/nvim ~/.config/nvim
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
mkdir -p ~/.config/nvim && nvim ~/.config/nvim/init.vim
# Paste: call plug#begin('~/.vim/plugged') | Plug 'preservim/nerdtree' | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | Plug 'junegunn/fzf.vim' | Plug 'vim-airline/vim-airline' | Plug '
@afa7789
afa7789 / balance_accounts.py
Last active October 22, 2024 17:32
With a accounts.json I can use simulate transactions and cast_rpc is the checker for the condition that it should be different.
# I have a accounts.json. with [{account:"0xaddress_public_key",private_key:"0xprivate_key"},]
# this creates the info I need to put on cdk-erigon to add balance to the accounts I want to simulate.
import json
# Load accounts data from JSON file
with open('accounts.json', 'r') as f:
data = json.load(f)
# Create a dictionary to store the new formatted data
formatted_data = {}
@afa7789
afa7789 / MultiFactory.sol
Created January 25, 2024 18:49
A contract for Factory, which will support multiple implementations
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
/// @title MultiFactory Contract for creating clones of multiple implementations
/// @dev Extends AccessControl and Initializable from OpenZeppelin
contract MultiFactory is AccessControl, Initializable {