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

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