client/container: ethereum-based: support Etherscan V2, add more L2 chains

- Implements support for unified API via Etherscan V2 (ethereum-based)
  * All ethereum-based L2s are now accessed via single API endpoint
    - Chains are now available via chain ID
  * Updates API key requirement for `fetch` ethereum-based subaccounts
    - The API key's value must now be prepended with "etherscan"
      * Previously was prepended per-chain ("ethereum" or "polygon")
    - The API key is now *required* (can be generated at etherscan.io)
      * Resolves fatal error in Etherscan::parse_response()
      * Impl will now handle if:
        - Config's API key/value is malformed
        - Etherscan API key was not given
        - Etherscan response is fatal

- Adds support for more L2s
  * Arbitrum (One)
  * Optimism
  * Base

- Adds more L2s to existing accounts
  * Coinbase Wallet
  * Ledger Live
  * MetaMask

- Updates documentation
  * Update default generated `fetch` config
  * Update `fetch` usage help
  * Update README
This commit is contained in:
2025-08-01 13:25:31 -07:00
parent 183806da6d
commit d270d56366
29 changed files with 375 additions and 46 deletions

View File

@@ -177,9 +177,10 @@ Supported blockchains (independent of wallet type):
- [X] [Algorand](https://algorand.com/) *(powered by [AlgoNode.io](https://algonode.io/))* - [X] [Algorand](https://algorand.com/) *(powered by [AlgoNode.io](https://algonode.io/))*
- [ ] Cardano - [ ] Cardano
- [X] Ethereum-based - [X] Ethereum-based *(powered by [Etherscan.io APIs](https://etherscan.io/))*
- [ ] Arbitrum - [X] [Arbitrum (One)](https://arbitrum.io/)
- [X] [Ethereum](https://ethereum.org/) *(powered by [Etherscan.io APIs](https://etherscan.io/))* - [X] [Base](https://www.base.org/)
- [X] [Ethereum](https://ethereum.org/)
- [X] [1inch](https://1inch.io/) - [X] [1inch](https://1inch.io/)
- [X] [Aave](https://aave.com/) - [X] [Aave](https://aave.com/)
- [X] [AirSwap](https://about.airswap.io/) - [X] [AirSwap](https://about.airswap.io/)
@@ -187,8 +188,8 @@ Supported blockchains (independent of wallet type):
- [ ] Lido - [ ] Lido
- [X] [Rocket Pool](https://rocketpool.net/) - [X] [Rocket Pool](https://rocketpool.net/)
- [X] [Uniswap](https://uniswap.org/) - [X] [Uniswap](https://uniswap.org/)
- [ ] Optimism - [X] [Optimism](https://www.optimism.io/)
- [X] [Polygon](https://polygon.technology/) *(powered by [PolygonScan APIs](https://polygonscan.com/))* - [X] [Polygon](https://polygon.technology/)
- [X] [Tezos](https://tezos.com/) *(powered by [TzKT API](https://tzkt.io/))* - [X] [Tezos](https://tezos.com/) *(powered by [TzKT API](https://tzkt.io/))*
#### Self-hosting #### Self-hosting

View File

@@ -1,6 +1,6 @@
# docker-finance | modern accounting for the power-user # docker-finance | modern accounting for the power-user
# #
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) # Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -48,17 +48,39 @@
# 1. Visit coingecko.com to get the assets's ID # 1. Visit coingecko.com to get the assets's ID
# 2. Prepend the ID to the ticker (as seen below) # 2. Prepend the ID to the ticker (as seen below)
# #
# 3. For account APIs, replace XXXXXXX... with your API-related information. # 3. For account APIs:
# Accounts below will provide unique details/caveats on API key creation.
# #
# 4. Feel free to delete any unused accounts/subaccounts as needed. # - Replace XXXXXXX... with your API-related information.
#
# * See the accounts below for unique details/caveats on API key creation.
#
# 4. For blockchain-based APIs:
#
# - 'key' format: blockchain1/API_KEY1,blockchain2/API_KEY2
#
# * For ethereum-based chains:
#
# - As of now, you *MUST* use an API key.
# Generate your API key at etherscan.io
#
# - Use "etherscan" as the blockchain API, as its
# unified API is used for all ethereum-based chains.
#
# * For algorand/tezos: currently no API key is required.
#
#
# 5. Feel free to delete any unused accounts/subaccounts as needed.
# NOTE: # Disclaimer:
#
# The example wallet accounts/addresses used in this file: # The example wallet accounts/addresses used in this file:
#
# - were picked randomly from the blockchain and are meant to be used for # - were picked randomly from the blockchain and are meant to be used for
# demonstration purposes only # demonstration purposes only
#
# - outside the realm of testing and development, have no association with # - outside the realm of testing and development, have no association with
# the author or docker-finance or Evergreen Crypto LLC # the author or docker-finance or Evergreen Crypto LLC
#
# - are not endorsements of the wallet's activity or tokenomics # - are not endorsements of the wallet's activity or tokenomics
version: @DOCKER_FINANCE_VERSION@ version: @DOCKER_FINANCE_VERSION@
@@ -170,15 +192,13 @@ version: @DOCKER_FINANCE_VERSION@
#subaccount: "platform/{BTC,LTC,ETH,USDC,USD}" #subaccount: "platform/{BTC,LTC,ETH,USDC,USD}"
coinbase-wallet: coinbase-wallet:
# API scanner keys can be generated at etherscan.io, polygonscan.com key: "etherscan/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# key format: blockchain1/API_KEY1,blockchain2/API_KEY2
key: "ethereum/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
subaccount: subaccount:
ethereum: ethereum:
- "phone:cb-1/0x10Bd3c5d536f69e87C8d4ECB49C01dDc9db4637b" - "phone:cb-1/0x10Bd3c5d536f69e87C8d4ECB49C01dDc9db4637b"
coinomi: coinomi:
key: "ethereum/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" key: "etherscan/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
subaccount: subaccount:
# NOTE: same account name can only be used with differing networks # NOTE: same account name can only be used with differing networks
ethereum: ethereum:
@@ -187,20 +207,22 @@ version: @DOCKER_FINANCE_VERSION@
- "phone:coinomi-1/BO65GIBYYYUPK4KTQ32IRO5BE2H3VEFTK65GKI2GNHZYPNUMJKGJOFJWSY" - "phone:coinomi-1/BO65GIBYYYUPK4KTQ32IRO5BE2H3VEFTK65GKI2GNHZYPNUMJKGJOFJWSY"
metamask: metamask:
# API scanner keys can be generated at etherscan.io, polygonscan.com key: "etherscan/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# key format: blockchain1/API_KEY1,blockchain2/API_KEY2
key: "ethereum/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,polygon/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
subaccount: subaccount:
ethereum: ethereum:
- "laptop:wallet-1/0x6546d43EA6DE45EB7298A2074e239D5573cA02F3" - "laptop:wallet-1/0x6546d43EA6DE45EB7298A2074e239D5573cA02F3"
- "phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969" - "phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969"
polygon: polygon:
- "laptop:wallet-2/0xEad0B2b6f6ab84d527569835cd7fe364e067cFFf" - "laptop:wallet-2/0xEad0B2b6f6ab84d527569835cd7fe364e067cFFf"
arbitrum:
- "phone:wallet-2/0xd3b29C94a67Cfa949FeD7dd1474B71d006fa0A2A"
base:
- "laptop:wallet-3/0x4C7219b760b71B9415E0e01Abd34d0f65631e57e"
optimism:
- "phone:wallet-3/0x53004E863Aa0F4028B154ECA65CFb32Eb5a8f5bB"
ledger: ledger:
# API scanner keys can be generated at etherscan.io, polygonscan.com key: "etherscan/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# key format: blockchain1/API_KEY1,blockchain2/API_KEY2
key: "ethereum/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
subaccount: subaccount:
algorand: algorand:
- "nano:x-1:general-1/R7U6QWS4QLDB5YLBI25TWCPW47N565FUUDP6GG5XEWAKD5INLATHIG24NE" - "nano:x-1:general-1/R7U6QWS4QLDB5YLBI25TWCPW47N565FUUDP6GG5XEWAKD5INLATHIG24NE"

View File

@@ -2,7 +2,7 @@
// docker-finance | modern accounting for the power-user // docker-finance | modern accounting for the power-user
// //
// Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) // Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@@ -68,6 +68,7 @@ namespace docker_finance\blockchains
utils\CLI::throw_fatal('invalid metadata. Did you give accurate account information (account exists? is mispelled?)?'); utils\CLI::throw_fatal('invalid metadata. Did you give accurate account information (account exists? is mispelled?)?');
} }
} }
$metadata->set_blockchain($parsed_metadata[0]); $metadata->set_blockchain($parsed_metadata[0]);
$metadata->set_subaccount($parsed_metadata[1]); $metadata->set_subaccount($parsed_metadata[1]);
$metadata->set_address($parsed_metadata[2]); $metadata->set_address($parsed_metadata[2]);
@@ -99,7 +100,12 @@ namespace docker_finance\blockchains
$metadata->set_account(array_pop($head_end)); $metadata->set_account(array_pop($head_end));
$metadata->set_out_dir($out_dir); $metadata->set_out_dir($out_dir);
// Set blockchain API key (blockchain scanning). NOTE: one key per chain, per account /**
* Set blockchain API key (blockchain scanning).
*
* Expects one key per chain (per account), except for
* ethereum-based chains (which only expects one key for all chains).
*/
$metadata->set_api_key(''); // Initialize to prevent fatal error $metadata->set_api_key(''); // Initialize to prevent fatal error
if (str_contains($this->get_env()->get_env('API_KEY'), '/')) { if (str_contains($this->get_env()->get_env('API_KEY'), '/')) {
$key_entries = explode(',', $this->get_env()->get_env('API_KEY')); $key_entries = explode(',', $this->get_env()->get_env('API_KEY'));
@@ -107,8 +113,22 @@ namespace docker_finance\blockchains
$api_blockchain = explode('/', $entry)[0]; $api_blockchain = explode('/', $entry)[0];
$api_key = explode('/', $entry)[1]; $api_key = explode('/', $entry)[1];
if ($api_blockchain == $metadata->get_blockchain()) { if (empty($api_key)) {
$metadata->set_api_key($api_key); utils\CLI::throw_fatal("no blockchain API key value");
}
if (!empty($api_blockchain)) {
switch ($api_blockchain) {
// TODO: WARNING: if adding non-ethereum-based chain, update as needed.
case 'algorand':
case 'etherscan':
case 'tezos':
$metadata->set_api_key($api_key);
break;
default:
utils\CLI::throw_fatal("invalid blockchain API");
break;
}
} }
} }
} }
@@ -120,7 +140,10 @@ namespace docker_finance\blockchains
// API factory // API factory
switch ($metadata->get_blockchain()) { switch ($metadata->get_blockchain()) {
case 'arbitrum':
case 'base':
case 'ethereum': case 'ethereum':
case 'optimism':
case 'polygon': case 'polygon':
$this->api = new internal\blockchains\Ethereum($this->get_env()); $this->api = new internal\blockchains\Ethereum($this->get_env());
break; break;

View File

@@ -2,7 +2,7 @@
// docker-finance | modern accounting for the power-user // docker-finance | modern accounting for the power-user
// //
// Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) // Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@@ -228,8 +228,9 @@ namespace docker_finance\blockchains\internal
$file = $out_dir . '/' . $metadata->get_address(); $file = $out_dir . '/' . $metadata->get_address();
// If contract type needed, then append type // If ethereum-based contract type is needed, append contract type.
if ($metadata->get_blockchain() == 'ethereum' || $metadata->get_blockchain() == 'polygon') { // TODO: WARNING: if adding non-ethereum-based chain, update as needed.
if ($metadata->get_blockchain() != 'algorand' && $metadata->get_blockchain() != 'tezos') {
$file = $out_dir . '/' . $metadata->get_address() . '-' . $metadata->get_contract_type(); $file = $out_dir . '/' . $metadata->get_address() . '-' . $metadata->get_contract_type();
} }

View File

@@ -2,7 +2,7 @@
// docker-finance | modern accounting for the power-user // docker-finance | modern accounting for the power-user
// //
// Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) // Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@@ -95,7 +95,11 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
//! @brief Implements response handler //! @brief Implements response handler
public function get_response(internal\Metadata $metadata): mixed public function get_response(internal\Metadata $metadata): mixed
{ {
return json_decode($this->request($metadata->get_url()), true, 512, JSON_PRETTY_PRINT)['result']; $response = json_decode($this->request($metadata->get_url()), true, 512, JSON_PRETTY_PRINT)['result'];
if (is_string($response)) {
utils\CLI::throw_fatal($response);
}
return $response;
} }
//! @brief Implements parser //! @brief Implements parser
@@ -149,13 +153,16 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
switch ($contract_type) { switch ($contract_type) {
case 'normal': case 'normal':
switch ($blockchain) { switch ($blockchain) {
case 'arbitrum':
case 'base':
case 'ethereum': case 'ethereum':
case 'optimism':
$token_name = 'Ethereum'; $token_name = 'Ethereum';
$symbol = 'ETH'; $symbol = 'ETH';
break; break;
case 'polygon': case 'polygon':
$token_name = 'Polygon'; $token_name = 'Polygon';
$symbol = 'MATIC'; $symbol = 'MATIC'; // TODO: update to POL along with mockups
break; break;
default: default:
utils\CLI::throw_fatal('Unsupported subaccount name/network'); utils\CLI::throw_fatal('Unsupported subaccount name/network');
@@ -171,11 +178,14 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
$token_name = 'INTERNAL'; // TODO: contract address / symbol from parent tx would be needed $token_name = 'INTERNAL'; // TODO: contract address / symbol from parent tx would be needed
$contract_address = ''; $contract_address = '';
switch ($blockchain) { switch ($blockchain) {
case 'arbitrum':
case 'base':
case 'ethereum': case 'ethereum':
case 'optimism':
$symbol = 'ETH'; $symbol = 'ETH';
break; break;
case 'polygon': case 'polygon':
$symbol = 'MATIC'; $symbol = 'MATIC'; // TODO: update to POL along with mockups
break; break;
default: default:
utils\CLI::throw_fatal('Unsupported subaccount name/network'); utils\CLI::throw_fatal('Unsupported subaccount name/network');
@@ -254,18 +264,32 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
public function write_transactions(internal\Metadata $metadata): void public function write_transactions(internal\Metadata $metadata): void
{ {
switch ($metadata->get_blockchain()) { switch ($metadata->get_blockchain()) {
case 'ethereum': // Arbitrum One Mainnet
$domain = 'api.etherscan.io'; case 'arbitrum':
$chain_id = 42161;
break; break;
// Base Mainnet
case 'base':
$chain_id = 8453;
break;
// Ethereum Mainnet
case 'ethereum':
$chain_id = 1;
break;
// OP Mainnet
case 'optimism':
$chain_id = 10;
break;
// Polygon Mainnet
case 'polygon': case 'polygon':
$domain = 'api.polygonscan.com'; $chain_id = 137;
break; break;
default: default:
utils\CLI::throw_fatal('invalid type: ' . $metadata->get_blockchain()); utils\CLI::throw_fatal('invalid type: ' . $metadata->get_blockchain());
break; break;
} }
assert(!empty($domain)); assert(!empty($chain_id));
$address = $metadata->get_address(); $address = $metadata->get_address();
$api_key = $metadata->get_api_key(); $api_key = $metadata->get_api_key();
@@ -277,7 +301,7 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
'erc-1155' => 'token1155tx'); 'erc-1155' => 'token1155tx');
foreach ($request as $type => $action) { foreach ($request as $type => $action) {
$metadata->set_url("https://{$domain}/api?module=account&action={$action}&address={$address}&startblock=0&endblock=999999999&sort=asc&apiKey={$api_key}"); $metadata->set_url("https://api.etherscan.io/v2/api?chainId={$chain_id}&module=account&action={$action}&address={$address}&startblock=0&endblock=999999999&sort=asc&apiKey={$api_key}");
$metadata->set_contract_type($type); $metadata->set_contract_type($type);
$response = $this->parse_response($metadata, $this->get_response($metadata)); $response = $this->parse_response($metadata, $this->get_response($metadata));
if (!empty($response)) { if (!empty($response)) {

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user # docker-finance | modern accounting for the power-user
# #
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) # Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -67,9 +67,19 @@ function lib_fetch::__parse_args()
api${global_arg_delim_2}<mobula|coingecko> api${global_arg_delim_2}<mobula|coingecko>
Support account(s): Account(s):
account${global_arg_delim_2}<coinbase|coinbase-wallet|coinomi|gemini|ledger|metamask|pera-wallet> account${global_arg_delim_2}<account1${global_arg_delim_3}account2${global_arg_delim_3}...>
Supported account(s):
- coinbase
- coinbase-wallet
- coinomi
- gemini
- ledger
- metamask
- pera-wallet
Fetch year: Fetch year:
@@ -79,6 +89,15 @@ function lib_fetch::__parse_args()
(block)chain${global_arg_delim_2}<blockchain[${global_arg_delim_3}blockchain${global_arg_delim_1}subaccount]> (block)chain${global_arg_delim_2}<blockchain[${global_arg_delim_3}blockchain${global_arg_delim_1}subaccount]>
Supported blockchain(s):
- algorand
- arbitrum
- base
- ethereum
- optimism
- tezos
Tor (proxy): Tor (proxy):
tor${global_arg_delim_2}<{on|true}|{off|false}> (default 'off') tor${global_arg_delim_2}<{on|true}|{off|false}> (default 'off')
@@ -129,20 +148,20 @@ function lib_fetch::__parse_args()
\e[37;2m# Fetch ethereum/polygon subaccounts for account metamask, year 2022\e[0m \e[37;2m# Fetch ethereum/polygon subaccounts for account metamask, year 2022\e[0m
$ $global_usage account${global_arg_delim_2}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon year${global_arg_delim_2}2022 $ $global_usage account${global_arg_delim_2}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon year${global_arg_delim_2}2022
\e[37;2m# Fetch multiple blockchains' subaccounts for account ledger, and ethereum for metamask, year 2023\e[0m \e[37;2m# Fetch multiple blockchains' subaccounts for account ledger and metamask, year 2023\e[0m
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023 $ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}base${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
\e[37;2m# Same as previous command but with shorthand option 'chain'\e[0m \e[37;2m# Same as previous command but with shorthand option 'chain'\e[0m
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask chain${global_arg_delim_2}ethereum${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023 $ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask chain${global_arg_delim_2}ethereum${global_arg_delim_3}base${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
\e[37;2m# Fetch multiple blockchains/subaccounts for ledger\e[0m \e[37;2m# Fetch multiple blockchains/subaccounts for ledger\e[0m
$ $global_usage account${global_arg_delim_2}ledger chain${global_arg_delim_2}ethereum/nano:x-1${global_arg_delim_3}tezos${global_arg_delim_1}nano:s-plus${global_arg_delim_3}algorand${global_arg_delim_1}nano:x-2 $ $global_usage account${global_arg_delim_2}ledger chain${global_arg_delim_2}ethereum/nano:x-1${global_arg_delim_3}tezos${global_arg_delim_1}nano:s-plus${global_arg_delim_3}algorand${global_arg_delim_1}nano:x-2
\e[37;2m# Fetch specific blockchain/subaccount/address for metamask\e[0m \e[37;2m# Fetch specific blockchain/subaccount/address for metamask\e[0m
$ $global_usage account${global_arg_delim_2}metamask chain${global_arg_delim_2}ethereum/phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969 $ $global_usage account${global_arg_delim_2}metamask chain${global_arg_delim_2}ethereum/phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969${global_arg_delim_3}optimism/phone:wallet-3/0x18BFAa3f9Fa06123985d0456b4a911730382009D
\e[37;2m# Fetch given blochchain-based subaccounts for current year, over the Tor network\e[0m \e[37;2m# Fetch given blochchain-based subaccounts for current year, over the Tor network\e[0m
$ $global_usage account${global_arg_delim_2}metamask${global_arg_delim_3}ledger blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon${global_arg_delim_3}tezos${global_arg_delim_3}algorand tor${global_arg_delim_2}on $ $global_usage account${global_arg_delim_2}metamask${global_arg_delim_3}ledger blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon${global_arg_delim_3}arbitrum${global_arg_delim_3}tezos${global_arg_delim_3}algorand tor${global_arg_delim_2}on
\e[32mNotes:\e[0m \e[32mNotes:\e[0m

View File

@@ -56,7 +56,7 @@ if %direction ^OUT$
# at times, send to the contract address for certain end-user addresses. So, # at times, send to the contract address for certain end-user addresses. So,
# reports will produce a double-spend unless this is corrected here. # reports will produce a double-spend unless this is corrected here.
if %direction ^OUT$ if %direction ^OUT$
& %blockchain (^ethereum$|^polygon$) & %blockchain (^ethereum$|^polygon$|^arbitrum$|^base$|^optimism$)
& %type ^normal$ & %type ^normal$
& %fees [1-9] & %fees [1-9]
account3 assets:%account_name:%subaccount_name:%blockchain:%symbol account3 assets:%account_name:%subaccount_name:%blockchain:%symbol
@@ -69,7 +69,7 @@ if %direction ^OUT$
# Remove 0 value txs (or else journal is cluttered). These should appear for FEE spends only # Remove 0 value txs (or else journal is cluttered). These should appear for FEE spends only
if %direction ^OUT$ if %direction ^OUT$
& %blockchain (^ethereum$|^polygon$) & %blockchain (^ethereum$|^polygon$|^arbitrum$|^base$|^optimism$)
& %amount_ ^[^1-9]*$ & %amount_ ^[^1-9]*$
account1 account1
account2 account2
@@ -99,6 +99,8 @@ if %to_address ^0x401f6c983ea34274ec46f84d70b31c151321188b$
# NOTE: No ERC-20 txs here for WETH... all "normal" or "internal" # NOTE: No ERC-20 txs here for WETH... all "normal" or "internal"
# TODO: on all supported chains
# BUY # BUY
if %to_address ^0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2$ if %to_address ^0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2$
& %blockchain ^ethereum$ & %blockchain ^ethereum$
@@ -169,6 +171,8 @@ if %to_address ^0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2$
# Swapping # # Swapping #
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #
# TODO: on all supported chains
include ./rules.d/swap.d/1inch.rules include ./rules.d/swap.d/1inch.rules
include ./rules.d/swap.d/airswap.rules include ./rules.d/swap.d/airswap.rules
include ./rules.d/swap.d/metamask.rules include ./rules.d/swap.d/metamask.rules
@@ -178,6 +182,8 @@ include ./rules.d/swap.d/uniswap.rules
# Lending # # Lending #
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #
# TODO: on all supported chains
include ./rules.d/lending.d/aave.rules include ./rules.d/lending.d/aave.rules
include ./rules.d/lending.d/compound.rules include ./rules.d/lending.d/compound.rules
@@ -185,6 +191,8 @@ include ./rules.d/lending.d/compound.rules
# Staking # # Staking #
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #
# TODO: on all supported chains
include ./rules.d/staking.d/lido.rules include ./rules.d/staking.d/lido.rules
include ./rules.d/staking.d/rocket-pool.rules include ./rules.d/staking.d/rocket-pool.rules

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../ethereum-based-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../ethereum-based-shared.bash