Skip to content

Instantly share code, notes, and snippets.

View yabirgb's full-sized avatar
🤡
Working from home

Yábir Benchakhtir yabirgb

🤡
Working from home
View GitHub Profile
@yabirgb
yabirgb / changes.md
Created February 28, 2025 18:23
rotki 1.38.0 assets
@yabirgb
yabirgb / gist:7280386094eba307de2b7795d31f322b
Created February 29, 2024 08:51
Updates for curve cache
This file has been truncated, but you can view the full file.
INSERT INTO address_book(address,blockchain,name) VALUES('0x0024271A09284bbF227465a9AF312667BE62346E','ETH','ETHx/WETH');
INSERT INTO address_book(address,blockchain,name) VALUES('0x0060E266c2AF65bfc4fd51b04c93d952DF805630','ETH','Curve gauge for Curve.fi Factory Plain Pool: sdFXS/FXS');
INSERT INTO address_book(address,blockchain,name) VALUES('0x007ECFD6342C0Cc12A2f0928eDbeE8bFAF675185','ETH','DOLA/FRAXPYUSD');
INSERT INTO address_book(address,blockchain,name) VALUES('0x00e6Fd108C4640d21B40d02f18Dd6fE7c7F725CA','ETH','USDV-3crv');
INSERT INTO address_book(address,blockchain,name) VALUES('0x02498De890c66fA387E86E04d75AdaB9df4802F6','ETH','Curve.fi Factory Crypto Pool: safETH/ETH');
INSERT INTO address_book(address,blockchain,name) VALUES('0x02914596cad247C86e8F7d8464D1b3DBD0CeC86E','ETH','Curve.fi Factory USD Metapool: eUSD/3CRV');
INSERT INTO address_book(address,blockchain,name) VALUES('0x02950460E2b9529D0E00284A5fA2d7bDF3fA4d72','ETH','USDe-USDC');
INSERT INTO address_book(address,blockchain,name) VALUES('
This file has been truncated, but you can view the full file.
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2745,'0xBfAb6FA95E0091ed66058ad493189D2cB29385E6','ETH','Curve.fi ETH/wBETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2746,'0x50161102a240b1456d770Dbb55c76d8dc2D160Aa','ETH','Curve gauge for Curve.fi ETH/wBETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2747,'0x2448ec833EbAf2958330f91E5Fbe4F9C70C9e572','ETH','Curve.fi Factory Pool: ixETH/ETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2748,'0x9AF8fbBa318aDeaCeA010b8d7C0190D443Ee1a85','ETH','Curve gauge for Curve.fi Factory Pool: ixETH/ETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2749,'0xfcc067EFb7bE2EEbD32615F14fC22195abB68e9B','ETH','Curve.fi Factory Plain Pool: rETH/frxETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2750,'0xb0549599d8446A196541dE11008eF5e79fA14F57','ETH','Curve gauge for Curve.fi Factory Plain Pool: rETH/frxETH');
INSERT INTO address_book(rowid,address,blockchain,na
@yabirgb
yabirgb / gist:ac3f252355ed1766b8017b9d9a0d7bc7
Last active February 2, 2024 16:38
aerodrome_diff_globaldb
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2188,'0x723AEf6543aecE026a15662Be4D3fb3424D502A9','BASE','Aerodrome pool vAMM-tBTC/USDbC');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2189,'0x50f0249B824033Cf0AF0C8b9fe1c67c2842A34d5','BASE','Gauge for Aerodrome pool vAMM-tBTC/USDbC');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2190,'0x2722C8f9B5E2aC72D1f225f8e8c990E449ba0078','BASE','Aerodrome pool vAMM-tBTC/WETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2191,'0xfaE8C18D83655Fbf31af10d2e9A1Ad5bA77D0377','BASE','Gauge for Aerodrome pool vAMM-tBTC/WETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2192,'0xAf58FDeE432a104a932a899968d60F92838886cd','BASE','Aerodrome pool vAMM-T/WETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2193,'0xaD3d4aFd779e4A57734557CcE25F87032614fE47','BASE','Gauge for Aerodrome pool vAMM-T/WETH');
INSERT INTO address_book(rowid,address,blockchain,name) VALUES(2194,'0x2B7
@yabirgb
yabirgb / encrypted_diff_sql.py
Created December 22, 2023 12:54
diff of encrypted rotki databases
import sys
import tempfile
from pysqlcipher3 import dbapi2 as sqlcipher
import subprocess
from rotkehlchen.db.utils import protect_password_sqlcipher
path_modified = sys.argv[1]
path_old = sys.argv[2]
DELETE FROM general_cache WHERE rowid=1;
DELETE FROM general_cache WHERE rowid=2;
DELETE FROM general_cache WHERE rowid=3;
DELETE FROM general_cache WHERE rowid=4;
DELETE FROM general_cache WHERE rowid=5;
DELETE FROM general_cache WHERE rowid=6;
DELETE FROM general_cache WHERE rowid=7;
DELETE FROM general_cache WHERE rowid=8;
DELETE FROM general_cache WHERE rowid=9;
DELETE FROM general_cache WHERE rowid=10;
@yabirgb
yabirgb / rotki-v1.30.0.md
Last active August 16, 2023 19:32 — forked from tewshi/rotki-v1.30.0.md
rotki Release notes 1.30

Description

rotki

Rotki v1.30.0 is a big release containing many improvements and bug fixes the team made in the last month! The biggest feature coming in this release is support for the Arbitrum One chain, but also a lot of smaller improvements and new protocol decoders for history events.

For more information check the detailed changelog below 👇

Downloads

use std::cmp;
use std::error::Error as StdError;
use std::io::{self, Write};
use log::error;
use sqlx::{postgres::types::Oid, Postgres, Transaction};
type BoxDynError = Box<dyn StdError + 'static + Send + Sync>;
pub struct PgObject {
pub obid: Oid,
@yabirgb
yabirgb / rotki_coinbase_trades_query.py
Last active February 9, 2022 15:24
Read trades from coinbase using rotki
import json
import os
from rotkehlchen.config import default_data_directory
from rotkehlchen.db.dbhandler import DBHandler
from rotkehlchen.errors import InputError
from rotkehlchen.exchanges.coinbase import Coinbase
from rotkehlchen.externalapis.coingecko import Coingecko
from rotkehlchen.externalapis.cryptocompare import Cryptocompare
from rotkehlchen.globaldb import GlobalDBHandler