diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 5046f66f1a..131a9ec633 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -4,7 +4,7 @@ env:
CHIFRA_PATH: src/apps/chifra
KHEDRA_PATH: khedra
# Go Version
- GO_VERSION: 1.23.1
+ GO_VERSION: 1.25.1
jobs:
Lint:
runs-on: ubuntu-latest
@@ -21,19 +21,17 @@ jobs:
run: |
./scripts/go-work-sync.sh
- name: Lint chifra
- uses: golangci/golangci-lint-action@v4
+ uses: golangci/golangci-lint-action@v8
with:
- version: v1.61.0
+ version: v2.4.0
working-directory: ${{ env.CHIFRA_PATH }}
- args: --timeout=5m --verbose --out-format=colored-line-number
- skip-pkg-cache: true
+ args: --timeout=5m --verbose --output.text.colors=true --output.text.print-linter-name=true
- name: Lint khedra
- uses: golangci/golangci-lint-action@v4
+ uses: golangci/golangci-lint-action@v8
with:
- version: v1.61.0
+ version: v2.4.0
working-directory: ${{ env.KHEDRA_PATH }}
- args: --timeout=5m --verbose --out-format=colored-line-number
- skip-pkg-cache: true
+ args: --timeout=5m --verbose --output.text.colors=true --output.text.print-linter-name=true
Build:
needs: Lint
runs-on: ubuntu-latest
@@ -50,11 +48,12 @@ jobs:
- name: Install prerequistes
run: |
sudo apt-mark hold grub-efi-amd64-signed
- sudo apt-get update --fix-missing
- sudo apt-get upgrade
- sudo apt-get install build-essential git cmake
- sudo apt-get install python3 tree jq
- sudo apt-get install libcurl3-dev
+ sudo apt-mark hold firefox
+ sudo apt-get update --fix-missing || true
+ sudo apt-get upgrade -y --fix-missing || true
+ sudo apt-get install -y build-essential git cmake
+ sudo apt-get install -y python3 tree jq
+ sudo apt-get install -y libcurl3-dev
- name: Run chifra unit tests
run: |
mkdir -p build
@@ -68,19 +67,20 @@ jobs:
export TB_NO_PROVIDER_CHECK=true
go test ./...
cd ../../../
- cd ${{ env.KHEDRA_PATH }}
- export TB_NO_PROVIDER_CHECK=true
- go test ./...
+ # cd ${{ env.KHEDRA_PATH }}
+ # export TB_NO_PROVIDER_CHECK=true
+ # go test ./...
RemoteTests:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Run tests remotely
- uses: appleboy/ssh-action@master
+ uses: appleboy/ssh-action@v1.0.3
with:
- host: ${{ secrets.TESTING_HOST }}
- username: ${{ secrets.TESTING_USERNAME }}
- key: ${{ secrets.SSH_PRIVATE_KEY }}
+ # These secrets are configured in the repository settings
+ host: ${{ secrets.TESTING_HOST }} # Remote testing server hostname
+ username: ${{ secrets.TESTING_USERNAME }} # SSH username for remote testing
+ key: ${{ secrets.SSH_PRIVATE_KEY }} # SSH private key for authentication
command_timeout: 40m
script: |
set -e # Exit on any error
@@ -93,6 +93,7 @@ jobs:
git checkout ${{ github.head_ref }}
git submodule update --init --recursive
cd scripts
+ bash check_go_version.sh ${{ env.GO_VERSION }}
if CONFIG_FILE=$HOME/trueBlocks.toml bash test-with-docker.sh ${{ github.repository }} ${{ github.sha }} ${{ github.head_ref }}; then
echo "✅ Tests passed successfully"
echo "Results placed in /home/testuser/testing/${{ github.sha }}"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0f308dd49e..aa29aea934 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,7 +17,7 @@ jobs:
uses: actions/setup-go@v1
with:
# Go Version
- go-version: '1.23.1'
+ go-version: '1.25.1'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
diff --git a/docs/content/api/openapi.yaml b/docs/content/api/openapi.yaml
index d5fb758e4d..9963a2209c 100644
--- a/docs/content/api/openapi.yaml
+++ b/docs/content/api/openapi.yaml
@@ -302,6 +302,14 @@ paths:
explode: true
schema:
type: boolean
+ - name: approvals
+ description: export all token approval transactions for the given address
+ required: false
+ style: form
+ in: query
+ explode: true
+ schema:
+ type: boolean
- name: traces
description: export traces instead of transactional data
required: false
@@ -2304,7 +2312,7 @@ paths:
operationId: chainstate-tokens
parameters:
- name: addrs
- description: two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported
+ description: two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported
required: true
style: form
in: query
@@ -2325,6 +2333,14 @@ paths:
items:
type: string
format: blknum
+ - name: approvals
+ description: returns all open approvals for the given address(es)
+ required: false
+ style: form
+ in: query
+ explode: true
+ schema:
+ type: boolean
- name: parts
description: which parts of the token information to retrieve
required: false
@@ -2415,10 +2431,12 @@ paths:
schema:
properties:
data:
- description: Produces Token data. Corresponds to the chifra tokens command line.
+ description: Produces Approval or Token data. Corresponds to the chifra tokens command line.
type: array
items:
- $ref: "#/components/schemas/token"
+ oneOf:
+ - $ref: "#/components/schemas/approval"
+ - $ref: "#/components/schemas/token"
examples:
[
{
@@ -3564,6 +3582,50 @@ components:
items:
$ref: "#/components/schemas/log"
description: "if a token transfer, the log that triggered the transfer (calculated)"
+ approval:
+ description: "an ERC-20 token approval granting spending permission from owner to spender"
+ type: object
+ properties:
+ blockNumber:
+ type: number
+ format: blknum
+ description: "the block number at which this call was made"
+ timestamp:
+ type: number
+ format: timestamp
+ description: "the timestamp of the block for this call"
+ date:
+ type: string
+ format: datetime
+ description: "the timestamp as a date (calculated)"
+ address:
+ type: string
+ format: address
+ description: "the address of the owner of the token (the approver)"
+ addressName:
+ type: string
+ format: string
+ description: "the name of the holder, if available"
+ spender:
+ type: string
+ format: address
+ description: "the address being granted approval to spend tokens"
+ spenderName:
+ type: string
+ format: string
+ description: "the name of the spender, if available"
+ amount:
+ type: string
+ format: wei
+ description: "the amount of tokens approved for spending"
+ token:
+ type: string
+ format: address
+ description: "the address of the ERC-20 token being approved"
+ tokenName:
+ type: string
+ format: string
+ description: "the name of the token, if available"
appearanceTable:
description: "an appearance table for an address"
type: object
diff --git a/docs/content/chifra/accounts.md b/docs/content/chifra/accounts.md
index d1468475ed..d29a9e3339 100644
--- a/docs/content/chifra/accounts.md
+++ b/docs/content/chifra/accounts.md
@@ -112,6 +112,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/docs/content/chifra/chaindata.md b/docs/content/chifra/chaindata.md
index 532339a352..35ea782904 100644
--- a/docs/content/chifra/chaindata.md
+++ b/docs/content/chifra/chaindata.md
@@ -321,7 +321,7 @@ Links:
The `--traces` option requires your node to enable the `trace_block` (and related) RPC endpoints. Many remote RPC providers do not enable these endpoints due to the additional load they can place on the node. If you are running your own node, you can enable these endpoints by adding `trace` to your node's startup.
-The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following enviroment variable before running the command to instruct `chifra` where to test.
+The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following environment variable before running the command to instruct `chifra` where to test.
```[bash]
export TB__FIRSTTRACE=
diff --git a/docs/content/chifra/chainstate.md b/docs/content/chifra/chainstate.md
index 8e47f03184..dc277188f4 100644
--- a/docs/content/chifra/chainstate.md
+++ b/docs/content/chifra/chainstate.md
@@ -118,10 +118,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -140,10 +141,12 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
```
Data models produced by this tool:
+- [approval](/data-model/accounts/#approval)
- [token](/data-model/chainstate/#token)
Links:
diff --git a/docs/content/chifra/configs.md b/docs/content/chifra/configs.md
index f48b25b2a2..5d7b201885 100644
--- a/docs/content/chifra/configs.md
+++ b/docs/content/chifra/configs.md
@@ -71,7 +71,7 @@ the table below for the name of each tool's config file.
## Multichain
-If you're running against mutliple chains, you may place any of these files in the root of the
+If you're running against multiple chains, you may place any of these files in the root of the
chain's configuration folder, and the values found there will replace any values found at the
top level. In this way, you may configure all chains for certain values, but customize your
configuration per chain.
diff --git a/docs/content/chifra/globals.md b/docs/content/chifra/globals.md
index ed135365a7..4985b293b8 100644
--- a/docs/content/chifra/globals.md
+++ b/docs/content/chifra/globals.md
@@ -78,7 +78,7 @@ Where:
### Group 4
-**As of version 2.6.0, the `--raw` option has been removed in its entirity.
+**As of version 2.6.0, the `--raw` option has been removed in its entirety.
Prior to that version, the following tools had this option which would pass
the data received directly from the node without modification.**
diff --git a/docs/content/data-model/accounts.md b/docs/content/data-model/accounts.md
index 618bcbdfd8..f84ce804a8 100644
--- a/docs/content/data-model/accounts.md
+++ b/docs/content/data-model/accounts.md
@@ -254,6 +254,31 @@ Transfers consist of the following fields:
| transaction | the transaction that triggered the transfer (calculated) | [Transaction](/data-model/chaindata/#transaction) |
| log | if a token transfer, the log that triggered the transfer (calculated) | [Log](/data-model/chaindata/#log) |
+## Approval
+
+An Approval represents an ERC-20 token spending permission granted by a token owner to a spender address. This data structure captures the essential elements of the `approve()` function call, including the token contract address, the owner granting permission, the spender receiving permission, and the approved amount.
+
+Approvals are fundamental to ERC-20 token interactions, enabling decentralized exchanges, automated market makers, and other DeFi protocols to spend tokens on behalf of users. By tracking these permissions, users can monitor and analyze token spending authorizations across their addresses.
+
+The following commands produce and manage Approvals:
+
+- [chifra tokens](/chifra/chainstate/#chifra-tokens)
+
+Approvals consist of the following fields:
+
+| Field | Description | Type |
+| ----------- | ---------------------------------------------------- | --------- |
+| blockNumber | the block number at which this call was made | blknum |
+| timestamp | the timestamp of the block for this call | timestamp |
+| date | the timestamp as a date (calculated) | datetime |
+| address | the address of the owner of the token (the approver) | address |
+| addressName | the name of the holder, if available | string |
+| spender | the address being granted approval to spend tokens | address |
+| spenderName | the name of the spender, if available | string |
+| amount | the amount of tokens approved for spending | wei |
+| token | the address of the ERC-20 token being approved | address |
+| tokenName | the name of the token, if available | string |
+
## AppearanceTable
The `appearanceTable` data model carries an address and all appearances for that address found in any given chunk.
@@ -289,5 +314,6 @@ This documentation mentions the following basic data types.
| uint32 | a 32-bit unsigned integer | |
| uint64 | a 64-bit unsigned integer | |
| value | an alias for a 64-bit unsigned integer | |
+| wei | an unsigned big number | as a string |
*Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*
diff --git a/docs/content/docs/install/install-core.md b/docs/content/docs/install/install-core.md
index 32475f5673..c96d40a05f 100644
--- a/docs/content/docs/install/install-core.md
+++ b/docs/content/docs/install/install-core.md
@@ -25,7 +25,7 @@ If you need help with a particular step, see the [installation's troubleshooting
- Open a terminal window.
-- Type `go version`. If Go is not installed or less than Go Version 1.23, [install the latest version of Go](https://go.dev/doc/install)
+- Type `go version`. If Go is not installed or less than Go Version 1.25.1, [install the latest version of Go](https://go.dev/doc/install)
- Install or upgrade the build dependencies: _git_, _cmake_, _ninja_, _curl_, _python_, _clang-format_, _jq_
diff --git a/docs/content/docs/install/install-troubleshooting.md b/docs/content/docs/install/install-troubleshooting.md
index eccf507ffd..dd4e418d5b 100644
--- a/docs/content/docs/install/install-troubleshooting.md
+++ b/docs/content/docs/install/install-troubleshooting.md
@@ -19,7 +19,7 @@ This section lists solutions to problems some users have run into with the insta
### Installing go
-#### How do I check my Go version?
+#### How do I check my Go Version?
Run this command
@@ -27,7 +27,7 @@ Run this command
go version
```
-TrueBlocks needs version 1.16.x or later. If you to install or update Go, [see here](https://golang.org/doc/install).
+TrueBlocks needs version 1.25.1 or later. If you to install or update Go, [see here](https://golang.org/doc/install).
### Installing build tools
diff --git a/examples b/examples
index 492e76cde6..fc4905a089 160000
--- a/examples
+++ b/examples
@@ -1 +1 @@
-Subproject commit 492e76cde6302a614ae44914e26826406ba7455b
+Subproject commit fc4905a0890fcab1ae92e700dd3d30f79a77a073
diff --git a/khedra b/khedra
index 51b2c7a3e2..ea766266ee 160000
--- a/khedra
+++ b/khedra
@@ -1 +1 @@
-Subproject commit 51b2c7a3e2a50932124435555f4d13d58607edc6
+Subproject commit ea766266eedc7027dfc1c134ee143e5e91c9ae34
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 4c35dc5ed2..9f60386d2c 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -1,5 +1,5 @@
# Go Version
-FROM golang:1.23.1-bullseye
+FROM golang:1.25.1-bookworm
# Declare build arguments so they're visible inside the Dockerfile
ARG repo
@@ -13,8 +13,13 @@ RUN set -eux ; apt install -y curl bash linux-headers-amd64 xz-utils jq unzip
# Switch into /root
WORKDIR /root
-# Debug: confirm we have the correct values
-RUN echo "DEBUG: repo=${repo}, branch=${branch} commit_sha=${commit_sha}"
+# Debug: confirm we have the correct values and show environment
+RUN echo "=== BUILD ARGUMENTS ===" && \
+ echo "repo=${repo}" && \
+ echo "branch=${branch}" && \
+ echo "commit_sha=${commit_sha}" && \
+ echo "PWD=$(pwd)" && \
+ echo "=== END BUILD ARGUMENTS ==="
# 1) Clone
RUN set -eux ; git clone --progress "https://github.com/${repo}.git" /root/trueblocks-core
@@ -22,9 +27,27 @@ RUN set -eux ; git clone --progress "https://github.com/${repo}.git" /root/trueb
# 2) Move into the cloned repo
WORKDIR /root/trueblocks-core
+# Debug: Show current directory and contents
+RUN echo "=== POST-CLONE DEBUG ===" && \
+ echo "PWD=$(pwd)" && \
+ echo "Directory contents:" && \
+ ls -la && \
+ echo "Git status:" && \
+ git status && \
+ echo "=== END POST-CLONE DEBUG ==="
+
# 3) Check out the desired branch
RUN set -eux ; git checkout "${branch}"
+# Debug: Show git status after checkout
+RUN echo "=== POST-CHECKOUT DEBUG ===" && \
+ echo "PWD=$(pwd)" && \
+ echo "Current branch:" && \
+ git branch && \
+ echo "Git status:" && \
+ git status && \
+ echo "=== END POST-CHECKOUT DEBUG ==="
+
# 4) Update/init submodules
RUN set -eux ; git submodule update --init --recursive
@@ -34,14 +57,45 @@ RUN set -eux ; mkdir -v build
# 6) Switch into that folder
WORKDIR /root/trueblocks-core/build
+# Debug: Show build directory setup
+RUN echo "=== BUILD DIRECTORY DEBUG ===" && \
+ echo "PWD=$(pwd)" && \
+ echo "Build directory contents:" && \
+ ls -la && \
+ echo "Parent directory contents:" && \
+ ls -la ../ && \
+ echo "scripts directory check:" && \
+ ls -la ../scripts/ && \
+ echo "=== END BUILD DIRECTORY DEBUG ==="
+
# 7) Optionally sync go.work modules (if your script does that)
-RUN set -eux ; ../scripts/go-work-sync.sh
+RUN echo "=== RUNNING go-work-sync.sh ===" && \
+ ../scripts/go-work-sync.sh 2>&1 | tee /tmp/go-work-sync.log && \
+ echo "=== go-work-sync.sh completed ==="
+
+# 8) Run CMake with better error reporting
+RUN echo "=== RUNNING CMAKE ===" && \
+ cmake ../src 2>&1 | tee /tmp/cmake.log || \
+ (echo "CMAKE FAILED - Contents of cmake.log:" && cat /tmp/cmake.log && exit 1)
-# 8) Run CMake
-RUN set -eux ; cmake ../src
+# 9) Run make with verbose output and better error reporting
+RUN echo "=== RUNNING MAKE ===" && \
+ make VERBOSE=1 -j1 2>&1 | tee /tmp/make.log || \
+ (echo "MAKE FAILED - Last 50 lines of make.log:" && tail -50 /tmp/make.log && exit 1)
-# 9) Run make (compile)
-RUN set -eux ; make -j4
+# Debug final setup before entrypoint
+RUN echo "=== FINAL CONTAINER SETUP ===" && \
+ echo "Build directory contents:" && \
+ ls -la && \
+ echo "Makefile check:" && \
+ (ls -la Makefile || echo "No Makefile found") && \
+ echo "test-all target check:" && \
+ (make -n test-all 2>&1 | head -10 || echo "Cannot check test-all target") && \
+ echo "scripts directory:" && \
+ (ls -la ../scripts/ | head -10 || echo "Cannot list scripts directory") && \
+ echo "build-and-test.sh permissions:" && \
+ (ls -la ../scripts/build-and-test.sh || echo "Cannot find build-and-test.sh") && \
+ echo "=== END FINAL SETUP ==="
# Finally, define your entrypoint (if you want to run tests or something)
ENTRYPOINT ["bash", "/root/trueblocks-core/scripts/build-and-test.sh"]
diff --git a/scripts/check_go_version.sh b/scripts/check_go_version.sh
new file mode 100755
index 0000000000..92d2571ffa
--- /dev/null
+++ b/scripts/check_go_version.sh
@@ -0,0 +1,53 @@
+#!/usr/bin/env bash
+
+# Name: check_go_version.sh
+# Purpose: Check that the Go version in Dockerfile matches the required version of Go
+
+#------------------------------------------------
+# Check if required version parameter is provided
+if [ $# -ne 1 ]; then
+ echo "❌ ERROR: Usage: $0 "
+ echo " Example: $0 1.25.1"
+ exit 1
+fi
+
+REQUIRED_GO_VERSION="$1"
+
+#------------------------------------------------
+# Get the directory where the script is located
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+DOCKERFILE_PATH="$SCRIPT_DIR/Dockerfile"
+
+#------------------------------------------------
+# Check if Dockerfile exists
+if [ ! -f "$DOCKERFILE_PATH" ]; then
+ echo "❌ ERROR: Dockerfile not found at $DOCKERFILE_PATH"
+ exit 1
+fi
+
+#------------------------------------------------
+# Extract Go version from Dockerfile FROM line
+DOCKER_GO_VERSION=$(grep "FROM golang:" "$DOCKERFILE_PATH" | grep -o '[0-9][0-9.]*' | head -1)
+
+if [ -z "$DOCKER_GO_VERSION" ]; then
+ echo "❌ ERROR: Could not extract Go version from Dockerfile"
+ echo " Looking for line starting with 'FROM golang:' in $DOCKERFILE_PATH"
+ exit 1
+fi
+
+#------------------------------------------------
+# Compare versions
+echo "🔍 Checking Go version compatibility..."
+echo " Required version: $REQUIRED_GO_VERSION"
+echo " Dockerfile version: $DOCKER_GO_VERSION"
+
+if [ "$DOCKER_GO_VERSION" != "$REQUIRED_GO_VERSION" ]; then
+ echo "❌ CRITICAL ERROR: Go version mismatch!"
+ echo " Workflow expects: $REQUIRED_GO_VERSION"
+ echo " Dockerfile has: $DOCKER_GO_VERSION"
+ echo " Please update $DOCKERFILE_PATH FROM line to use golang:$REQUIRED_GO_VERSION-bullseye"
+ exit 1
+fi
+
+echo "✅ Go version check passed"
+exit 0
diff --git a/scripts/go-work-sync.sh b/scripts/go-work-sync.sh
index 39a03a3f56..20eb333198 100755
--- a/scripts/go-work-sync.sh
+++ b/scripts/go-work-sync.sh
@@ -32,7 +32,7 @@ GO_WORK_FILE="go.work"
rm -f "$GO_WORK_FILE"
if [ ! -f "$GO_WORK_FILE" ]; then
echo "// Go Version" > "$GO_WORK_FILE"
- echo "go 1.23.1" >> "$GO_WORK_FILE"
+ echo "go 1.25.1" >> "$GO_WORK_FILE"
fi
#------------------------------------------------
@@ -46,24 +46,24 @@ find . -type f -name 'go.mod' | while read -r modfile; do
echo " Updated $moddir/go.mod"
cd "$moddir" || exit
- isSdk="[ "$moddir" == "./sdk" ]"
- isChifra="[ "$moddir" == "./src/apps/chifra" ]"
- isGoMaker="[ "$moddir" == "./src/dev_tools/goMaker" ]"
- isNode="[ "$moddir" == "./node" ]"
- isFourbyte="[ "$moddir" == "./examples/four_bytes" ]"
- isKeystore="[ "$moddir" == "./examples/keystore" ]"
- isIndexMan="[ "$moddir" == "./src/dev_tools/indexManager" ]"
- isSimple="[ "$moddir" == "./examples/simple" ]"
+ if [ "$moddir" = "./sdk" ]; then isSdk=true; else isSdk=false; fi
+ if [ "$moddir" = "./src/apps/chifra" ]; then isChifra=true; else isChifra=false; fi
+ if [ "$moddir" = "./src/dev_tools/goMaker" ]; then isGoMaker=true; else isGoMaker=false; fi
+ if [ "$moddir" = "./node" ]; then isNode=true; else isNode=false; fi
+ if [ "$moddir" = "./examples/four_bytes" ]; then isFourbyte=true; else isFourbyte=false; fi
+ if [ "$moddir" = "./examples/keystore" ]; then isKeystore=true; else isKeystore=false; fi
+ if [ "$moddir" = "./src/dev_tools/indexManager" ]; then isIndexMan=true; else isIndexMan=false; fi
+ if [ "$moddir" = "./examples/simple" ]; then isSimple=true; else isSimple=false; fi
- if $isGoMaker || $isNode || $isFourbyte; then
+ if [ "$isGoMaker" = true ] || [ "$isNode" = true ] || [ "$isFourbyte" = true ]; then
go get github.com/btcsuite/btcd 2> /dev/null
fi
- if ! $isSdk && ! $isChifra && ! $isGoMaker && ! $isFourbyte && ! $isIndexMan && ! $isKeystore; then
+ if [ "$isSdk" = false ] && [ "$isChifra" = false ] && [ "$isGoMaker" = false ] && [ "$isFourbyte" = false ] && [ "$isIndexMan" = false ] && [ "$isKeystore" = false ]; then
go get github.com/TrueBlocks/trueblocks-sdk/v5@latest
fi
- if ! $isChifra; then
+ if [ "$isChifra" = false ]; then
go get github.com/TrueBlocks/trueblocks-core/src/apps/chifra@latest
fi
diff --git a/scripts/pull-all.sh b/scripts/pull-all.sh
new file mode 100755
index 0000000000..7c4729d2a4
--- /dev/null
+++ b/scripts/pull-all.sh
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+# pull-all.sh - Pull updates for all repositories
+# This script visits each of the four repos and performs git pull --recurse-submodules
+
+set -e
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+# Function to print colored output
+print_status() {
+ echo -e "${GREEN}[INFO]${NC} $1"
+}
+
+print_warning() {
+ echo -e "${YELLOW}[WARN]${NC} $1"
+}
+
+print_error() {
+ echo -e "${RED}[ERROR]${NC} $1"
+}
+
+# Function to pull from a repository
+pull_repo() {
+ local repo_dir="$1"
+ local repo_name="$2"
+
+ print_status "Updating $repo_name..."
+
+ if [ ! -d "$repo_dir" ]; then
+ print_warning "Directory $repo_dir does not exist, skipping..."
+ return 0
+ fi
+
+ if [ ! -d "$repo_dir/.git" ] && [ ! -f "$repo_dir/.git" ]; then
+ print_warning "$repo_dir is not a git repository, skipping..."
+ return 0
+ fi
+
+ cd "$repo_dir"
+
+ # Check if we have any changes that might be lost
+ if ! git diff --quiet || ! git diff --cached --quiet; then
+ print_warning "$repo_name has uncommitted changes. Continuing anyway..."
+ fi
+
+ # Perform the pull
+ if git pull --recurse-submodules; then
+ print_status "$repo_name updated successfully"
+ else
+ print_error "Failed to update $repo_name"
+ return 1
+ fi
+
+ cd - > /dev/null
+}
+
+#------------------------------------------------
+# Get the directory where the script is located
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+#------------------------------------------------
+cd $SCRIPT_DIR/..
+
+print_status "Starting pull for all repositories..."
+print_status "Repository root: $(pwd)"
+
+# Array of repositories to update
+repos=(
+ "./build:build"
+ "./sdk:sdk"
+ "./examples:examples"
+ "./khedra:khedra"
+)
+
+# Track success/failure
+failed_repos=()
+success_count=0
+
+# Pull from each repository
+for repo_info in "${repos[@]}"; do
+ IFS=':' read -r repo_dir repo_name <<< "$repo_info"
+
+ if pull_repo "$repo_dir" "$repo_name"; then
+ ((success_count++))
+ else
+ failed_repos+=("$repo_name")
+ fi
+ echo # Add blank line for readability
+done
+
+# Print summary
+echo "========================================="
+print_status "Pull completed for $success_count repositories"
+
+if [ ${#failed_repos[@]} -gt 0 ]; then
+ print_error "Failed repositories: ${failed_repos[*]}"
+ exit 1
+else
+ print_status "All repositories updated successfully!"
+fi
\ No newline at end of file
diff --git a/scripts/test-with-docker.sh b/scripts/test-with-docker.sh
index c4cde25d53..cd42ef14ac 100644
--- a/scripts/test-with-docker.sh
+++ b/scripts/test-with-docker.sh
@@ -32,21 +32,23 @@ if [ ! -f "Dockerfile" ]; then
echo "Dockerfile does not exist in the current directory $(pwd)."
exit 1
fi
-IMAGE_ID=$(docker build -q \
+echo "Running docker build with full output..."
+docker build \
--build-arg repo="$REPO" \
--build-arg commit_sha="$COMMIT_SHA" \
--build-arg branch="$BRANCH" \
- .)
+ -t "trueblocks-test:$COMMIT_SHA" \
+ .
RESULT=$?
-echo "IMAGE_ID=$IMAGE_ID"
-echo "RESULT=$RESULT"
-
if [ $RESULT -ne 0 ]; then
echo "Failed to build Docker image."
exit 1
fi
+IMAGE_ID="trueblocks-test:$COMMIT_SHA"
+echo "IMAGE_ID=$IMAGE_ID"
+
#------------------------------------------------
echo "Running the docker image..."
docker run \
diff --git a/scripts/test_perf.sh b/scripts/test_perf.sh
new file mode 100755
index 0000000000..b6712741d7
--- /dev/null
+++ b/scripts/test_perf.sh
@@ -0,0 +1,426 @@
+#!/usr/bin/env bash
+
+# test_perf.sh - Simple performance and correctness testing script
+# Tests both trueblocks.eth and rotki.eth with cache clearing
+# Usage: ./test_perf.sh [--cache] (use --cache instead of --decache)
+
+set -e # Exit on any error
+
+# Parse command line arguments
+CACHE_MODE="--decache" # Default to decache
+for arg in "$@"; do
+ case $arg in
+ --cache)
+ CACHE_MODE="--cache"
+ echo -e "\033[1;33mUsing --cache mode instead of --decache\033[0m"
+ shift
+ ;;
+ --help|-h)
+ echo "Usage: $0 [--cache]"
+ echo ""
+ echo "Options:"
+ echo " --cache Use --cache instead of --decache for initialization"
+ echo " --help Show this help message"
+ echo ""
+ echo "Default behavior uses --decache to clear cache before each test."
+ exit 0
+ ;;
+ *)
+ # Unknown option
+ ;;
+ esac
+done
+
+# Global variables for storing results
+TRUEBLOCKS_OLD_TIME=""
+TRUEBLOCKS_NEW_TIME=""
+ROTKI_OLD_TIME=""
+ROTKI_NEW_TIME=""
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color
+
+# Get script directory
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
+BUILD_DIR="$PROJECT_ROOT/build"
+
+# Test output directories (in build directory which is .gitignored)
+TEST_DIR="$BUILD_DIR/test_results"
+OLD_DIR="$TEST_DIR/old"
+NEW_DIR="$TEST_DIR/new"
+
+# Clean cache function
+clean_cache() {
+ local address=$1
+ if [ "$CACHE_MODE" = "--cache" ]; then
+ echo -e "${YELLOW}Setting up cache for $address...${NC}"
+ else
+ echo -e "${YELLOW}Clearing cache for $address...${NC}"
+ fi
+ cd "$BUILD_DIR"
+ yes | ../bin/chifra export --logs "$address" "$CACHE_MODE" --max_records 1500 > /dev/null 2>&1 || true
+}
+
+# Clean up function
+cleanup() {
+ echo -e "${YELLOW}Cleaning up test directories...${NC}"
+ rm -rf "$TEST_DIR"
+}
+
+# Set up test directories
+setup_dirs() {
+ echo -e "${BLUE}Setting up test directories...${NC}"
+ rm -rf "$TEST_DIR"
+ mkdir -p "$OLD_DIR" "$NEW_DIR"
+}
+
+# Run test with timing
+run_test() {
+ local new_code_value=$1
+ local output_file=$2
+ local label=$3
+ local address=$4
+ local time_var=$5
+
+ echo -e "${BLUE}Running $label implementation for $address...${NC}"
+
+ # Set environment variable
+ export NEW_CODE=$new_code_value
+
+ # Change to build directory for running tests
+ cd "$BUILD_DIR"
+
+ # Build the chifra command (run from build directory)
+ local cmd="../bin/chifra export --logs $address --max_records 1500 --output $output_file"
+
+ echo "Command: $cmd"
+ echo "Environment: NEW_CODE=$NEW_CODE"
+ echo "Working directory: $(pwd)"
+
+ # Capture timing to a variable
+ local time_output
+ if command -v gtime >/dev/null 2>&1; then
+ # Use GNU time if available (more detailed output)
+ time_output=$(gtime -f "%e %U %S %M" $cmd 2>&1)
+ else
+ # Fall back to built-in time and capture output
+ time_output=$( (time $cmd) 2>&1 | grep -E "(real|user|sys)" | tail -3)
+ fi
+
+ # Store timing results for later formatting
+ eval "$time_var=\"$time_output\""
+
+ # Unset environment variable
+ unset NEW_CODE
+}
+
+# Compare outputs
+compare_outputs() {
+ local address=$1
+ echo -e "${BLUE}Comparing outputs for $address...${NC}"
+
+ if diff -r "$OLD_DIR" "$NEW_DIR" > /dev/null; then
+ echo -e "${GREEN}✅ CORRECTNESS VERIFIED: Both implementations produce identical outputs for $address${NC}"
+
+ # Show what was generated
+ local file_count=$(find "$OLD_DIR" -type f | wc -l)
+ local total_size=$(du -sh "$OLD_DIR" 2>/dev/null | cut -f1 || echo "0B")
+ echo -e "${GREEN}Generated $file_count file(s), total size: $total_size${NC}"
+
+ # Show sample of first file if any exist
+ local first_file=$(find "$OLD_DIR" -type f -name "*.csv" | head -1)
+ if [[ -n "$first_file" ]]; then
+ local line_count=$(wc -l < "$first_file")
+ echo -e "${GREEN}Sample file: $(basename "$first_file") ($line_count lines)${NC}"
+ fi
+
+ return 0
+ else
+ echo -e "${RED}❌ CORRECTNESS FAILURE: Implementations produce different outputs for $address!${NC}"
+ echo -e "${RED}Differences found:${NC}"
+ diff -r "$OLD_DIR" "$NEW_DIR" | head -10
+ return 1
+ fi
+}
+
+# Performance comparison
+performance_summary() {
+ local address="$1"
+ local old_time="$2"
+ local new_time="$3"
+
+ echo -e "${GREEN}Performance Summary for $address${NC}"
+ echo "========================================"
+
+ # Parse timing results based on format
+ local old_real new_real
+
+ if command -v gtime >/dev/null 2>&1; then
+ # GNU time format: "real user sys memory"
+ old_real=$(echo "$old_time" | awk '{print $1}')
+ new_real=$(echo "$new_time" | awk '{print $1}')
+ local old_memory=$(echo "$old_time" | awk '{print $4}')
+ local new_memory=$(echo "$new_time" | awk '{print $4}')
+
+ echo "Implementation | Real Time | Memory KB | Performance"
+ echo "-------------- | --------- | --------- | -----------"
+ echo "Old | ${old_real}s | $old_memory | baseline"
+
+ # Calculate percentage difference
+ if [[ -n "$old_real" && -n "$new_real" && "$old_real" != "0" ]]; then
+ local percent_diff=$(echo "scale=1; ($new_real - $old_real) / $old_real * 100" | bc -l)
+ if (( $(echo "$percent_diff > 0" | bc -l) )); then
+ echo "New | ${new_real}s | $new_memory | ${percent_diff}% slower"
+ else
+ local abs_diff=$(echo "$percent_diff * -1" | bc -l)
+ echo "New | ${new_real}s | $new_memory | ${abs_diff}% faster"
+ fi
+ else
+ echo "New | ${new_real}s | $new_memory | comparison failed"
+ fi
+ else
+ # Built-in time format - extract real time
+ old_real=$(echo "$old_time" | grep "real" | awk '{print $2}' | sed 's/[ms]//g')
+ new_real=$(echo "$new_time" | grep "real" | awk '{print $2}' | sed 's/[ms]//g')
+
+ echo "Implementation | Real Time | Performance"
+ echo "-------------- | --------- | -----------"
+ echo "Old | $old_real | baseline"
+
+ # For built-in time, we need to handle different formats (0m0.681s vs 0.681s)
+ if [[ -n "$old_real" && -n "$new_real" ]]; then
+ # Convert to seconds if in m:s format
+ old_seconds=$(echo "$old_real" | awk -F'm' '{if(NF>1) print $1*60+$2; else print $1}' | sed 's/s//')
+ new_seconds=$(echo "$new_real" | awk -F'm' '{if(NF>1) print $1*60+$2; else print $1}' | sed 's/s//')
+
+ if [[ -n "$old_seconds" && -n "$new_seconds" && "$old_seconds" != "0" ]]; then
+ local percent_diff=$(echo "scale=1; ($new_seconds - $old_seconds) / $old_seconds * 100" | bc -l)
+ if (( $(echo "$percent_diff > 0" | bc -l) )); then
+ echo "New | $new_real | ${percent_diff}% slower"
+ else
+ local abs_diff=$(echo "$percent_diff * -1" | bc -l)
+ echo "New | $new_real | ${abs_diff}% faster"
+ fi
+ else
+ echo "New | $new_real | comparison failed"
+ fi
+ fi
+ fi
+
+ echo ""
+}
+
+# Run a complete test for one address
+run_address_test() {
+ local address=$1
+ local test_num=$2
+
+ echo -e "${GREEN}=======================================${NC}"
+ echo -e "${GREEN}TEST $test_num: $address${NC}"
+ echo -e "${GREEN}=======================================${NC}"
+
+ # Clean cache first
+ clean_cache "$address"
+
+ # Set up fresh directories
+ setup_dirs
+
+ # Variables to capture timing results
+ local old_timing new_timing
+
+ echo ""
+ echo -e "${GREEN}Phase 1: Testing OLD implementation (NEW_CODE=0)${NC}"
+ echo "=================================================="
+ run_test "0" "$OLD_DIR/output.csv" "OLD" "$address" old_timing
+
+ echo ""
+ echo -e "${GREEN}Phase 2: Testing NEW implementation (NEW_CODE=1)${NC}"
+ echo "=================================================="
+ # Clean cache again before new implementation
+ clean_cache "$address"
+ run_test "1" "$NEW_DIR/output.csv" "NEW" "$address" new_timing
+
+ echo ""
+ echo -e "${GREEN}Phase 3: Comparing Results${NC}"
+ echo "=========================="
+
+ if compare_outputs "$address"; then
+ echo ""
+ performance_summary "$address" "$old_timing" "$new_timing"
+
+ # Store results globally for final summary
+ if [[ "$address" == "trueblocks.eth" ]]; then
+ TRUEBLOCKS_OLD_TIME="$old_timing"
+ TRUEBLOCKS_NEW_TIME="$new_timing"
+ elif [[ "$address" == "rotki.eth" ]]; then
+ ROTKI_OLD_TIME="$old_timing"
+ ROTKI_NEW_TIME="$new_timing"
+ fi
+
+ return 0
+ else
+ echo -e "${RED}Test failed for $address due to output differences.${NC}"
+ return 1
+ fi
+}
+
+# Create final summary table
+final_summary_table() {
+ echo ""
+ echo -e "${BLUE}DETAILED PERFORMANCE COMPARISON:${NC}"
+ echo "=================================="
+ echo ""
+
+ # Helper function to extract real time from timing output
+ extract_time() {
+ local time_output="$1"
+ if command -v gtime >/dev/null 2>&1; then
+ echo "$time_output" | awk '{print $1}'
+ else
+ echo "$time_output" | grep "real" | awk '{print $2}' | sed 's/[ms]//g'
+ fi
+ }
+
+ # Helper function to calculate percentage difference
+ calc_percentage() {
+ local old_time="$1"
+ local new_time="$2"
+
+ if command -v gtime >/dev/null 2>&1; then
+ # GNU time format - times are already in seconds
+ if [[ -n "$old_time" && -n "$new_time" && "$old_time" != "0" ]]; then
+ # Use awk for more reliable floating point arithmetic
+ local percent_diff=$(awk "BEGIN {printf \"%.1f\", ($new_time - $old_time) / $old_time * 100}")
+ local abs_diff=$(awk "BEGIN {printf \"%.1f\", sqrt(($percent_diff)^2)}")
+
+ if (( $(awk "BEGIN {print ($percent_diff > 0.05) ? 1 : 0}") )); then
+ echo "${percent_diff}% slower"
+ elif (( $(awk "BEGIN {print ($percent_diff < -0.05) ? 1 : 0}") )); then
+ echo "${abs_diff}% faster"
+ else
+ echo "~0% (no significant change)"
+ fi
+ else
+ echo "N/A"
+ fi
+ else
+ # Built-in time format - convert to seconds
+ local old_seconds=$(echo "$old_time" | awk -F'm' '{if(NF>1) print $1*60+$2; else print $1}' | sed 's/s//')
+ local new_seconds=$(echo "$new_time" | awk -F'm' '{if(NF>1) print $1*60+$2; else print $1}' | sed 's/s//')
+
+ if [[ -n "$old_seconds" && -n "$new_seconds" && "$old_seconds" != "0" ]]; then
+ # Use awk for more reliable floating point arithmetic
+ local percent_diff=$(awk "BEGIN {printf \"%.1f\", ($new_seconds - $old_seconds) / $old_seconds * 100}")
+ local abs_diff=$(awk "BEGIN {printf \"%.1f\", sqrt(($percent_diff)^2)}")
+
+ if (( $(awk "BEGIN {print ($percent_diff > 0.05) ? 1 : 0}") )); then
+ echo "${percent_diff}% slower"
+ elif (( $(awk "BEGIN {print ($percent_diff < -0.05) ? 1 : 0}") )); then
+ echo "${abs_diff}% faster"
+ else
+ echo "~0% (no significant change)"
+ fi
+ else
+ echo "N/A"
+ fi
+ fi
+ }
+
+ # Extract times
+ local tb_old_time=$(extract_time "$TRUEBLOCKS_OLD_TIME")
+ local tb_new_time=$(extract_time "$TRUEBLOCKS_NEW_TIME")
+ local rotki_old_time=$(extract_time "$ROTKI_OLD_TIME")
+ local rotki_new_time=$(extract_time "$ROTKI_NEW_TIME")
+
+ # Calculate percentages
+ local tb_perf=$(calc_percentage "$tb_old_time" "$tb_new_time")
+ local rotki_perf=$(calc_percentage "$rotki_old_time" "$rotki_new_time")
+
+ # Display table
+ echo "Address | Old Time | New Time | Performance"
+ echo "----------------- | -------- | -------- | -----------"
+ printf "trueblocks.eth | %8s | %8s | %s\n" "$tb_old_time" "$tb_new_time" "$tb_perf"
+ printf "rotki.eth | %8s | %8s | %s\n" "$rotki_old_time" "$rotki_new_time" "$rotki_perf"
+ echo ""
+}
+
+# Main execution
+main() {
+ echo -e "${GREEN}TrueBlocks Performance & Correctness Test${NC}"
+ echo -e "${GREEN}Multi-Address Testing Suite${NC}"
+ echo -e "${GREEN}=========================================${NC}"
+ echo ""
+
+ # Check if chifra binary exists
+ if [[ ! -f "$PROJECT_ROOT/bin/chifra" ]]; then
+ echo -e "${RED}Error: chifra binary not found at $PROJECT_ROOT/bin/chifra${NC}"
+ echo "Please build the project first: cd build && make"
+ exit 1
+ fi
+
+ # Check if build directory exists
+ if [[ ! -d "$BUILD_DIR" ]]; then
+ echo -e "${RED}Error: build directory not found at $BUILD_DIR${NC}"
+ echo "Please create build directory first"
+ exit 1
+ fi
+
+ local failed_tests=0
+
+ # Variables to store performance results
+ local trueblocks_old_time trueblocks_new_time trueblocks_perf
+ local rotki_old_time rotki_new_time rotki_perf
+
+ # Test trueblocks.eth
+ if run_address_test "trueblocks.eth" "1"; then
+ # Store results (this is a simplified approach - we'd need to modify run_address_test to return these)
+ trueblocks_perf="stored after test"
+ else
+ failed_tests=$((failed_tests + 1))
+ fi
+
+ echo ""
+ echo ""
+
+ # Test rotki.eth
+ if run_address_test "rotki.eth" "2"; then
+ # Store results (this is a simplified approach - we'd need to modify run_address_test to return these)
+ rotki_perf="stored after test"
+ else
+ failed_tests=$((failed_tests + 1))
+ fi
+
+ echo ""
+ echo -e "${GREEN}=======================================${NC}"
+ echo -e "${GREEN}FINAL SUMMARY${NC}"
+ echo -e "${GREEN}=======================================${NC}"
+
+ if [[ $failed_tests -eq 0 ]]; then
+ echo -e "${GREEN}✅ All tests passed! Both implementations produce identical results.${NC}"
+
+ # Show detailed comparison table
+ final_summary_table
+
+ echo -e "${YELLOW}Tip: Run this script multiple times to get consistent timing results.${NC}"
+ cleanup
+ exit 0
+ else
+ echo -e "${RED}❌ $failed_tests test(s) failed due to output differences.${NC}"
+ echo "Check $TEST_DIR for details."
+ exit 1
+ fi
+}
+
+# Handle script arguments (now ignores them and runs fixed test suite)
+if [[ $# -gt 0 ]]; then
+ echo "Note: This script now runs a fixed test suite for trueblocks.eth and rotki.eth"
+ echo "Custom arguments are ignored."
+ echo ""
+fi
+
+main
\ No newline at end of file
diff --git a/sdk b/sdk
index 7dbb20acd7..6e373ffa74 160000
--- a/sdk
+++ b/sdk
@@ -1 +1 @@
-Subproject commit 7dbb20acd794580f374b696bb4fdb6ae6bfc3c41
+Subproject commit 6e373ffa748bb9e5501adeb916a540d823d66642
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f2f0bb8afc..156755f38d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -39,19 +39,21 @@ string(REGEX MATCH "go([0-9]+)\\.([0-9]+)\\.[0-9]+"
GO_VERSION_MATCH "${GO_VERSION_OUTPUT}")
if(NOT GO_VERSION_MATCH)
- message(STATUS "${CColor}Could not determine Go version from output: \
+ message(STATUS "${CColor}Could not determine Go Version from output: \
${GO_VERSION_OUTPUT}.${COff}")
message(STATUS "${CColor}Please install Go from \
https://golang.org/doc/install.${COff}")
return()
endif()
+# Go Version -- NOTE THE LESS 25 marker
+#
set(GO_MAJOR_VERSION ${CMAKE_MATCH_1})
set(GO_MINOR_VERSION ${CMAKE_MATCH_2})
if(GO_MAJOR_VERSION LESS 1 OR
- (GO_MAJOR_VERSION EQUAL 1 AND GO_MINOR_VERSION LESS 23))
+ (GO_MAJOR_VERSION EQUAL 1 AND GO_MINOR_VERSION LESS 25))
message(STATUS "${CColor}The build failed.${COff}")
- message(STATUS "${CColor}Found ${GO_VERSION_OUTPUT}. Go Version 1.23.1 or "
+ message(STATUS "${CColor}Found ${GO_VERSION_OUTPUT}. Go Version 1.25.1 or "
"higher is required.${COff}")
message(STATUS "${CColor}Please install or update Go from "
"https://golang.org/doc/install.${COff}")
@@ -107,7 +109,7 @@ add_custom_target(generate
# ----------------------------------------------------------------------------
add_custom_target(test-all
- COMMAND ${SCRIPTS_DIR}/test-all.sh
+ COMMAND bash -c "TB_NO_KHEDRA_TEST=true ${SCRIPTS_DIR}/test-all.sh"
WORKING_DIRECTORY ${REPO_DIR}/build)
# ----------------------------------------------------------------------------
diff --git a/src/apps/chifra/cmd/export.go b/src/apps/chifra/cmd/export.go
index ba05521a40..ac201a8a54 100644
--- a/src/apps/chifra/cmd/export.go
+++ b/src/apps/chifra/cmd/export.go
@@ -73,6 +73,7 @@ func init() {
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Appearances, "appearances", "p", false, `export a list of appearances`)
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Receipts, "receipts", "r", false, `export receipts instead of transactional data`)
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Logs, "logs", "l", false, `export logs instead of transactional data`)
+ exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Approvals, "approvals", "O", false, `export all token approval transactions for the given address`)
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Traces, "traces", "t", false, `export traces instead of transactional data`)
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Neighbors, "neighbors", "n", false, `export the neighbors of the given address`)
exportCmd.Flags().BoolVarP(&exportPkg.GetOptions().Statements, "statements", "A", false, `export only statements`)
diff --git a/src/apps/chifra/cmd/tokens.go b/src/apps/chifra/cmd/tokens.go
index 2324078c1e..050aca9c14 100644
--- a/src/apps/chifra/cmd/tokens.go
+++ b/src/apps/chifra/cmd/tokens.go
@@ -39,7 +39,7 @@ var tokensCmd = &cobra.Command{
const usageTokens = `tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'`
const longTokens = `Purpose:
@@ -52,7 +52,8 @@ Notes:
- If the token contract(s) from which you request balances are not ERC20 compliant, the results are undefined.
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- - If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.`
+ - If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.`
func init() {
var capabilities caps.Capability // capabilities for chifra tokens
@@ -62,6 +63,7 @@ func init() {
tokensCmd.Flags().SortFlags = false
+ tokensCmd.Flags().BoolVarP(&tokensPkg.GetOptions().Approvals, "approvals", "O", false, `returns all open approvals for the given address(es)`)
tokensCmd.Flags().StringSliceVarP(&tokensPkg.GetOptions().Parts, "parts", "p", nil, `which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]`)
tokensCmd.Flags().BoolVarP(&tokensPkg.GetOptions().ByAcct, "by_acct", "b", false, `consider each address an ERC20 token except the last, whose balance is reported for each token`)
diff --git a/src/apps/chifra/internal/export/README.md b/src/apps/chifra/internal/export/README.md
index 97930be112..fa4fda7199 100644
--- a/src/apps/chifra/internal/export/README.md
+++ b/src/apps/chifra/internal/export/README.md
@@ -31,6 +31,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/src/apps/chifra/internal/export/handle_appearances.go b/src/apps/chifra/internal/export/handle_appearances.go
index 0114ad0a65..dbdd525539 100644
--- a/src/apps/chifra/internal/export/handle_appearances.go
+++ b/src/apps/chifra/internal/export/handle_appearances.go
@@ -16,16 +16,16 @@ import (
)
func (opts *ExportOptions) HandleAppearances(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- chain := opts.Globals.Chain
- filter := types.NewFilter(
- opts.Reversed,
- false,
- []string{},
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ chain := opts.Globals.Chain
+ filter := types.NewFilter(
+ opts.Reversed,
+ false,
+ []string{},
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
currentBn := uint32(0)
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, true /* withCount */); err != nil {
diff --git a/src/apps/chifra/internal/export/handle_approvals.go b/src/apps/chifra/internal/export/handle_approvals.go
new file mode 100644
index 0000000000..dcbdfde52b
--- /dev/null
+++ b/src/apps/chifra/internal/export/handle_approvals.go
@@ -0,0 +1,151 @@
+// Copyright 2021 The TrueBlocks Authors. All rights reserved.
+// Use of this source code is governed by a license that can
+// be found in the LICENSE file.
+
+package exportPkg
+
+import (
+ "context"
+ "fmt"
+ "sort"
+
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/articulate"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/logger"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/monitor"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/ranges"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/rpc"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/topics"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/types"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/utils"
+)
+
+func (opts *ExportOptions) HandleApprovals(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
+ fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
+ addrArray := make([]base.Address, 0, len(monitorArray))
+ for _, mon := range monitorArray {
+ addrArray = append(addrArray, mon.Address)
+ }
+ logFilter := rpc.NewLogFilter(opts.Emitter, []string{topics.ApprovalTopic.Hex()})
+ opts.Fourbytes = []string{topics.ApprovalFourbyte.Hex()}
+
+ for _, mon := range monitorArray {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[[]*types.Log](&mon, filter, filter.Reversed); err != nil {
+ errorChan <- err
+ rCtx.Cancel()
+
+ } else if cnt == 0 {
+ errorChan <- fmt.Errorf("no blocks found for the query")
+ continue
+
+ } else {
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
+
+ if finished {
+ continue
+ }
+
+ for app := range thisMap {
+ thisMap[app] = &[]*types.Log{}
+ }
+
+ iterFunc := func(app types.Appearance, value *[]*types.Log) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes && tx.Receipt != nil {
+ for _, log := range tx.Receipt.Logs {
+ if filter.PassesLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
+ if opts.Articulate {
+ if err := abiCache.ArticulateLog(&log); err != nil {
+ errorChan <- fmt.Errorf("error articulating log: %v", err)
+ }
+ }
+ *value = append(*value, &log)
+ }
+ }
+ }
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
+ }
+ }
+
+ // Set up and iterate over the map calling iterFunc for each appearance (PARALLEL)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
+
+ // Now safely collect all logs from all log slices
+ items := make([]*types.Log, 0)
+ for _, logSlice := range thisMap {
+ if logSlice != nil && *logSlice != nil {
+ items = append(items, *logSlice...)
+ }
+ }
+
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].LogIndex < items[j].LogIndex
+ }
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
+
+ for _, item := range items {
+ var passes1, passes2 bool
+ passes1, finished = filter.PassesCountFilter()
+ passes2 = !opts.Nfts || item.IsNFT()
+ if passes1 && passes2 {
+ modelChan <- item
+ }
+ if finished {
+ break
+ }
+ }
+ }
+ bar.Finish(true /* newLine */)
+ }
+ }
+ }
+
+ extraOpts := map[string]any{
+ "articulate": opts.Articulate,
+ "export": true,
+ }
+
+ return output.StreamMany(rCtx, fetchData, opts.Globals.OutputOptsWithExtra(extraOpts))
+}
diff --git a/src/apps/chifra/internal/export/handle_assets.go b/src/apps/chifra/internal/export/handle_assets.go
index 416916dc56..3039fff100 100644
--- a/src/apps/chifra/internal/export/handle_assets.go
+++ b/src/apps/chifra/internal/export/handle_assets.go
@@ -20,19 +20,19 @@ import (
)
func (opts *ExportOptions) HandleAssets(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
- assetFilters := make([]base.Address, 0, len(opts.Asset))
- for _, asset := range opts.Asset {
- assetFilters = append(assetFilters, base.HexToAddress(asset))
- }
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+ assetFilters := make([]base.Address, 0, len(opts.Asset))
+ for _, asset := range opts.Asset {
+ assetFilters = append(assetFilters, base.HexToAddress(asset))
+ }
+
for _, mon := range monitorArray {
ledgerOpts := &ledger.ReconcilerOptions{
AccountFor: mon.Address,
@@ -46,7 +46,7 @@ func (opts *ExportOptions) HandleAssets(rCtx *output.RenderCtx, monitorArray []m
}
recon := ledger.NewReconciler(opts.Conn, ledgerOpts)
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Transaction](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -55,89 +55,83 @@ func (opts *ExportOptions) HandleAssets(rCtx *output.RenderCtx, monitorArray []m
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Transaction)
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
- }
- return nil
+ iterFunc := func(app types.Appearance, value *types.Transaction) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ *value = *tx
}
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
}
+ }
- // Set up and iterate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
-
- txArray := make([]*types.Transaction, 0, len(thisMap))
- for _, tx := range thisMap {
- txArray = append(txArray, tx)
- }
+ // Set up and iterate over the map calling iterFunc for each appearance
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- sort.Slice(txArray, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if txArray[i].BlockNumber == txArray[j].BlockNumber {
- return txArray[i].TransactionIndex < txArray[j].TransactionIndex
- }
- return txArray[i].BlockNumber < txArray[j].BlockNumber
- })
+ txArray := make([]*types.Transaction, 0, len(thisMap))
+ for _, tx := range thisMap {
+ txArray = append(txArray, tx)
+ }
- items, done, err := recon.GetAssets(txArray)
- if err != nil {
- errorChan <- err
- return
+ sort.Slice(txArray, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
}
-
- for _, item := range items {
- modelChan <- item
+ if txArray[i].BlockNumber == txArray[j].BlockNumber {
+ return txArray[i].TransactionIndex < txArray[j].TransactionIndex
}
+ return txArray[i].BlockNumber < txArray[j].BlockNumber
+ })
- if done {
- finished = true
- break
- }
+ items, done, err := recon.GetAssets(txArray)
+ if err != nil {
+ errorChan <- err
+ return
+ }
+
+ for _, item := range items {
+ modelChan <- item
+ }
+
+ if done {
+ finished = true
+ break
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_balances.go b/src/apps/chifra/internal/export/handle_balances.go
index 320674f0d4..bab6f5822e 100644
--- a/src/apps/chifra/internal/export/handle_balances.go
+++ b/src/apps/chifra/internal/export/handle_balances.go
@@ -20,26 +20,26 @@ import (
)
func (opts *ExportOptions) HandleBalances(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- chain := opts.Globals.Chain
- testMode := opts.Globals.TestMode
- nErrors := 0
-
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ chain := opts.Globals.Chain
+ testMode := opts.Globals.TestMode
+ nErrors := 0
+
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
currentBn := base.Blknum(0)
prevBalance := base.NewWei(0)
for _, mon := range monitorArray {
for _, assetStr := range opts.Asset {
asset := base.HexToAddress(assetStr)
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Token](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -48,101 +48,95 @@ func (opts *ExportOptions) HandleBalances(rCtx *output.RenderCtx, monitorArray [
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Token](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ prevBalance, _ = opts.Conn.GetBalanceAtToken(asset, mon.Address, filter.GetOuterBounds().First)
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- finished := false
- prevBalance, _ = opts.Conn.GetBalanceAtToken(asset, mon.Address, filter.GetOuterBounds().First)
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ if finished {
+ continue
+ }
- if finished {
- continue
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Token)
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Token)
+ iterFunc := func(app types.Appearance, value *types.Token) error {
+ var balance *base.Wei
+ if balance, err = opts.Conn.GetBalanceAtToken(asset, mon.Address, base.Blknum(app.BlockNumber)); err != nil {
+ return err
}
+ value.Address = asset
+ value.Holder = mon.Address
+ value.BlockNumber = base.Blknum(app.BlockNumber)
+ value.TransactionIndex = base.Txnum(app.TransactionIndex)
+ value.Balance = *balance
+ value.Timestamp = app.Timestamp
+ bar.Tick()
+ return nil
+ }
- iterFunc := func(app types.Appearance, value *types.Token) error {
- var balance *base.Wei
- if balance, err = opts.Conn.GetBalanceAtToken(asset, mon.Address, base.Blknum(app.BlockNumber)); err != nil {
- return err
- }
- value.Address = asset
- value.Holder = mon.Address
- value.BlockNumber = base.Blknum(app.BlockNumber)
- value.TransactionIndex = base.Txnum(app.TransactionIndex)
- value.Balance = *balance
- value.Timestamp = app.Timestamp
- bar.Tick()
- return nil
+ iterErrorChan := make(chan error)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
+ for err := range iterErrorChan {
+ if !testMode || nErrors == 0 {
+ errorChan <- err
+ nErrors++
}
+ }
- iterErrorChan := make(chan error)
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
- for err := range iterErrorChan {
- if !testMode || nErrors == 0 {
- errorChan <- err
- nErrors++
- }
- }
+ items := make([]*types.Token, 0, len(thisMap))
+ for _, tx := range thisMap {
+ items = append(items, tx)
+ }
- items := make([]*types.Token, 0, len(thisMap))
- for _, tx := range thisMap {
- items = append(items, tx)
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
}
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
+ for idx, item := range items {
+ visitToken := func(idx int, item *types.Token) error {
+ item.PriorBalance = *prevBalance
+ if item.BlockNumber == 0 || item.BlockNumber != currentBn || item.Timestamp == 0xdeadbeef {
+ item.Timestamp, _ = tslib.FromBnToTs(chain, item.BlockNumber)
}
- return items[i].BlockNumber < items[j].BlockNumber
- })
-
- for idx, item := range items {
- visitToken := func(idx int, item *types.Token) error {
- item.PriorBalance = *prevBalance
- if item.BlockNumber == 0 || item.BlockNumber != currentBn || item.Timestamp == 0xdeadbeef {
- item.Timestamp, _ = tslib.FromBnToTs(chain, item.BlockNumber)
- }
- currentBn = item.BlockNumber
- if idx == 0 || item.PriorBalance.Cmp(&item.Balance) != 0 || opts.Globals.Verbose {
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- item
- }
+ currentBn = item.BlockNumber
+ if idx == 0 || item.PriorBalance.Cmp(&item.Balance) != 0 || opts.Globals.Verbose {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- item
}
- prevBalance = &item.Balance
- return nil
- }
- if err := visitToken(idx, item); err != nil {
- errorChan <- err
- return
- }
- if finished {
- break
}
+ prevBalance = &item.Balance
+ return nil
+ }
+ if err := visitToken(idx, item); err != nil {
+ errorChan <- err
+ return
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
- prevBalance = base.NewWei(0)
+ bar.Finish(true /* newLine */)
}
+ prevBalance = base.NewWei(0)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_count.go b/src/apps/chifra/internal/export/handle_count.go
index b5d03cdec0..641f397805 100644
--- a/src/apps/chifra/internal/export/handle_count.go
+++ b/src/apps/chifra/internal/export/handle_count.go
@@ -15,23 +15,23 @@ import (
)
func (opts *ExportOptions) HandleCount(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- if opts.Globals.Verbose {
- for i := 0; i < len(monitorArray); i++ {
- _ = monitorArray[i].ReadMonitorHeader()
- monitorArray[i].Close()
+ fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ if opts.Globals.Verbose {
+ for i := 0; i < len(monitorArray); i++ {
+ _ = monitorArray[i].ReadMonitorHeader()
+ monitorArray[i].Close()
+ }
}
- }
- testMode := opts.Globals.TestMode
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
+ testMode := opts.Globals.TestMode
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
- fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, true /* withCount */); err != nil {
errorChan <- err
diff --git a/src/apps/chifra/internal/export/handle_logs.go b/src/apps/chifra/internal/export/handle_logs.go
index 86a0598c03..a2d9356fb2 100644
--- a/src/apps/chifra/internal/export/handle_logs.go
+++ b/src/apps/chifra/internal/export/handle_logs.go
@@ -21,24 +21,24 @@ import (
)
func (opts *ExportOptions) HandleLogs(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
- addrArray := make([]base.Address, 0, len(monitorArray))
- for _, mon := range monitorArray {
- addrArray = append(addrArray, mon.Address)
- }
- logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
+ addrArray := make([]base.Address, 0, len(monitorArray))
+ for _, mon := range monitorArray {
+ addrArray = append(addrArray, mon.Address)
+ }
+ logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[[]*types.Log](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -47,101 +47,96 @@ func (opts *ExportOptions) HandleLogs(rCtx *output.RenderCtx, monitorArray []mon
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ // Initialize log slice pointers for each appearance
+ for app := range thisMap {
+ thisMap[app] = &[]*types.Log{}
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
+ iterFunc := func(app types.Appearance, value *[]*types.Log) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes && tx.Receipt != nil {
+ for _, log := range tx.Receipt.Logs {
+ if filter.PassesLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
+ if opts.Articulate {
+ if err := abiCache.ArticulateLog(&log); err != nil {
+ errorChan <- fmt.Errorf("error articulating log: %v", err)
+ }
+ }
+ *value = append(*value, &log)
+ }
}
- return nil
}
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
}
+ }
+
+ // Set up and iterate over the map calling iterFunc for each appearance (PARALLEL)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- // Set up and interate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
+ // Now safely collect all logs from all log slices
+ items := make([]*types.Log, 0)
+ for _, logSlice := range thisMap {
+ if logSlice != nil && *logSlice != nil {
+ items = append(items, *logSlice...)
}
+ }
- items := make([]*types.Log, 0, len(thisMap))
- for _, tx := range thisMap {
- if tx.Receipt == nil {
- continue
- }
- for _, log := range tx.Receipt.Logs {
- if filter.ApplyLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
- if opts.Articulate {
- if err = abiCache.ArticulateLog(&log); err != nil {
- errorChan <- fmt.Errorf("error articulating log: %v", err)
- }
- }
- items = append(items, &log)
- }
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].LogIndex < items[j].LogIndex
}
+ return items[i].TransactionIndex < items[j].TransactionIndex
}
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- if items[i].TransactionIndex == items[j].TransactionIndex {
- return items[i].LogIndex < items[j].LogIndex
- }
- return items[i].TransactionIndex < items[j].TransactionIndex
- }
- return items[i].BlockNumber < items[j].BlockNumber
- })
-
- for _, item := range items {
- var passes1, passes2 bool
- passes1, finished = filter.ApplyCountFilter()
- passes2 = !opts.Nfts || item.IsNFT()
- if passes1 && passes2 {
- modelChan <- item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ var passes1, passes2 bool
+ passes1, finished = filter.PassesCountFilter()
+ passes2 = !opts.Nfts || item.IsNFT()
+ if passes1 && passes2 {
+ modelChan <- item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_neighbors.go b/src/apps/chifra/internal/export/handle_neighbors.go
index b7fb8f91c5..ff63d691f0 100644
--- a/src/apps/chifra/internal/export/handle_neighbors.go
+++ b/src/apps/chifra/internal/export/handle_neighbors.go
@@ -19,19 +19,19 @@ import (
)
func (opts *ExportOptions) HandleNeighbors(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- testMode := opts.Globals.TestMode
- nErrors := 0
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ testMode := opts.Globals.TestMode
+ nErrors := 0
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[bool](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -40,91 +40,85 @@ func (opts *ExportOptions) HandleNeighbors(rCtx *output.RenderCtx, monitorArray
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[bool](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ if finished {
+ continue
+ }
- if finished {
- continue
- }
+ for app := range thisMap {
+ thisMap[app] = new(bool)
+ }
- for app := range thisMap {
- thisMap[app] = new(bool)
+ neighbors := make([]Reason, 0)
+ iterFunc := func(app types.Appearance, unused *bool) error {
+ _ = unused
+ if theseNeighbors, err := GetNeighbors(&app); err != nil {
+ return err
+ } else {
+ neighbors = append(neighbors, theseNeighbors...)
+ return nil
}
+ }
- neighbors := make([]Reason, 0)
- iterFunc := func(app types.Appearance, unused *bool) error {
- _ = unused
- if theseNeighbors, err := GetNeighbors(&app); err != nil {
- return err
- } else {
- neighbors = append(neighbors, theseNeighbors...)
- return nil
- }
+ iterErrorChan := make(chan error)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
+ for err := range iterErrorChan {
+ if !testMode || nErrors == 0 {
+ errorChan <- err
+ nErrors++
}
+ }
- iterErrorChan := make(chan error)
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
- for err := range iterErrorChan {
- if !testMode || nErrors == 0 {
- errorChan <- err
- nErrors++
- }
+ items := make([]types.Appearance, 0, len(thisMap))
+ for _, neighbor := range neighbors {
+ app := types.Appearance{
+ Address: *neighbor.Address,
+ BlockNumber: neighbor.App.BlockNumber,
+ TransactionIndex: neighbor.App.TransactionIndex,
+ Reason: neighbor.Reason,
}
+ items = append(items, app)
+ }
- items := make([]types.Appearance, 0, len(thisMap))
- for _, neighbor := range neighbors {
- app := types.Appearance{
- Address: *neighbor.Address,
- BlockNumber: neighbor.App.BlockNumber,
- TransactionIndex: neighbor.App.TransactionIndex,
- Reason: neighbor.Reason,
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].Address.Hex() < items[j].Address.Hex()
}
- items = append(items, app)
+ return items[i].TransactionIndex < items[j].TransactionIndex
}
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- if items[i].TransactionIndex == items[j].TransactionIndex {
- return items[i].Address.Hex() < items[j].Address.Hex()
- }
- return items[i].TransactionIndex < items[j].TransactionIndex
- }
- return items[i].BlockNumber < items[j].BlockNumber
- })
-
- for _, item := range items {
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- &item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- &item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_receipts.go b/src/apps/chifra/internal/export/handle_receipts.go
index a1a882580b..aee5a73d5a 100644
--- a/src/apps/chifra/internal/export/handle_receipts.go
+++ b/src/apps/chifra/internal/export/handle_receipts.go
@@ -21,24 +21,24 @@ import (
)
func (opts *ExportOptions) HandleReceipts(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
- addrArray := make([]base.Address, 0, len(monitorArray))
- for _, mon := range monitorArray {
- addrArray = append(addrArray, mon.Address)
- }
- logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
+ addrArray := make([]base.Address, 0, len(monitorArray))
+ for _, mon := range monitorArray {
+ addrArray = append(addrArray, mon.Address)
+ }
+ logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Transaction](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -47,100 +47,94 @@ func (opts *ExportOptions) HandleReceipts(rCtx *output.RenderCtx, monitorArray [
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Transaction)
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
- }
- return nil
+ iterFunc := func(app types.Appearance, value *types.Transaction) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ *value = *tx
}
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
}
+ }
- // Set up and interate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
+ // Set up and interate over the map calling iterFunc for each appearance
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- items := make([]*types.Receipt, 0, len(thisMap))
- for _, tx := range thisMap {
- if tx.Receipt == nil {
- continue
- }
- filteredLogs := make([]types.Log, 0, len(tx.Receipt.Logs))
- for _, log := range tx.Receipt.Logs {
- if filter.ApplyLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
- if opts.Articulate {
- if err := abiCache.ArticulateLog(&log); err != nil {
- errorChan <- fmt.Errorf("error articulating log: %v", err)
- }
+ items := make([]*types.Receipt, 0, len(thisMap))
+ for _, tx := range thisMap {
+ if tx.Receipt == nil {
+ continue
+ }
+ filteredLogs := make([]types.Log, 0, len(tx.Receipt.Logs))
+ for _, log := range tx.Receipt.Logs {
+ if filter.PassesLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
+ if opts.Articulate {
+ if err := abiCache.ArticulateLog(&log); err != nil {
+ errorChan <- fmt.Errorf("error articulating log: %v", err)
}
- filteredLogs = append(filteredLogs, log)
}
+ filteredLogs = append(filteredLogs, log)
}
- tx.Receipt.Logs = filteredLogs
- items = append(items, tx.Receipt)
}
+ tx.Receipt.Logs = filteredLogs
+ items = append(items, tx.Receipt)
+ }
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- return items[i].TransactionIndex < items[j].TransactionIndex
- }
- return items[i].BlockNumber < items[j].BlockNumber
- })
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- for _, item := range items {
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_show.go b/src/apps/chifra/internal/export/handle_show.go
index 7895237401..c9e80a7c4d 100644
--- a/src/apps/chifra/internal/export/handle_show.go
+++ b/src/apps/chifra/internal/export/handle_show.go
@@ -19,18 +19,18 @@ import (
)
func (opts *ExportOptions) HandleShow(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Transaction](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -39,93 +39,87 @@ func (opts *ExportOptions) HandleShow(rCtx *output.RenderCtx, monitorArray []mon
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Transaction)
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
- }
- return nil
+ iterFunc := func(app types.Appearance, value *types.Transaction) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ *value = *tx
+ }
+ if bar != nil {
+ bar.Tick()
}
+ return nil
}
+ }
- // Set up and interate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
+ // Set up and interate over the map calling iterFunc for each appearance
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- items := make([]*types.Transaction, 0, len(thisMap))
- for _, tx := range thisMap {
- if opts.Articulate {
- if err = abiCache.ArticulateTransaction(tx); err != nil {
- errorChan <- err // continue even on error
- }
+ items := make([]*types.Transaction, 0, len(thisMap))
+ for _, tx := range thisMap {
+ if opts.Articulate {
+ if err = abiCache.ArticulateTransaction(tx); err != nil {
+ errorChan <- err // continue even on error
}
- items = append(items, tx)
}
+ items = append(items, tx)
+ }
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- return items[i].TransactionIndex < items[j].TransactionIndex
- }
- return items[i].BlockNumber < items[j].BlockNumber
- })
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- for _, item := range items {
- if item.BlockHash.IsZero() {
- continue
- }
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ if item.BlockHash.IsZero() {
+ continue
+ }
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_statements.go b/src/apps/chifra/internal/export/handle_statements.go
index 4ab47ac452..5c7196f6d8 100644
--- a/src/apps/chifra/internal/export/handle_statements.go
+++ b/src/apps/chifra/internal/export/handle_statements.go
@@ -20,19 +20,19 @@ import (
)
func (opts *ExportOptions) HandleStatements(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
- assetFilters := make([]base.Address, 0, len(opts.Asset))
- for _, asset := range opts.Asset {
- assetFilters = append(assetFilters, base.HexToAddress(asset))
- }
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+ assetFilters := make([]base.Address, 0, len(opts.Asset))
+ for _, asset := range opts.Asset {
+ assetFilters = append(assetFilters, base.HexToAddress(asset))
+ }
+
for _, mon := range monitorArray {
ledgerOpts := &ledger.ReconcilerOptions{
AccountFor: mon.Address,
@@ -46,129 +46,124 @@ func (opts *ExportOptions) HandleStatements(rCtx *output.RenderCtx, monitorArray
}
recon := ledger.NewReconciler(opts.Conn, ledgerOpts)
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Transaction](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
} else if cnt == 0 {
errorChan <- fmt.Errorf("no blocks found for the query")
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Transaction)
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
- }
- return nil
+ iterFunc := func(app types.Appearance, value *types.Transaction) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ *value = *tx
+ }
+ if bar != nil {
+ bar.Tick()
}
+ return nil
}
+ }
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- txArray := make([]*types.Transaction, 0, len(thisMap))
- for _, tx := range thisMap {
- txArray = append(txArray, tx)
+ txArray := make([]*types.Transaction, 0, len(thisMap))
+ for _, tx := range thisMap {
+ txArray = append(txArray, tx)
+ }
+
+ sort.Slice(txArray, func(i, j int) bool {
+ if txArray[i].BlockNumber == txArray[j].BlockNumber {
+ return txArray[i].TransactionIndex < txArray[j].TransactionIndex
}
+ return txArray[i].BlockNumber < txArray[j].BlockNumber
+ })
- sort.Slice(txArray, func(i, j int) bool {
- if txArray[i].BlockNumber == txArray[j].BlockNumber {
- return txArray[i].TransactionIndex < txArray[j].TransactionIndex
- }
- return txArray[i].BlockNumber < txArray[j].BlockNumber
- })
-
- apps := make([]types.Appearance, 0, len(thisMap))
- for _, tx := range txArray {
- app := types.Appearance{
- BlockNumber: uint32(tx.BlockNumber),
- TransactionIndex: uint32(tx.TransactionIndex),
- }
- logger.TestLog(true, fmt.Sprintf("%d:", len(apps)), app.BlockNumber, app.TransactionIndex)
- apps = append(apps, app)
+ apps := make([]types.Appearance, 0, len(thisMap))
+ for _, tx := range txArray {
+ app := types.Appearance{
+ BlockNumber: uint32(tx.BlockNumber),
+ TransactionIndex: uint32(tx.TransactionIndex),
}
+ logger.TestLog(true, fmt.Sprintf("%d:", len(apps)), app.BlockNumber, app.TransactionIndex)
+ apps = append(apps, app)
+ }
- items := make([]types.Statement, 0, len(thisMap))
- list, err := types.NewAppListFromApps(apps, txArray)
- if err != nil {
+ items := make([]types.Statement, 0, len(thisMap))
+ list, err := types.NewAppListFromApps(apps, txArray)
+ if err != nil {
+ errorChan <- err
+ }
+ i := -1
+ for node := list.Head; node != nil; node = node.Next() {
+ i++
+ if statements, err := recon.GetStatements(node); err != nil {
errorChan <- err
+
+ } else if len(statements) > 0 {
+ items = append(items, statements...)
}
- i := -1
- for node := list.Head; node != nil; node = node.Next() {
- i++
- if statements, err := recon.GetStatements(node); err != nil {
- errorChan <- err
-
- } else if len(statements) > 0 {
- items = append(items, statements...)
- }
- }
+ }
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- if items[i].TransactionIndex == items[j].TransactionIndex {
- return items[i].LogIndex < items[j].LogIndex
- }
- return items[i].TransactionIndex < items[j].TransactionIndex
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].LogIndex < items[j].LogIndex
}
- return items[i].BlockNumber < items[j].BlockNumber
- })
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- for _, item := range items {
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- if opts.Globals.Ether {
- item.Symbol = "ETH"
- }
- modelChan <- &item
- }
- if finished {
- break
+ for _, item := range items {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ if opts.Globals.Ether {
+ item.Symbol = "ETH"
}
+ modelChan <- &item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_traces.go b/src/apps/chifra/internal/export/handle_traces.go
index e2a4f022c9..a562e87d2b 100644
--- a/src/apps/chifra/internal/export/handle_traces.go
+++ b/src/apps/chifra/internal/export/handle_traces.go
@@ -20,18 +20,18 @@ import (
)
func (opts *ExportOptions) HandleTraces(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ abiCache := articulate.NewAbiCache(opts.Conn, opts.Articulate)
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[[]*types.Trace](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -40,101 +40,96 @@ func (opts *ExportOptions) HandleTraces(rCtx *output.RenderCtx, monitorArray []m
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = &[]*types.Trace{}
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, true); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
+ iterFunc := func(app types.Appearance, value *[]*types.Trace) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, true); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ for index, trace := range tx.Traces {
+ trace.TraceIndex = base.Tracenum(index)
+ isCreate := trace.Action.CallType == "creation" || trace.TraceType == "create"
+ if !opts.Factory || isCreate {
+ if opts.Articulate {
+ if err := abiCache.ArticulateTrace(&trace); err != nil {
+ errorChan <- fmt.Errorf("error articulating trace: %v", err)
+ }
+ }
+ *value = append(*value, &trace)
+ }
}
- return nil
}
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
}
+ }
- // Set up and interate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- items := make([]*types.Trace, 0, len(thisMap))
- for _, tx := range thisMap {
- for index, trace := range tx.Traces {
- trace.TraceIndex = base.Tracenum(index)
- isCreate := trace.Action.CallType == "creation" || trace.TraceType == "create"
- if !opts.Factory || isCreate {
- if opts.Articulate {
- if err := abiCache.ArticulateTrace(&trace); err != nil {
- errorChan <- fmt.Errorf("error articulating trace: %v", err)
- }
- }
- items = append(items, &trace)
- }
- }
+ items := make([]*types.Trace, 0, len(thisMap)*2)
+ for _, traceSlice := range thisMap {
+ if traceSlice != nil && *traceSlice != nil {
+ items = append(items, *traceSlice...)
}
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- if items[i].TransactionIndex == items[j].TransactionIndex {
- return items[i].TraceIndex < items[j].TraceIndex
- }
- return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].TraceIndex < items[j].TraceIndex
}
- return items[i].BlockNumber < items[j].BlockNumber
- })
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- for _, item := range items {
- if item.BlockHash.IsZero() {
- continue
- }
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ if item.BlockHash.IsZero() {
+ continue
+ }
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_transfers.go b/src/apps/chifra/internal/export/handle_transfers.go
index 5a544e8dc9..bced4f4d86 100644
--- a/src/apps/chifra/internal/export/handle_transfers.go
+++ b/src/apps/chifra/internal/export/handle_transfers.go
@@ -20,19 +20,19 @@ import (
)
func (opts *ExportOptions) HandleTransfers(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- filter := types.NewFilter(
- opts.Reversed,
- opts.Reverted,
- opts.Fourbytes,
- ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
- ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
- )
- assetFilters := make([]base.Address, 0, len(opts.Asset))
- for _, asset := range opts.Asset {
- assetFilters = append(assetFilters, base.HexToAddress(asset))
- }
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ filter := types.NewFilter(
+ opts.Reversed,
+ opts.Reverted,
+ opts.Fourbytes,
+ ranges.BlockRange{First: opts.FirstBlock, Last: opts.LastBlock},
+ ranges.RecordRange{First: opts.FirstRecord, Last: opts.GetMax()},
+ )
+ assetFilters := make([]base.Address, 0, len(opts.Asset))
+ for _, asset := range opts.Asset {
+ assetFilters = append(assetFilters, base.HexToAddress(asset))
+ }
+
for _, mon := range monitorArray {
ledgerOpts := &ledger.ReconcilerOptions{
AccountFor: mon.Address,
@@ -46,7 +46,7 @@ func (opts *ExportOptions) HandleTransfers(rCtx *output.RenderCtx, monitorArray
}
recon := ledger.NewReconciler(opts.Conn, ledgerOpts)
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[types.Transaction](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -55,89 +55,83 @@ func (opts *ExportOptions) HandleTransfers(rCtx *output.RenderCtx, monitorArray
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.Transaction](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
-
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- if finished {
- continue
- }
+ if finished {
+ continue
+ }
- for app := range thisMap {
- thisMap[app] = new(types.Transaction)
- }
+ for app := range thisMap {
+ thisMap[app] = new(types.Transaction)
+ }
- iterFunc := func(app types.Appearance, value *types.Transaction) error {
- if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
- return err
- } else {
- passes, _ := filter.ApplyTxFilters(tx)
- if passes {
- *value = *tx
- }
- if bar != nil {
- bar.Tick()
- }
- return nil
+ iterFunc := func(app types.Appearance, value *types.Transaction) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes {
+ *value = *tx
}
+ if bar != nil {
+ bar.Tick()
+ }
+ return nil
}
+ }
- // Set up and iterate over the map calling iterFunc for each appearance
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- errChan := make(chan error)
- go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
- if stepErr := <-errChan; stepErr != nil {
- errorChan <- stepErr
- return
- }
-
- txArray := make([]*types.Transaction, 0, len(thisMap))
- for _, tx := range thisMap {
- txArray = append(txArray, tx)
- }
+ // Set up and iterate over the map calling iterFunc for each appearance
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
- sort.Slice(txArray, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if txArray[i].BlockNumber == txArray[j].BlockNumber {
- return txArray[i].TransactionIndex < txArray[j].TransactionIndex
- }
- return txArray[i].BlockNumber < txArray[j].BlockNumber
- })
+ txArray := make([]*types.Transaction, 0, len(thisMap))
+ for _, tx := range thisMap {
+ txArray = append(txArray, tx)
+ }
- items, done, err := recon.GetTransfers(txArray)
- if err != nil {
- errorChan <- err
- return
+ sort.Slice(txArray, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
}
-
- for _, item := range items {
- modelChan <- item
+ if txArray[i].BlockNumber == txArray[j].BlockNumber {
+ return txArray[i].TransactionIndex < txArray[j].TransactionIndex
}
+ return txArray[i].BlockNumber < txArray[j].BlockNumber
+ })
- if done {
- finished = true
- break
- }
+ items, done, err := recon.GetTransfers(txArray)
+ if err != nil {
+ errorChan <- err
+ return
+ }
+
+ for _, item := range items {
+ modelChan <- item
+ }
+
+ if done {
+ finished = true
+ break
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/handle_withdrawals.go b/src/apps/chifra/internal/export/handle_withdrawals.go
index 1b0ab2bb6b..64eea43236 100644
--- a/src/apps/chifra/internal/export/handle_withdrawals.go
+++ b/src/apps/chifra/internal/export/handle_withdrawals.go
@@ -19,21 +19,21 @@ import (
)
func (opts *ExportOptions) HandleWithdrawals(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error {
- chain := opts.Globals.Chain
- testMode := opts.Globals.TestMode
- nErrors := 0
- first := max(base.KnownBlock(chain, "shanghai"), opts.FirstBlock)
- filter := types.NewFilter(
- opts.Reversed,
- false,
- []string{},
- ranges.BlockRange{First: first, Last: opts.LastBlock},
- ranges.RecordRange{First: 0, Last: opts.GetMax()},
- )
-
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ chain := opts.Globals.Chain
+ testMode := opts.Globals.TestMode
+ nErrors := 0
+ first := max(base.KnownBlock(chain, "shanghai"), opts.FirstBlock)
+ filter := types.NewFilter(
+ opts.Reversed,
+ false,
+ []string{},
+ ranges.BlockRange{First: first, Last: opts.LastBlock},
+ ranges.RecordRange{First: 0, Last: opts.GetMax()},
+ )
+
for _, mon := range monitorArray {
- if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[[]types.Withdrawal](&mon, filter, filter.Reversed); err != nil {
errorChan <- err
rCtx.Cancel()
@@ -42,95 +42,85 @@ func (opts *ExportOptions) HandleWithdrawals(rCtx *output.RenderCtx, monitorArra
continue
} else {
- if sliceOfMaps, _, err := types.AsSliceOfMaps[types.LightBlock](apps, filter.Reversed); err != nil {
- errorChan <- err
- rCtx.Cancel()
-
- } else {
- showProgress := opts.Globals.ShowProgress()
- bar := logger.NewBar(logger.BarOptions{
- Prefix: mon.Address.Hex(),
- Enabled: showProgress,
- Total: int64(cnt),
- })
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
- finished := false
- for _, thisMap := range sliceOfMaps {
- if rCtx.WasCanceled() {
- return
- }
+ if finished {
+ continue
+ }
- if finished {
- continue
- }
+ for app := range thisMap {
+ thisMap[app] = &[]types.Withdrawal{}
+ }
- for app := range thisMap {
- thisMap[app] = new(types.LightBlock)
+ iterFunc := func(app types.Appearance, value *[]types.Withdrawal) error {
+ var block types.LightBlock
+ if block, err = opts.Conn.GetBlockHeaderByNumber(base.Blknum(app.BlockNumber)); err != nil {
+ return err
}
- iterFunc := func(app types.Appearance, value *types.LightBlock) error {
- var block types.LightBlock
- if block, err = opts.Conn.GetBlockHeaderByNumber(base.Blknum(app.BlockNumber)); err != nil {
- return err
+ for _, w := range block.Withdrawals {
+ if w.Address == mon.Address {
+ *value = append(*value, w)
}
+ }
- withdrawals := make([]types.Withdrawal, 0, 16)
- for _, w := range block.Withdrawals {
- if w.Address == mon.Address {
- withdrawals = append(withdrawals, w)
- }
- }
- if len(withdrawals) > 0 {
- block.Withdrawals = withdrawals
- *value = block
- }
+ bar.Tick()
+ return nil
+ }
- bar.Tick()
- return nil
+ iterErrorChan := make(chan error)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
+ for err := range iterErrorChan {
+ if !testMode || nErrors == 0 {
+ errorChan <- err
+ nErrors++
}
+ }
- iterErrorChan := make(chan error)
- iterCtx, iterCancel := context.WithCancel(context.Background())
- defer iterCancel()
- go utils.IterateOverMap(iterCtx, iterErrorChan, thisMap, iterFunc)
- for err := range iterErrorChan {
- if !testMode || nErrors == 0 {
- errorChan <- err
- nErrors++
+ items := make([]*types.Withdrawal, 0, len(thisMap)*2)
+ for _, withdrawalSlice := range thisMap {
+ if withdrawalSlice != nil && *withdrawalSlice != nil {
+ for _, w := range *withdrawalSlice {
+ items = append(items, &w)
}
}
+ }
- // Sort the items back into an ordered array by block number
- items := make([]*types.Withdrawal, 0, len(thisMap))
- for _, block := range thisMap {
- for _, with := range block.Withdrawals {
- items = append(items, &with)
- }
+ sort.Slice(items, func(i, j int) bool {
+ if opts.Reversed {
+ i, j = j, i
+ }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ return items[i].Index < items[j].Index
}
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
- sort.Slice(items, func(i, j int) bool {
- if opts.Reversed {
- i, j = j, i
- }
- if items[i].BlockNumber == items[j].BlockNumber {
- return items[i].Index < items[j].Index
- }
- return items[i].BlockNumber < items[j].BlockNumber
- })
-
- for _, item := range items {
- var passes bool
- passes, finished = filter.ApplyCountFilter()
- if passes {
- modelChan <- item
- }
- if finished {
- break
- }
+ for _, item := range items {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ modelChan <- item
+ }
+ if finished {
+ break
}
}
- bar.Finish(true /* newLine */)
}
+ bar.Finish(true /* newLine */)
}
}
}
diff --git a/src/apps/chifra/internal/export/options.go b/src/apps/chifra/internal/export/options.go
index 8a2baec6b3..881e3fa37b 100644
--- a/src/apps/chifra/internal/export/options.go
+++ b/src/apps/chifra/internal/export/options.go
@@ -34,6 +34,7 @@ type ExportOptions struct {
Appearances bool `json:"appearances,omitempty"` // Export a list of appearances
Receipts bool `json:"receipts,omitempty"` // Export receipts instead of transactional data
Logs bool `json:"logs,omitempty"` // Export logs instead of transactional data
+ Approvals bool `json:"approvals,omitempty"` // Export all token approval transactions for the given address
Traces bool `json:"traces,omitempty"` // Export traces instead of transactional data
Neighbors bool `json:"neighbors,omitempty"` // Export the neighbors of the given address
Statements bool `json:"statements,omitempty"` // Export only statements
@@ -80,6 +81,7 @@ func (opts *ExportOptions) testLog() {
logger.TestLog(opts.Appearances, "Appearances: ", opts.Appearances)
logger.TestLog(opts.Receipts, "Receipts: ", opts.Receipts)
logger.TestLog(opts.Logs, "Logs: ", opts.Logs)
+ logger.TestLog(opts.Approvals, "Approvals: ", opts.Approvals)
logger.TestLog(opts.Traces, "Traces: ", opts.Traces)
logger.TestLog(opts.Neighbors, "Neighbors: ", opts.Neighbors)
logger.TestLog(opts.Statements, "Statements: ", opts.Statements)
@@ -154,6 +156,8 @@ func ExportFinishParseInternal(w io.Writer, values url.Values) *ExportOptions {
opts.Receipts = true
case "logs":
opts.Logs = true
+ case "approvals":
+ opts.Approvals = true
case "traces":
opts.Traces = true
case "neighbors":
diff --git a/src/apps/chifra/internal/export/output.go b/src/apps/chifra/internal/export/output.go
index 13acb7337a..31efb21f21 100644
--- a/src/apps/chifra/internal/export/output.go
+++ b/src/apps/chifra/internal/export/output.go
@@ -84,6 +84,8 @@ func (opts *ExportOptions) ExportInternal(rCtx *output.RenderCtx) error {
err = opts.HandleTransfers(rCtx, monitorArray)
} else if opts.Traces {
err = opts.HandleTraces(rCtx, monitorArray)
+ } else if opts.Approvals {
+ err = opts.HandleApprovals(rCtx, monitorArray)
} else {
err = opts.HandleShow(rCtx, monitorArray)
}
diff --git a/src/apps/chifra/internal/export/validate.go b/src/apps/chifra/internal/export/validate.go
index fb76d24dc2..b4a1633df0 100644
--- a/src/apps/chifra/internal/export/validate.go
+++ b/src/apps/chifra/internal/export/validate.go
@@ -104,13 +104,17 @@ func (opts *ExportOptions) validateExport() error {
}
}
- if opts.Logs {
+ if opts.Approvals && (len(opts.Fourbytes) > 0 || len(opts.Topic) > 0 || len(opts.Topics) > 0) {
+ return validate.Usage("The {0} option is not permitted with {1}.", "--approvals", "four bytes or topics")
+ }
+
+ if opts.Logs || opts.Approvals {
for _, e := range opts.Emitter {
if !base.IsValidAddress(e) {
return validate.Usage("Invalid emitter: {0}", e)
}
}
- for _, t := range opts.Topics {
+ for _, t := range opts.Topics { // not sure why there's two of them!
if !validate.IsValidHash(t) {
return validate.Usage("Invalid topic: {0}", t)
}
@@ -234,6 +238,10 @@ func (opts *ExportOptions) tooMany() ([]string, bool) {
which = append(which, "--logs")
cnt++
}
+ if opts.Approvals {
+ which = append(which, "--approvals")
+ cnt++
+ }
if opts.Traces {
which = append(which, "--traces")
cnt++
diff --git a/src/apps/chifra/internal/tokens/README.md b/src/apps/chifra/internal/tokens/README.md
index e2744265f6..26be43f207 100644
--- a/src/apps/chifra/internal/tokens/README.md
+++ b/src/apps/chifra/internal/tokens/README.md
@@ -22,10 +22,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -44,10 +45,12 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
```
Data models produced by this tool:
+- [approval](/data-model/accounts/#approval)
- [token](/data-model/chainstate/#token)
### Other Options
diff --git a/src/apps/chifra/internal/tokens/handle_approvals.go b/src/apps/chifra/internal/tokens/handle_approvals.go
new file mode 100644
index 0000000000..5db35a0def
--- /dev/null
+++ b/src/apps/chifra/internal/tokens/handle_approvals.go
@@ -0,0 +1,323 @@
+// Copyright 2021 The TrueBlocks Authors. All rights reserved.
+// Use of this source code is governed by a license that can
+// be found in the LICENSE file.
+
+package tokensPkg
+
+import (
+ "context"
+ "fmt"
+ "sort"
+
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/logger"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/monitor"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/ranges"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/rpc"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/rpc/query"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/topics"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/types"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/utils"
+)
+
+const maxTestingBlock = 14000000
+
+// approvalKey represents a unique approval event
+type approvalKey struct {
+ Owner base.Address
+ Spender base.Address
+ Token base.Address
+}
+
+// approvalInfo represents information about an approval event
+type approvalInfo struct {
+ Allowance *base.Wei
+ LastTs base.Timestamp
+ LastBlock base.Blknum
+ LastTxId base.Txnum
+ LastLogId base.Lognum
+}
+
+// approvalMap maps approval keys to their info
+type approvalMap map[approvalKey]approvalInfo
+
+func (opts *TokensOptions) HandleApprovals(rCtx *output.RenderCtx) error {
+ chain := opts.Globals.Chain
+ var firstBlock base.Blknum = 0
+ var lastBlock = opts.Conn.GetLatestBlockNumber()
+
+ if len(opts.BlockIds) > 0 && opts.BlockIds[0].End.Number != 0 {
+ firstBlockNums, err := opts.BlockIds[0].ResolveBlocks(chain)
+ if err != nil {
+ return err
+ }
+ lastBlockNums, err := opts.BlockIds[len(opts.BlockIds)-1].ResolveBlocks(chain)
+ if err != nil {
+ return err
+ }
+ firstBlock = firstBlockNums[0]
+ lastBlock = lastBlockNums[len(lastBlockNums)-1]
+ }
+
+ if base.IsTestMode() {
+ lastBlock = min(lastBlock, maxTestingBlock)
+ firstBlock = min(firstBlock, lastBlock-1)
+ }
+
+ block, _ := opts.Conn.GetBlockHeaderByNumber(lastBlock)
+ lastTs := block.Timestamp
+
+ approvals := make(approvalMap)
+
+ fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
+ chain := opts.Globals.Chain
+ filter := types.NewFilter(
+ false,
+ false,
+ []string{},
+ ranges.BlockRange{First: firstBlock, Last: lastBlock},
+ ranges.RecordRange{First: 0, Last: base.NOPOS},
+ )
+
+ monitorArray := make([]monitor.Monitor, 0, len(opts.Addrs))
+ for _, addr := range opts.Addrs {
+ if mon, err := monitor.NewMonitor(chain, base.HexToAddress(addr), false); err != nil {
+ errorChan <- err
+ rCtx.Cancel()
+ return
+ } else {
+ _ = mon.ReadMonitorHeader() // so we know how many appearances there are
+ defer mon.Close()
+ monitorArray = append(monitorArray, mon)
+ }
+ }
+
+ addrArray := make([]base.Address, 0, len(monitorArray))
+ for _, mon := range monitorArray {
+ addrArray = append(addrArray, mon.Address)
+ }
+ logFilter := rpc.NewLogFilter([]string{}, []string{topics.ApprovalTopic.Hex()})
+
+ reportedCnt := 0
+ for _, mon := range monitorArray {
+ if sliceOfMaps, cnt, err := monitor.AsSliceOfItemMaps[[]*types.Log](&mon, filter, filter.Reversed); err != nil {
+ errorChan <- err
+ rCtx.Cancel()
+
+ } else if cnt == 0 {
+ errorChan <- fmt.Errorf("no blocks found for the query")
+ continue
+
+ } else {
+ showProgress := opts.Globals.ShowProgress()
+ bar := logger.NewBar(logger.BarOptions{
+ Prefix: mon.Address.Hex(),
+ Enabled: showProgress,
+ Total: int64(cnt),
+ })
+
+ finished := false
+ for _, thisMap := range sliceOfMaps {
+ if rCtx.WasCanceled() {
+ return
+ }
+
+ if finished {
+ continue
+ }
+
+ for app := range thisMap {
+ thisMap[app] = &[]*types.Log{}
+ }
+
+ iterFunc := func(app types.Appearance, value *[]*types.Log) error {
+ if tx, err := opts.Conn.GetTransactionByAppearance(&app, false); err != nil {
+ return err
+ } else {
+ passes := filter.PassesTxFilter(tx)
+ if passes && tx.Receipt != nil {
+ for _, log := range tx.Receipt.Logs {
+ if filter.PassesLogFilter(&log, addrArray) && logFilter.PassesFilter(&log) {
+ *value = append(*value, &log)
+ }
+ }
+ }
+ return nil
+ }
+ }
+
+ // Set up and iterate over the map calling iterFunc for each appearance (PARALLEL)
+ iterCtx, iterCancel := context.WithCancel(context.Background())
+ defer iterCancel()
+ errChan := make(chan error)
+ go utils.IterateOverMap(iterCtx, errChan, thisMap, iterFunc)
+ if stepErr := <-errChan; stepErr != nil {
+ errorChan <- stepErr
+ return
+ }
+
+ // Now safely collect all logs from all log slices
+ items := make([]*types.Log, 0)
+ for _, logSlice := range thisMap {
+ if logSlice != nil && *logSlice != nil {
+ items = append(items, *logSlice...)
+ }
+ }
+
+ sort.Slice(items, func(i, j int) bool {
+ // if false { // opts.Reversed {
+ // i, j = j, i
+ // }
+ if items[i].BlockNumber == items[j].BlockNumber {
+ if items[i].TransactionIndex == items[j].TransactionIndex {
+ return items[i].LogIndex < items[j].LogIndex
+ }
+ return items[i].TransactionIndex < items[j].TransactionIndex
+ }
+ return items[i].BlockNumber < items[j].BlockNumber
+ })
+
+ for _, item := range items {
+ var passes bool
+ passes, finished = filter.PassesCountFilter()
+ if passes {
+ ownerAddr := base.HexToAddress(item.Topics[1].Hex())
+ spenderAddr := base.HexToAddress(item.Topics[2].Hex())
+ tokenAddr := item.Address
+ currentAllowance, err := opts.getAllowanceAtBlock(tokenAddr, ownerAddr, spenderAddr, lastBlock)
+ if err != nil {
+ errChan <- err
+ continue
+ } else if currentAllowance == nil {
+ continue
+ } else if opts.NoZero && currentAllowance.IsZero() {
+ continue
+ }
+ key := approvalKey{
+ Owner: ownerAddr,
+ Spender: spenderAddr,
+ Token: tokenAddr,
+ }
+
+ // Check if the key exists and if the new item is later
+ existingInfo, ok := approvals[key]
+ isLater := false
+ if !ok {
+ isLater = true
+ } else {
+ if item.BlockNumber > existingInfo.LastBlock {
+ isLater = true
+ } else if item.BlockNumber == existingInfo.LastBlock {
+ if item.TransactionIndex > existingInfo.LastTxId {
+ isLater = true
+ } else if item.TransactionIndex == existingInfo.LastTxId {
+ if item.LogIndex > existingInfo.LastLogId {
+ isLater = true
+ }
+ }
+ }
+ }
+
+ if isLater {
+ approvals[key] = approvalInfo{
+ Allowance: currentAllowance,
+ LastTs: item.Timestamp,
+ LastBlock: item.BlockNumber,
+ LastTxId: item.TransactionIndex,
+ LastLogId: item.LogIndex,
+ }
+ }
+ if bar != nil && showProgress {
+ bar.Tick()
+ } else {
+ reportedCnt++
+ logger.Progress(reportedCnt%5 == 0, "Found:", ownerAddr.Hex(), "-->", spenderAddr.Hex())
+ }
+ }
+ if finished {
+ break
+ }
+ }
+ }
+ bar.Finish(true /* newLine */)
+ }
+
+ apps := make([]approvalKey, 0, len(approvals))
+ for key := range approvals {
+ apps = append(apps, key)
+ }
+
+ sort.Slice(apps, func(i, j int) bool {
+ if apps[i].Token == apps[j].Token {
+ if apps[i].Spender == apps[j].Spender {
+ if apps[i].Owner == apps[j].Owner {
+ return approvals[apps[i]].LastBlock < approvals[apps[j]].LastBlock
+ }
+ return apps[i].Owner.LessThan(apps[j].Owner)
+ }
+ return apps[i].Spender.LessThan(apps[j].Spender)
+ }
+ return apps[i].Token.LessThan(apps[j].Token)
+ })
+
+ for _, key := range apps {
+ modelChan <- &types.Approval{
+ Owner: key.Owner,
+ Spender: key.Spender,
+ Token: key.Token,
+ Allowance: *approvals[key].Allowance,
+ BlockNumber: lastBlock,
+ Timestamp: lastTs,
+ LastAppBlock: approvals[key].LastBlock,
+ LastAppTs: approvals[key].LastTs,
+ LastAppLogID: approvals[key].LastLogId,
+ LastAppTxID: approvals[key].LastTxId,
+ }
+ }
+ }
+ }
+
+ extraOpts := map[string]any{
+ "loadNames": true,
+ }
+
+ return output.StreamMany(rCtx, fetchData, opts.Globals.OutputOptsWithExtra(extraOpts))
+}
+
+func (opts *TokensOptions) getAllowanceAtBlock(tokenAddr, owner, spender base.Address, blockNum base.Blknum) (*base.Wei, error) {
+ funcSig := "0xdd62ed3e"
+ data := funcSig + owner.Pad32() + spender.Pad32()
+
+ var blockParam string
+ if blockNum == 0 {
+ blockParam = "latest"
+ } else {
+ blockParam = fmt.Sprintf("0x%x", blockNum)
+ }
+
+ payloads := []query.BatchPayload{{
+ Key: "allowance",
+ Payload: &query.Payload{
+ Method: "eth_call",
+ Params: query.Params{
+ map[string]any{
+ "to": tokenAddr.Hex(),
+ "data": data,
+ },
+ blockParam,
+ },
+ },
+ }}
+ output, err := query.QueryBatch[string](opts.Conn.Chain, payloads)
+ if err != nil {
+ return base.NewWei(0), err
+ }
+ var allowance *base.Wei
+ if output["allowance"] == nil {
+ allowance = base.NewWei(0)
+ } else {
+ allowance = base.HexToWei(*output["allowance"])
+ }
+ return allowance, nil
+}
diff --git a/src/apps/chifra/internal/tokens/options.go b/src/apps/chifra/internal/tokens/options.go
index 8934dfaebb..a81f0dc33c 100644
--- a/src/apps/chifra/internal/tokens/options.go
+++ b/src/apps/chifra/internal/tokens/options.go
@@ -29,16 +29,17 @@ import (
// TokensOptions provides all command options for the chifra tokens command.
type TokensOptions struct {
- Addrs []string `json:"addrs,omitempty"` // Two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported
- Blocks []string `json:"blocks,omitempty"` // An optional list of one or more blocks at which to report balances, defaults to 'latest'
- BlockIds []identifiers.Identifier `json:"blockIds,omitempty"` // Block identifiers
- Parts []string `json:"parts,omitempty"` // Which parts of the token information to retrieve
- ByAcct bool `json:"byAcct,omitempty"` // Consider each address an ERC20 token except the last, whose balance is reported for each token
- Changes bool `json:"changes,omitempty"` // Only report a balance when it changes from one block to the next
- NoZero bool `json:"noZero,omitempty"` // Suppress the display of zero balance accounts
- Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options
- Conn *rpc.Connection `json:"conn,omitempty"` // The connection to the RPC server
- BadFlag error `json:"badFlag,omitempty"` // An error flag if needed
+ Addrs []string `json:"addrs,omitempty"` // Two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported
+ Blocks []string `json:"blocks,omitempty"` // An optional list of one or more blocks at which to report balances, defaults to 'latest'
+ BlockIds []identifiers.Identifier `json:"blockIds,omitempty"` // Block identifiers
+ Approvals bool `json:"approvals,omitempty"` // Returns all open approvals for the given address(es)
+ Parts []string `json:"parts,omitempty"` // Which parts of the token information to retrieve
+ ByAcct bool `json:"byAcct,omitempty"` // Consider each address an ERC20 token except the last, whose balance is reported for each token
+ Changes bool `json:"changes,omitempty"` // Only report a balance when it changes from one block to the next
+ NoZero bool `json:"noZero,omitempty"` // Suppress the display of zero balance accounts
+ Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options
+ Conn *rpc.Connection `json:"conn,omitempty"` // The connection to the RPC server
+ BadFlag error `json:"badFlag,omitempty"` // An error flag if needed
// EXISTING_CODE
// EXISTING_CODE
}
@@ -49,6 +50,7 @@ var defaultTokensOptions = TokensOptions{}
func (opts *TokensOptions) testLog() {
logger.TestLog(len(opts.Addrs) > 0, "Addrs: ", opts.Addrs)
logger.TestLog(len(opts.Blocks) > 0, "Blocks: ", opts.Blocks)
+ logger.TestLog(opts.Approvals, "Approvals: ", opts.Approvals)
logger.TestLog(len(opts.Parts) > 0, "Parts: ", opts.Parts)
logger.TestLog(opts.ByAcct, "ByAcct: ", opts.ByAcct)
logger.TestLog(opts.Changes, "Changes: ", opts.Changes)
@@ -88,6 +90,8 @@ func TokensFinishParseInternal(w io.Writer, values url.Values) *TokensOptions {
s := strings.Split(val, " ") // may contain space separated items
opts.Blocks = append(opts.Blocks, s...)
}
+ case "approvals":
+ opts.Approvals = true
case "parts":
for _, val := range value {
s := strings.Split(val, " ") // may contain space separated items
@@ -216,7 +220,8 @@ func ResetOptions(testMode bool) {
func (opts *TokensOptions) getCaches() (caches map[walk.CacheType]bool) {
// EXISTING_CODE
caches = map[walk.CacheType]bool{
- walk.Cache_Tokens: true,
+ walk.Cache_Tokens: true,
+ walk.Cache_Transactions: opts.Approvals,
}
// EXISTING_CODE
return
diff --git a/src/apps/chifra/internal/tokens/output.go b/src/apps/chifra/internal/tokens/output.go
index 859ed884da..6ec386fe48 100644
--- a/src/apps/chifra/internal/tokens/output.go
+++ b/src/apps/chifra/internal/tokens/output.go
@@ -57,6 +57,8 @@ func (opts *TokensOptions) TokensInternal(rCtx *output.RenderCtx) error {
// EXISTING_CODE
if opts.Globals.Decache {
err = opts.HandleDecache(rCtx)
+ } else if opts.Approvals {
+ err = opts.HandleApprovals(rCtx)
} else if len(opts.Parts) > 0 {
err = opts.HandleParts(rCtx)
} else {
diff --git a/src/apps/chifra/internal/tokens/validate.go b/src/apps/chifra/internal/tokens/validate.go
index ec1ca12b97..36e3b27e69 100644
--- a/src/apps/chifra/internal/tokens/validate.go
+++ b/src/apps/chifra/internal/tokens/validate.go
@@ -6,9 +6,12 @@ package tokensPkg
import (
"errors"
+ "path/filepath"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/config"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/file"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/monitor"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/rpc"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/validate"
)
@@ -35,17 +38,46 @@ func (opts *TokensOptions) validateTokens() error {
return validate.Usage("The {0} option is not yet implemented.", "--changes")
}
- if len(opts.Addrs) == 0 {
- return validate.Usage("You must specify at least two address")
-
- } else {
+ if opts.Approvals {
if opts.ByAcct {
- if len(opts.Addrs) < 2 {
- return validate.Usage("You must specify at least two addresses")
+ return validate.Usage("The {0} option is not allowed with {1}.", "--by_acct", "--approvals")
+ }
+
+ if len(opts.Addrs) == 0 {
+ return validate.Usage("You must specify at least one address")
+ }
+
+ for _, addr := range opts.Addrs {
+ path := filepath.Join(config.PathToCache(opts.Globals.Chain), "monitors", addr+monitor.Ext)
+ if !file.FileExists(path) {
+ return validate.Usage("Run `chifra list {1}` before querying approvals.", addr, addr)
}
+ }
- // all but the last is assumed to be a token
- for _, addr := range opts.Addrs[:len(opts.Addrs)-1] {
+ } else {
+ if len(opts.Addrs) == 0 {
+ return validate.Usage("You must specify at least two address")
+
+ } else {
+ if opts.ByAcct {
+ if len(opts.Addrs) < 2 {
+ return validate.Usage("You must specify at least two addresses")
+ }
+
+ // all but the last is assumed to be a token
+ for _, addr := range opts.Addrs[:len(opts.Addrs)-1] {
+ if addr != base.FAKE_ETH_ADDRESS.Hex() {
+ err := opts.Conn.IsContractAtLatest(base.HexToAddress(addr))
+ if err != nil {
+ if errors.Is(err, rpc.ErrNotAContract) {
+ return validate.Usage("The value {0} is not a token contract.", addr)
+ }
+ return err
+ }
+ }
+ }
+ } else {
+ addr := opts.Addrs[0]
if addr != base.FAKE_ETH_ADDRESS.Hex() {
err := opts.Conn.IsContractAtLatest(base.HexToAddress(addr))
if err != nil {
@@ -56,18 +88,6 @@ func (opts *TokensOptions) validateTokens() error {
}
}
}
- } else {
- // the first is assumed to be a smart contract, the rest can be either non-existent, another smart contract or an EOA
- addr := opts.Addrs[0]
- if addr != base.FAKE_ETH_ADDRESS.Hex() {
- err := opts.Conn.IsContractAtLatest(base.HexToAddress(addr))
- if err != nil {
- if errors.Is(err, rpc.ErrNotAContract) {
- return validate.Usage("The value {0} is not a token contract.", addr)
- }
- return err
- }
- }
}
}
diff --git a/src/apps/chifra/internal/traces/README.md b/src/apps/chifra/internal/traces/README.md
index 560d6c4422..526fedf47b 100644
--- a/src/apps/chifra/internal/traces/README.md
+++ b/src/apps/chifra/internal/traces/README.md
@@ -53,7 +53,7 @@ Data models produced by this tool:
The `--traces` option requires your node to enable the `trace_block` (and related) RPC endpoints. Many remote RPC providers do not enable these endpoints due to the additional load they can place on the node. If you are running your own node, you can enable these endpoints by adding `trace` to your node's startup.
-The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following enviroment variable before running the command to instruct `chifra` where to test.
+The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following environment variable before running the command to instruct `chifra` where to test.
```[bash]
export TB__FIRSTTRACE=
diff --git a/src/apps/chifra/pkg/ledger/get_assets.go b/src/apps/chifra/pkg/ledger/get_assets.go
index 9814d3b56f..bfa49678b7 100644
--- a/src/apps/chifra/pkg/ledger/get_assets.go
+++ b/src/apps/chifra/pkg/ledger/get_assets.go
@@ -40,7 +40,7 @@ func (r *Reconciler) GetAssets(txs []*types.Transaction) ([]*types.Name, bool, e
results := make([]*types.Name, 0, len(slice))
for _, item := range slice {
var passes bool
- passes, finished = r.Opts.AppFilters.ApplyCountFilter()
+ passes, finished = r.Opts.AppFilters.PassesCountFilter()
if passes {
results = append(results, item)
}
diff --git a/src/apps/chifra/pkg/ledger/get_transfers.go b/src/apps/chifra/pkg/ledger/get_transfers.go
index 4ed34cf747..43cf58abe3 100644
--- a/src/apps/chifra/pkg/ledger/get_transfers.go
+++ b/src/apps/chifra/pkg/ledger/get_transfers.go
@@ -31,7 +31,7 @@ func (r *Reconciler) GetTransfers(txs []*types.Transaction) ([]*types.Transfer,
slice := make([]*types.Transfer, 0, len(transfers))
for _, item := range transfers {
var passes bool
- passes, finished = r.Opts.AppFilters.ApplyCountFilter()
+ passes, finished = r.Opts.AppFilters.PassesCountFilter()
if passes {
slice = append(slice, item)
}
diff --git a/src/apps/chifra/pkg/monitor/filter.go b/src/apps/chifra/pkg/monitor/filter.go
index 020a791255..55fe7946a0 100644
--- a/src/apps/chifra/pkg/monitor/filter.go
+++ b/src/apps/chifra/pkg/monitor/filter.go
@@ -63,9 +63,9 @@ func (mon *Monitor) ReadAndFilterAppearances(filt *types.AppearanceFilter, withC
var passes bool
var finished bool
if withCount {
- passes, finished = filt.ApplyFilter(&app)
+ passes, finished = filt.PassesFilter(&app)
} else {
- passes, finished = filt.ApplyRangeFilter(&app)
+ passes, finished = filt.PassesRangeFilter(&app)
}
if finished {
@@ -89,3 +89,23 @@ func (mon *Monitor) ReadAndFilterAppearances(filt *types.AppearanceFilter, withC
return apps, len(apps), nil
}
+
+// AsSliceOfItemMaps reads appearances from the monitor and returns them as batched maps
+// ready for transaction processing
+func AsSliceOfItemMaps[T types.MappedType](mon *Monitor, filter *types.AppearanceFilter, reversed bool) ([]map[types.Appearance]*T, int, error) {
+ apps, cnt, err := mon.ReadAndFilterAppearances(filter, false)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ if cnt == 0 {
+ return nil, 0, nil
+ }
+
+ sliceOfMaps, _, err := types.AsSliceOfMaps[T](apps, reversed)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ return sliceOfMaps, cnt, nil
+}
diff --git a/src/apps/chifra/pkg/monitor/monitor_freshen.go b/src/apps/chifra/pkg/monitor/monitor_freshen.go
index 1aa58e9e04..173dd3b896 100644
--- a/src/apps/chifra/pkg/monitor/monitor_freshen.go
+++ b/src/apps/chifra/pkg/monitor/monitor_freshen.go
@@ -371,14 +371,10 @@ func needsMigration(addr string) error {
// TODO: Somewhat iffy code here
const (
- asciiAddressSize = 42
- asciiBlockNumSize = 9
- asciiTxIdSize = 5
- asciiAppearanceSize = 59
- startOfBlockNum = 42 + 1
- endOfBlockNum = 42 + 1 + 9
- startOfTxId = 42 + 1 + 9 + 1
- endOfTxId = 42 + 1 + 9 + 1 + 5
+ startOfBlockNum = 42 + 1
+ endOfBlockNum = 42 + 1 + 9
+ startOfTxId = 42 + 1 + 9 + 1
+ endOfTxId = 42 + 1 + 9 + 1 + 5
)
func getAppearances(addrStr string, lines []string, lastVisited uint32, found int) *[]types.AppRecord {
diff --git a/src/apps/chifra/pkg/topics/topics.go b/src/apps/chifra/pkg/topics/topics.go
index c768721fd3..7f6566ceef 100644
--- a/src/apps/chifra/pkg/topics/topics.go
+++ b/src/apps/chifra/pkg/topics/topics.go
@@ -14,6 +14,8 @@ var EnsTransferTopic = base.HexToHash(
"0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266",
)
+var ApprovalFourbyte = base.HexToHash("0x095ea7b3")
+
var KnownTopics = map[base.Hash]bool{
TransferTopic: true,
ApprovalTopic: true,
diff --git a/src/apps/chifra/pkg/types/filter.go b/src/apps/chifra/pkg/types/filter.go
index ffc6e8a4dd..01fd7f4e25 100644
--- a/src/apps/chifra/pkg/types/filter.go
+++ b/src/apps/chifra/pkg/types/filter.go
@@ -5,12 +5,21 @@
package types
import (
+ "sort"
"strings"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/ranges"
)
+type AppearanceSort int
+
+const (
+ NotSorted AppearanceSort = iota
+ Sorted
+ Reversed
+)
+
type AppearanceFilter struct {
OuterBounds ranges.BlockRange
sortBy AppearanceSort
@@ -66,23 +75,24 @@ func (f *AppearanceFilter) GetOuterBounds() ranges.BlockRange {
return f.OuterBounds
}
-// ApplyFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)
-func (f *AppearanceFilter) ApplyFilter(app *AppRecord) (passed, finished bool) {
+// PassesFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)
+func (f *AppearanceFilter) PassesFilter(app *AppRecord) (passed, finished bool) {
appRange := ranges.FileRange{First: base.Blknum(app.BlockNumber), Last: base.Blknum(app.BlockNumber)} // --first_block/--last_block
if !appRange.Intersects(ranges.FileRange(f.exportRange)) {
return false, false
}
- return f.ApplyCountFilter()
+ return f.PassesCountFilter()
}
-// ApplyRangeFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)
-func (f *AppearanceFilter) ApplyRangeFilter(app *AppRecord) (passed, finished bool) {
+// PassesRangeFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)
+func (f *AppearanceFilter) PassesRangeFilter(app *AppRecord) (passed, finished bool) {
appRange := ranges.FileRange{First: base.Blknum(app.BlockNumber), Last: base.Blknum(app.BlockNumber)} // --first_block/--last_block
return appRange.Intersects(ranges.FileRange(f.exportRange)), false
}
-// ApplyCountFilter checks to see if the appearance is at or later than the --first_record and less than (because it's zero-based) --max_records.
-func (f *AppearanceFilter) ApplyCountFilter() (passed, finished bool) {
+// PassesCountFilter checks to see if the appearance is at or later than
+// the --first_record and less than (because it's zero-based) --max_records.
+func (f *AppearanceFilter) PassesCountFilter() (passed, finished bool) {
f.nSeen++
if f.nSeen < int64(f.recordRange.First) { // --first_record
@@ -97,32 +107,46 @@ func (f *AppearanceFilter) ApplyCountFilter() (passed, finished bool) {
return true, false
}
-// ApplyTxFilters applies other filters such as the four byte and reverted filters.
-func (f *AppearanceFilter) ApplyTxFilters(tx *Transaction) (passed, finished bool) {
- matchesReverted := !f.reverted || tx.IsError
- matchesFourbyte := len(f.fourBytes) == 0
+// PassesTxFilter applies the four byte and reverted filters.
+func (f *AppearanceFilter) PassesTxFilter(tx *Transaction) bool {
+ // We're looking for reverted txs. This one isn't, so fail.
+ if f.reverted && !tx.IsError {
+ return false
+ }
+
+ // We're not filtering by four byte, so pass it.
+ if len(f.fourBytes) == 0 {
+ return true
+ }
+
for _, fourBytes := range f.fourBytes {
if strings.HasPrefix(tx.Input, fourBytes) {
- matchesFourbyte = true
- break
+ return true
}
}
- // fmt.Println("len:", len(f.fourBytes), "matchesFourbyte", matchesFourbyte, "matchesReverted", matchesReverted)
- return matchesFourbyte && matchesReverted, false
-}
-func (f *AppearanceFilter) ApplyLogFilter(log *Log, addrArray []base.Address) bool {
- haystack := make([]byte, 66*len(log.Topics)+len(log.Data))
- haystack = append(haystack, log.Address.Hex()[2:]...)
- for _, topic := range log.Topics {
- haystack = append(haystack, topic.Hex()[2:]...)
- }
- haystack = append(haystack, log.Data[2:]...)
+ return false
+}
+func (f *AppearanceFilter) PassesLogFilter(log *Log, addrArray []base.Address) bool {
+ haystack := log.Log2Haystack()
for _, addr := range addrArray {
- if strings.Contains(string(haystack), addr.Hex()[2:]) {
+ if strings.Contains(haystack, addr.Hex()[2:]) {
return true
}
}
return false
}
+
+func (f *AppearanceFilter) Sort(fromDisc []AppRecord) {
+ if f.sortBy == Sorted || f.sortBy == Reversed {
+ sort.Slice(fromDisc, func(i, j int) bool {
+ if f.sortBy == Reversed {
+ i, j = j, i
+ }
+ si := (base.Blknum(fromDisc[i].BlockNumber) << 32) + base.Blknum(fromDisc[i].TransactionIndex)
+ sj := (base.Blknum(fromDisc[j].BlockNumber) << 32) + base.Blknum(fromDisc[j].TransactionIndex)
+ return si < sj
+ })
+ }
+}
diff --git a/src/apps/chifra/pkg/types/filter_sort.go b/src/apps/chifra/pkg/types/filter_sort.go
deleted file mode 100644
index 193b088225..0000000000
--- a/src/apps/chifra/pkg/types/filter_sort.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package types
-
-import (
- "sort"
-
- "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
-)
-
-type AppearanceSort int
-
-const (
- NotSorted AppearanceSort = iota
- Sorted
- Reversed
-)
-
-func (f *AppearanceFilter) Sort(fromDisc []AppRecord) {
- if f.sortBy == Sorted || f.sortBy == Reversed {
- sort.Slice(fromDisc, func(i, j int) bool {
- if f.sortBy == Reversed {
- i, j = j, i
- }
- si := (base.Blknum(fromDisc[i].BlockNumber) << 32) + base.Blknum(fromDisc[i].TransactionIndex)
- sj := (base.Blknum(fromDisc[j].BlockNumber) << 32) + base.Blknum(fromDisc[j].TransactionIndex)
- return si < sj
- })
- }
-}
diff --git a/src/apps/chifra/pkg/types/filter_test.go b/src/apps/chifra/pkg/types/filter_test.go
new file mode 100644
index 0000000000..5a922df451
--- /dev/null
+++ b/src/apps/chifra/pkg/types/filter_test.go
@@ -0,0 +1,198 @@
+package types
+
+import (
+ "testing"
+
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/ranges"
+)
+
+func TestNewFilter(t *testing.T) {
+ filter := NewFilter(
+ true, // reversed
+ false, // reverted
+ []string{"0x1234"},
+ ranges.BlockRange{First: 100, Last: 200},
+ ranges.RecordRange{First: 10, Last: 50},
+ )
+
+ if !filter.Reversed {
+ t.Error("Expected Reversed to be true")
+ }
+ if filter.reverted {
+ t.Error("Expected reverted to be false")
+ }
+ if len(filter.fourBytes) != 1 || filter.fourBytes[0] != "0x1234" {
+ t.Error("Expected fourBytes to contain '0x1234'")
+ }
+ if filter.nSeen != -1 {
+ t.Error("Expected nSeen to be initialized to -1")
+ }
+}
+
+func TestPassesCountFilter(t *testing.T) {
+ filter := NewFilter(false, false, []string{}, ranges.BlockRange{}, ranges.RecordRange{First: 2, Last: 5})
+
+ // First call: nSeen goes from -1 to 0, below first (2)
+ passed, finished := filter.PassesCountFilter()
+ if passed || finished {
+ t.Error("Expected first call to fail (below first record)")
+ }
+
+ // Second call: nSeen = 1, still below first (2)
+ passed, finished = filter.PassesCountFilter()
+ if passed || finished {
+ t.Error("Expected second call to fail (below first record)")
+ }
+
+ // Third call: nSeen = 2, equals first (2), should pass, nExported becomes 1
+ passed, finished = filter.PassesCountFilter()
+ if !passed || finished {
+ t.Error("Expected third call to pass (at first record)")
+ }
+
+ // Fourth call: nSeen = 3, should pass, nExported becomes 2
+ passed, finished = filter.PassesCountFilter()
+ if !passed || finished {
+ t.Error("Expected fourth call to pass")
+ }
+
+ // Fifth call: nSeen = 4, should pass, nExported becomes 3
+ passed, finished = filter.PassesCountFilter()
+ if !passed || finished {
+ t.Error("Expected fifth call to pass")
+ }
+
+ // Sixth call: nSeen = 5, should pass, nExported becomes 4
+ passed, finished = filter.PassesCountFilter()
+ if !passed || finished {
+ t.Error("Expected sixth call to pass")
+ }
+
+ // Seventh call: nSeen = 6, should pass, nExported becomes 5 (reaches limit)
+ passed, finished = filter.PassesCountFilter()
+ if !passed || finished {
+ t.Error("Expected seventh call to pass")
+ }
+
+ // Eighth call: nSeen = 7, nExported is 5 which >= limit, should finish
+ passed, finished = filter.PassesCountFilter()
+ if passed || !finished {
+ t.Error("Expected eighth call to finish (reached max records)")
+ }
+}
+
+func TestPassesTxFilter(t *testing.T) {
+ tests := []struct {
+ name string
+ reverted bool
+ fourBytes []string
+ tx Transaction
+ expected bool
+ }{
+ {
+ name: "no filters - should pass",
+ reverted: false,
+ fourBytes: []string{},
+ tx: Transaction{IsError: false, Input: "0xabcd"},
+ expected: true,
+ },
+ {
+ name: "reverted filter - pass error tx",
+ reverted: true,
+ fourBytes: []string{},
+ tx: Transaction{IsError: true, Input: "0xabcd"},
+ expected: true,
+ },
+ {
+ name: "reverted filter - fail non-error tx",
+ reverted: true,
+ fourBytes: []string{},
+ tx: Transaction{IsError: false, Input: "0xabcd"},
+ expected: false,
+ },
+ {
+ name: "fourbyte filter - match",
+ reverted: false,
+ fourBytes: []string{"0x1234"},
+ tx: Transaction{IsError: false, Input: "0x1234abcd"},
+ expected: true,
+ },
+ {
+ name: "fourbyte filter - no match",
+ reverted: false,
+ fourBytes: []string{"0x1234"},
+ tx: Transaction{IsError: false, Input: "0x5678abcd"},
+ expected: false,
+ },
+ {
+ name: "both filters - reverted fail overrides fourbyte match",
+ reverted: true,
+ fourBytes: []string{"0x1234"},
+ tx: Transaction{IsError: false, Input: "0x1234abcd"},
+ expected: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ filter := NewFilter(false, tt.reverted, tt.fourBytes, ranges.BlockRange{}, ranges.RecordRange{})
+ result := filter.PassesTxFilter(&tt.tx)
+ if result != tt.expected {
+ t.Errorf("Expected %v, got %v", tt.expected, result)
+ }
+ })
+ }
+}
+
+func TestPassesLogFilter(t *testing.T) {
+ addr1 := base.HexToAddress("0x1234567890123456789012345678901234567890")
+ addr2 := base.HexToAddress("0xabcdefabcdefabcdefabcdefabcdefabcdefabcd")
+
+ log := Log{
+ Address: addr1,
+ Topics: []base.Hash{base.HexToHash("0x1111"), base.HexToHash("0x2222")},
+ Data: "0xdeadbeef",
+ }
+
+ filter := NewEmptyFilter()
+
+ // Should match when address is in the array
+ addrArray := []base.Address{addr1, addr2}
+ if !filter.PassesLogFilter(&log, addrArray) {
+ t.Error("Expected log to match when address is in array")
+ }
+
+ // Should not match when address is not in the array
+ addrArray = []base.Address{addr2}
+ if filter.PassesLogFilter(&log, addrArray) {
+ t.Error("Expected log not to match when address is not in array")
+ }
+}
+
+func TestSort(t *testing.T) {
+ records := []AppRecord{
+ {BlockNumber: 200, TransactionIndex: 1},
+ {BlockNumber: 100, TransactionIndex: 2},
+ {BlockNumber: 100, TransactionIndex: 1},
+ {BlockNumber: 200, TransactionIndex: 0},
+ }
+
+ // Test ascending sort
+ filter := NewFilter(false, false, []string{}, ranges.BlockRange{}, ranges.RecordRange{})
+ filter.Sort(records)
+
+ expected := []AppRecord{
+ {BlockNumber: 100, TransactionIndex: 1},
+ {BlockNumber: 100, TransactionIndex: 2},
+ {BlockNumber: 200, TransactionIndex: 0},
+ {BlockNumber: 200, TransactionIndex: 1},
+ }
+
+ for i, record := range records {
+ if record.BlockNumber != expected[i].BlockNumber || record.TransactionIndex != expected[i].TransactionIndex {
+ t.Errorf("Sort failed at index %d: got (%d,%d), expected (%d,%d)",
+ i, record.BlockNumber, record.TransactionIndex, expected[i].BlockNumber, expected[i].TransactionIndex)
+ }
+ }
+}
diff --git a/src/apps/chifra/pkg/types/slice_of_maps.go b/src/apps/chifra/pkg/types/slice_of_maps.go
index d35d1fb82f..db2b117b4c 100644
--- a/src/apps/chifra/pkg/types/slice_of_maps.go
+++ b/src/apps/chifra/pkg/types/slice_of_maps.go
@@ -8,7 +8,11 @@ type MappedType interface {
LightBlock |
Appearance |
Withdrawal |
+ []Withdrawal |
[]Result |
+ []*Log |
+ []*Trace |
+ Approval |
Token |
bool
}
diff --git a/src/apps/chifra/pkg/types/types_approval.go b/src/apps/chifra/pkg/types/types_approval.go
new file mode 100644
index 0000000000..9c5d071a5a
--- /dev/null
+++ b/src/apps/chifra/pkg/types/types_approval.go
@@ -0,0 +1,117 @@
+// Copyright 2016, 2024 The TrueBlocks Authors. All rights reserved.
+// Use of this source code is governed by a license that can
+// be found in the LICENSE file.
+/*
+ * Parts of this file were auto generated. Edit only those parts of
+ * the code inside of 'EXISTING_CODE' tags.
+ */
+
+package types
+
+// EXISTING_CODE
+import (
+ "encoding/json"
+
+ "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/base"
+)
+
+// EXISTING_CODE
+
+type Approval struct {
+ Allowance base.Wei `json:"allowance"`
+ BlockNumber base.Blknum `json:"blockNumber"`
+ Owner base.Address `json:"owner"`
+ Spender base.Address `json:"spender"`
+ Timestamp base.Timestamp `json:"timestamp"`
+ Token base.Address `json:"token"`
+ LastAppBlock base.Blknum `json:"lastAppBlock"`
+ LastAppTs base.Timestamp `json:"lastAppTs"`
+ LastAppLogID base.Lognum `json:"lastAppLogID"`
+ LastAppTxID base.Txnum `json:"lastAppTxID"`
+ // EXISTING_CODE
+ // EXISTING_CODE
+}
+
+func (s Approval) String() string {
+ bytes, _ := json.Marshal(s)
+ return string(bytes)
+}
+
+func (s *Approval) Model(chain, format string, verbose bool, extraOpts map[string]any) Model {
+ _ = chain
+ _ = format
+ _ = verbose
+ _ = extraOpts
+ var model = map[string]any{}
+ var order = []string{}
+
+ // EXISTING_CODE
+ model = map[string]any{
+ "blockNumber": s.BlockNumber,
+ "timestamp": s.Timestamp,
+ "date": s.Date(),
+ "owner": s.Owner,
+ "spender": s.Spender,
+ "token": s.Token,
+ "allowance": s.Allowance.String(),
+ "lastAppBlock": s.LastAppBlock,
+ "lastAppLogID": s.LastAppLogID,
+ "lastAppTxID": s.LastAppTxID,
+ "lastAppTs": s.LastAppTs,
+ "lastAppDate": base.FormattedDate(s.LastAppTs),
+ }
+ // EXISTING_CODE
+
+ order = []string{
+ "blockNumber",
+ "timestamp",
+ "date",
+ "owner",
+ "spender",
+ "token",
+ "allowance",
+ "lastAppBlock",
+ "lastAppLogID",
+ "lastAppTxID",
+ "lastAppTs",
+ "lastAppDate",
+ }
+
+ if verbose {
+ items := []namer{
+ {addr: s.Owner, name: "ownerName"},
+ {addr: s.Spender, name: "spenderName"},
+ {addr: s.Token, name: "tokenName"},
+ }
+ for _, item := range items {
+ if name, loaded, found := nameAddress(extraOpts, item.addr); found {
+ model[item.name] = name.Name
+ order = append(order, item.name)
+ } else if loaded && format != "json" {
+ model[item.name] = ""
+ order = append(order, item.name)
+ }
+ }
+ order = reorderOrdering(order)
+ }
+ // EXISTING_CODE
+
+ return Model{
+ Data: model,
+ Order: order,
+ }
+}
+
+func (s *Approval) Date() string {
+ return base.FormattedDate(s.Timestamp)
+}
+
+// FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen
+func (s *Approval) FinishUnmarshal(fileVersion uint64) {
+ _ = fileVersion
+ // EXISTING_CODE
+ // EXISTING_CODE
+}
+
+// EXISTING_CODE
+// EXISTING_CODE
diff --git a/src/apps/chifra/pkg/types/types_log.go b/src/apps/chifra/pkg/types/types_log.go
index 868ce9d7f8..fdf100c923 100644
--- a/src/apps/chifra/pkg/types/types_log.go
+++ b/src/apps/chifra/pkg/types/types_log.go
@@ -356,4 +356,14 @@ func (log *Log) CompressedLog() string {
return MakeCompressed(log.ArticulatedLog)
}
+func (log *Log) Log2Haystack() string {
+ haystack := make([]byte, 66*len(log.Topics)+len(log.Data))
+ haystack = append(haystack, log.Address.Hex()[2:]...)
+ for _, topic := range log.Topics {
+ haystack = append(haystack, topic.Hex()[2:]...)
+ }
+ haystack = append(haystack, log.Data[2:]...)
+ return string(haystack)
+}
+
// EXISTING_CODE
diff --git a/src/apps/chifra/pkg/types/types_transfer_convert.go b/src/apps/chifra/pkg/types/types_transfer_convert.go
index 59a259e741..0d2a4c6760 100644
--- a/src/apps/chifra/pkg/types/types_transfer_convert.go
+++ b/src/apps/chifra/pkg/types/types_transfer_convert.go
@@ -161,7 +161,7 @@ func (s *Receipt) ToTranfers(holder base.Address, assetFilters []base.Address, a
if len(log.Topics) > 0 {
isTransfer := log.Topics[0] == topics.TransferTopic
isOfIterest := IsAssetOfInterest(log.Address, assetFilters)
- passesFilter := appFilter.ApplyLogFilter(&log, []base.Address{holder})
+ passesFilter := appFilter.PassesLogFilter(&log, []base.Address{holder})
if isTransfer && isOfIterest && passesFilter {
if xfr, err := log.toTransfer(holder); err != nil {
return nil, err
diff --git a/src/apps/chifra/pkg/utils/iteration.go b/src/apps/chifra/pkg/utils/iteration.go
index 95d4837dfc..b57a330c57 100644
--- a/src/apps/chifra/pkg/utils/iteration.go
+++ b/src/apps/chifra/pkg/utils/iteration.go
@@ -19,13 +19,6 @@ func IterateOverMap[Key comparable, Value any](ctx context.Context, errorChan ch
var wg sync.WaitGroup
defer close(errorChan)
- max := func(x, y int) int {
- if x > y {
- return x
- }
- return y
- }
-
nRoutines := max(1, runtime.GOMAXPROCS(0))
itemsPerPool := max(1, len(target)/nRoutines)
diff --git a/src/dev_tools/goMaker/go.mod b/src/dev_tools/goMaker/go.mod
index 8851cfe82b..85cca373ff 100644
--- a/src/dev_tools/goMaker/go.mod
+++ b/src/dev_tools/goMaker/go.mod
@@ -4,7 +4,7 @@ module github.com/TrueBlocks/trueblocks-core/goMaker
go 1.25.1
require (
- github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2
+ github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
golang.org/x/text v0.24.0
)
diff --git a/src/dev_tools/goMaker/go.sum b/src/dev_tools/goMaker/go.sum
index 565ca927e5..84bcbaa409 100644
--- a/src/dev_tools/goMaker/go.sum
+++ b/src/dev_tools/goMaker/go.sum
@@ -1,5 +1,5 @@
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2 h1:EI7InV6Zigd5ByorVy0A0gRsapFvknE6o8mQLrO18Nw=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd h1:F5yfw2oGYXIfVg8rkfRptkhCTdpGWndM+VKuPrvh7PY=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
diff --git a/src/dev_tools/goMaker/main_test.go b/src/dev_tools/goMaker/main_test.go
index 7b727df9a7..b70ee36b24 100644
--- a/src/dev_tools/goMaker/main_test.go
+++ b/src/dev_tools/goMaker/main_test.go
@@ -1,11 +1,10 @@
package main
import (
- "os"
"testing"
)
func TestMainFunction(t *testing.T) {
- os.Chdir("/Users/jrush/Development/trueblocks-dalledress")
- main()
+ // os.Chdir("/Users/jrush/Development/trueblocks-dalledress")
+ // main()
}
diff --git a/src/dev_tools/goMaker/templates/classDefinitions/approval.toml b/src/dev_tools/goMaker/templates/classDefinitions/approval.toml
new file mode 100644
index 0000000000..f409fc0356
--- /dev/null
+++ b/src/dev_tools/goMaker/templates/classDefinitions/approval.toml
@@ -0,0 +1,7 @@
+[settings]
+ class = "Approval"
+ doc_group = "01-Accounts"
+ doc_descr = "an ERC-20 token approval granting spending permission from owner to spender"
+ doc_route = "122-approval"
+ attributes = ""
+ produced_by = "tokens"
diff --git a/src/dev_tools/goMaker/templates/classDefinitions/fields/approval.csv b/src/dev_tools/goMaker/templates/classDefinitions/fields/approval.csv
new file mode 100644
index 0000000000..b3ee5bf22b
--- /dev/null
+++ b/src/dev_tools/goMaker/templates/classDefinitions/fields/approval.csv
@@ -0,0 +1,11 @@
+name , type , strDefault, attributes, docOrder, description
+blockNumber , blknum , , , 1, the block number at which this call was made
+timestamp , timestamp, , , 2, the timestamp of the block for this call
+date , datetime , , calc , 3, the timestamp as a date
+address , address , , , 4, the address of the owner of the token (the approver)
+addressName , string , , , 5, the name of the holder, if available
+spender , address , , , 6, the address being granted approval to spend tokens
+spenderName , string , , , 7, the name of the spender, if available
+amount , wei , , , 8, the amount of tokens approved for spending
+token , address , , , 9, the address of the ERC-20 token being approved
+tokenName , string , , , 10, the name of the token, if available
\ No newline at end of file
diff --git a/src/dev_tools/goMaker/templates/cmd-line-options.csv b/src/dev_tools/goMaker/templates/cmd-line-options.csv
index fba9520215..5a4932803a 100644
--- a/src/dev_tools/goMaker/templates/cmd-line-options.csv
+++ b/src/dev_tools/goMaker/templates/cmd-line-options.csv
@@ -18,12 +18,13 @@ num,folder,group,route,tool,longName,hotKey,def_val,attributes,handler,option_ty
12150,apps,Accounts,list,acctExport,n2,,,,,note,,,,,,No other options are permitted when --silent is selected.
#
13000,apps,Accounts,export,acctExport,,,,visible|docs,,command,,,Export details,[flags] [address...] [topics...] [fourbytes...],default|caching|ether|names|,Export full details of transactions for one or more addresses.
-13020,apps,Accounts,export,acctExport,addrs,,,required|visible|docs,12,positional,list,transaction,,,,one or more addresses (0x...) to export
+13020,apps,Accounts,export,acctExport,addrs,,,required|visible|docs,13,positional,list,transaction,,,,one or more addresses (0x...) to export
13030,apps,Accounts,export,acctExport,topics,,,visible|docs,,positional,list,,,,,filter by one or more log topics (only for --logs option)
13040,apps,Accounts,export,acctExport,fourbytes,,,visible|docs,,positional,list,,,,,filter by one or more fourbytes (only for transactions and trace options)
13050,apps,Accounts,export,acctExport,appearances,p,,visible|docs,5,switch,,appearance,,,,export a list of appearances
13060,apps,Accounts,export,acctExport,receipts,r,,visible|docs,2,switch,,receipt,,,,export receipts instead of transactional data
13070,apps,Accounts,export,acctExport,logs,l,,visible|docs,3,switch,,log,,,,export logs instead of transactional data
+13075,apps,Accounts,export,acctExport,approvals,O,,visible|docs,12,switch,,transaction,,,,export all token approval transactions for the given address
13080,apps,Accounts,export,acctExport,traces,t,,visible|docs,11,switch,,trace,,,,export traces instead of transactional data
13090,apps,Accounts,export,acctExport,neighbors,n,,visible|docs,8,switch,,message,,,,export the neighbors of the given address
13110,apps,Accounts,export,acctExport,statements,A,,visible|docs,9,switch,,statement,,,,export only statements
@@ -221,9 +222,10 @@ num,folder,group,route,tool,longName,hotKey,def_val,attributes,handler,option_ty
32195,tools,Chain State,state,getState,n12,,,,,note,,,,,,--calldata may be one or more colon-separated solidity calls, four-byte plus parameters, or encoded call data strings.
#
33000,tools,Chain State,tokens,getTokens,,,,visible|docs,,command,,,Get token balance(s),[flags] [address...] [block...],default|caching|names|,Retrieve token balance(s) for one or more addresses at given block(s).
-33020,tools,Chain State,tokens,getTokens,addrs,,,required|visible|docs,2,positional,list,token,,,,two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported
+33020,tools,Chain State,tokens,getTokens,addrs,,,required|visible|docs,3,positional,list,token,,,,two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported
33030,tools,Chain State,tokens,getTokens,blocks,,,visible|docs,,positional,list,,,,,an optional list of one or more blocks at which to report balances, defaults to 'latest'
-33040,tools,Chain State,tokens,getTokens,parts,p,,visible|docs,1,flag,list,,,,,which parts of the token information to retrieve
+33035,tools,Chain State,tokens,getTokens,approvals,O,,visible|docs,1,switch,,token,,,,returns all open approvals for the given address(es)
+33040,tools,Chain State,tokens,getTokens,parts,p,,visible|docs,2,flag,list,,,,,which parts of the token information to retrieve
33050,tools,Chain State,tokens,getTokens,by_acct,b,,visible|docs,,switch,,,,,,consider each address an ERC20 token except the last, whose balance is reported for each token
33060,tools,Chain State,tokens,getTokens,changes,c,,visible|docs,,switch,,,,,,only report a balance when it changes from one block to the next
33070,tools,Chain State,tokens,getTokens,no_zero,z,,visible|docs,,switch,,,,,,suppress the display of zero balance accounts
@@ -233,6 +235,7 @@ num,folder,group,route,tool,longName,hotKey,def_val,attributes,handler,option_ty
33110,tools,Chain State,tokens,getTokens,n4,,,,,note,,,,,,If the queried node does not store historical state, the results are undefined.
33120,tools,Chain State,tokens,getTokens,n5,,,,,note,,,,,,`Special` blocks are detailed under `chifra when --list`.
33130,tools,Chain State,tokens,getTokens,n6,,,,,note,,,,,,If the `--parts` option is not empty, all addresses are considered tokens and each token's attributes are presented.
+33140,tools,Chain State,tokens,getTokens,n7,,,,,note,,,,,,For the --approvals option, all open approvals are reported for each provided address.
#
41000,,Admin,,,,,,,,group,,,,,,Control the scraper and build the index
#
diff --git a/src/dev_tools/goMaker/templates/model-intros/approval.md b/src/dev_tools/goMaker/templates/model-intros/approval.md
new file mode 100644
index 0000000000..def6e8580e
--- /dev/null
+++ b/src/dev_tools/goMaker/templates/model-intros/approval.md
@@ -0,0 +1,3 @@
+An Approval represents an ERC-20 token spending permission granted by a token owner to a spender address. This data structure captures the essential elements of the `approve()` function call, including the token contract address, the owner granting permission, the spender receiving permission, and the approved amount.
+
+Approvals are fundamental to ERC-20 token interactions, enabling decentralized exchanges, automated market makers, and other DeFi protocols to spend tokens on behalf of users. By tracking these permissions, users can monitor and analyze token spending authorizations across their addresses.
\ No newline at end of file
diff --git a/src/dev_tools/goMaker/templates/readme-intros/traces.notes.md b/src/dev_tools/goMaker/templates/readme-intros/traces.notes.md
index f6f828f458..cfc3879ffb 100644
--- a/src/dev_tools/goMaker/templates/readme-intros/traces.notes.md
+++ b/src/dev_tools/goMaker/templates/readme-intros/traces.notes.md
@@ -2,7 +2,7 @@
The `--traces` option requires your node to enable the `trace_block` (and related) RPC endpoints. Many remote RPC providers do not enable these endpoints due to the additional load they can place on the node. If you are running your own node, you can enable these endpoints by adding `trace` to your node's startup.
-The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following enviroment variable before running the command to instruct `chifra` where to test.
+The test for tracing assumes your node provides tracing starting at block 1. If your is partially synced, you may export the following environment variable before running the command to instruct `chifra` where to test.
```[bash]
export TB__FIRSTTRACE=
diff --git a/src/dev_tools/goMaker/types/types_option.go b/src/dev_tools/goMaker/types/types_option.go
index d2b611c954..6a40a428ba 100644
--- a/src/dev_tools/goMaker/types/types_option.go
+++ b/src/dev_tools/goMaker/types/types_option.go
@@ -834,7 +834,11 @@ func (op *Option) SdkEndpoint() string {
copy.GoName = ""
}
- return copy.executeTemplate(tmplName, tmpl)
+ ret := copy.executeTemplate(tmplName, tmpl)
+ if FirstUpper(op.Route) == "When" && op.GoName == "Check" {
+ ret = strings.Replace(ret, "in := opts.toInternal()", "in := opts.toInternal()\nin.Timestamps = true", 1)
+ }
+ return ret
}
func (op *Option) SdkCoreType() string {
diff --git a/src/dev_tools/indexManager/go.mod b/src/dev_tools/indexManager/go.mod
index 25d9d791e3..f7555a74e9 100644
--- a/src/dev_tools/indexManager/go.mod
+++ b/src/dev_tools/indexManager/go.mod
@@ -3,7 +3,7 @@ module github.com/TrueBlocks/trueblocks-core/indexManager
// Go Version
go 1.25.1
-require github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2
+require github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd
require (
github.com/bykof/gostradamus v1.1.2 // indirect
diff --git a/src/dev_tools/indexManager/go.sum b/src/dev_tools/indexManager/go.sum
index 850d2986c0..4e44b8cd2f 100644
--- a/src/dev_tools/indexManager/go.sum
+++ b/src/dev_tools/indexManager/go.sum
@@ -1,5 +1,5 @@
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2 h1:EI7InV6Zigd5ByorVy0A0gRsapFvknE6o8mQLrO18Nw=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd h1:F5yfw2oGYXIfVg8rkfRptkhCTdpGWndM+VKuPrvh7PY=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
github.com/bykof/gostradamus v1.1.2 h1:R25lYcHk1yawbwfef1KMZELjR5h2T9DbhGEV3LrcAVY=
github.com/bykof/gostradamus v1.1.2/go.mod h1:OUm9IOqAsrlmfaf3j59xXDwJ0WJq0KYzIwpamQFZS10=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
diff --git a/src/dev_tools/sdkFuzzer/chunks.go b/src/dev_tools/sdkFuzzer/chunks.go
index a7837f37fb..a0d93c7de1 100644
--- a/src/dev_tools/sdkFuzzer/chunks.go
+++ b/src/dev_tools/sdkFuzzer/chunks.go
@@ -27,7 +27,7 @@ func DoChunks() {
ShowHeader("DoChunks", opts)
globs := noCache(noEther(globals))
- // check := []bool{false, true}
+ check := []bool{false, true}
pin := []bool{false, true}
publish := []bool{false, true}
remote := []bool{false, true}
@@ -56,6 +56,7 @@ func DoChunks() {
_ = rewrite
_ = unpin
_ = metadata
+ _ = check
opts = sdk.ChunksOptions{
FirstBlock: 0,
LastBlock: base.NOPOSN,
diff --git a/src/dev_tools/sdkFuzzer/export.go b/src/dev_tools/sdkFuzzer/export.go
index ca27f8104d..27845ec250 100644
--- a/src/dev_tools/sdkFuzzer/export.go
+++ b/src/dev_tools/sdkFuzzer/export.go
@@ -137,6 +137,16 @@ func TestExport(which, value, fn string, opts *sdk.ExportOptions) {
ReportOkay(fn)
}
}
+ case "approvals":
+ if approvals, _, err := opts.ExportApprovals(); err != nil {
+ ReportError(fn, opts, err)
+ } else {
+ if err := SaveToFile(fn, approvals); err != nil {
+ ReportError2(fn, err)
+ } else {
+ ReportOkay(fn)
+ }
+ }
case "traces":
if traces, _, err := opts.ExportTraces(); err != nil {
ReportError(fn, opts, err)
diff --git a/src/dev_tools/sdkFuzzer/go.mod b/src/dev_tools/sdkFuzzer/go.mod
index 2e2ebb4c1d..1ac3a482cc 100644
--- a/src/dev_tools/sdkFuzzer/go.mod
+++ b/src/dev_tools/sdkFuzzer/go.mod
@@ -4,7 +4,7 @@ module github.com/TrueBlocks/trueblocks-core/sdkFuzzer
go 1.25.1
require (
- github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2
+ github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0
)
diff --git a/src/dev_tools/sdkFuzzer/go.sum b/src/dev_tools/sdkFuzzer/go.sum
index 28971c57b0..35aec61c63 100644
--- a/src/dev_tools/sdkFuzzer/go.sum
+++ b/src/dev_tools/sdkFuzzer/go.sum
@@ -2,8 +2,8 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2 h1:EI7InV6Zigd5ByorVy0A0gRsapFvknE6o8mQLrO18Nw=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd h1:F5yfw2oGYXIfVg8rkfRptkhCTdpGWndM+VKuPrvh7PY=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0 h1:m81aQ0MPaKwJrS4kZde8wapZ3UUoLwKDkWrrONRupXg=
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0/go.mod h1:dv1OhjLyuQA7VLgXmrtG+Bq80DadJ2wnPv2VTIvTd3Y=
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
diff --git a/src/dev_tools/sdkFuzzer/tokens.go b/src/dev_tools/sdkFuzzer/tokens.go
index 0f32e22b13..be50922c73 100644
--- a/src/dev_tools/sdkFuzzer/tokens.go
+++ b/src/dev_tools/sdkFuzzer/tokens.go
@@ -105,6 +105,16 @@ func TestTokens(which, value, fn string, opts *sdk.TokensOptions) {
ReportOkay(fn)
}
}
+ case "approvals":
+ if approvals, _, err := opts.TokensApprovals(); err != nil {
+ ReportError(fn, opts, err)
+ } else {
+ if err := SaveToFile(fn, approvals); err != nil {
+ ReportError2(fn, err)
+ } else {
+ ReportOkay(fn)
+ }
+ }
default:
ReportError(fn, opts, fmt.Errorf("unknown which: %s", which))
logger.Fatal("Quitting...")
diff --git a/src/dev_tools/testRunner/go.mod b/src/dev_tools/testRunner/go.mod
index 9e5a5c33d0..3e4936207d 100644
--- a/src/dev_tools/testRunner/go.mod
+++ b/src/dev_tools/testRunner/go.mod
@@ -4,7 +4,7 @@ module github.com/TrueBlocks/trueblocks-core/testRunner
go 1.25.1
require (
- github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2
+ github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0
)
diff --git a/src/dev_tools/testRunner/go.sum b/src/dev_tools/testRunner/go.sum
index 28971c57b0..35aec61c63 100644
--- a/src/dev_tools/testRunner/go.sum
+++ b/src/dev_tools/testRunner/go.sum
@@ -2,8 +2,8 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2 h1:EI7InV6Zigd5ByorVy0A0gRsapFvknE6o8mQLrO18Nw=
-github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923030321-c450c61709e2/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd h1:F5yfw2oGYXIfVg8rkfRptkhCTdpGWndM+VKuPrvh7PY=
+github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20250923033958-180bbc7ebdbd/go.mod h1:ln58BYBd4Ah6Ybhcc44+v8fJiQKGrzLBE9pkZAxxDQM=
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0 h1:m81aQ0MPaKwJrS4kZde8wapZ3UUoLwKDkWrrONRupXg=
github.com/TrueBlocks/trueblocks-sdk/v5 v5.3.0/go.mod h1:dv1OhjLyuQA7VLgXmrtG+Bq80DadJ2wnPv2VTIvTd3Y=
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
diff --git a/src/dev_tools/testRunner/prepare.go b/src/dev_tools/testRunner/prepare.go
index 95a42463dc..ce780d0b4b 100644
--- a/src/dev_tools/testRunner/prepare.go
+++ b/src/dev_tools/testRunner/prepare.go
@@ -174,5 +174,21 @@ func clearCache() error {
}
logger.InfoG("Successfully decached logs data")
+ // make sure these monitors exist for token approval tests
+ logger.InfoY("Ensuring monitors exist for token approval tests...")
+ cacheAddrs := []string{
+ "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ }
+ cacheOpts := sdk.ExportOptions{
+ Addrs: cacheAddrs,
+ LastBlock: 14000000,
+ }
+ cacheOpts.Globals.Cache = true
+ if _, _, err := cacheOpts.Export(); err != nil {
+ return fmt.Errorf("error ensuring monitors exist: %w", err)
+ }
+ logger.InfoG("Successfully ensured monitors exist")
+
return nil
}
diff --git a/src/dev_tools/testRunner/testCases/chunks.csv b/src/dev_tools/testRunner/testCases/chunks.csv
index 66aa400cdd..2721a42f5d 100644
--- a/src/dev_tools/testRunner/testCases/chunks.csv
+++ b/src/dev_tools/testRunner/testCases/chunks.csv
@@ -81,7 +81,7 @@ on ,both ,fast ,chunks ,apps ,chunkMan ,tag_test ,y ,mod
# Dry run tests
on ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_tag ,y ,mode = index & tag = v2.0.0-release & dry_run
on ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_truncate ,y ,mode = index & truncate = 18000000 & dry_run
-on ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_pin ,y ,mode = manifest & pin & dry_run
+local ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_pin ,y ,mode = manifest & pin & dry_run
on ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_unpin ,y ,mode = pins & unpin & dry_run
on ,both ,fast ,chunks ,apps ,chunkMan ,dry_run_invalid ,y ,mode = manifest & dry_run
diff --git a/src/dev_tools/testRunner/testCases/export.csv b/src/dev_tools/testRunner/testCases/export.csv
index 067fef3e9f..ceae34b327 100644
--- a/src/dev_tools/testRunner/testCases/export.csv
+++ b/src/dev_tools/testRunner/testCases/export.csv
@@ -85,6 +85,13 @@ on , both, fast , export , apps, acctExport, export_logs_topics_10 , n ,
on , both, fast , export , apps, acctExport, export_logs_topics_3 , n , addrs = 0x111111517e4929d3dcbdfa7cce55d30d4b6bc4d6 & logs & topic = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef & max_records = 3 & fmt = csv
on , both, fast , export , apps, acctExport, export_logs_topics_fb_3, n , addrs = 0x111111517e4929d3dcbdfa7cce55d30d4b6bc4d6 & logs & topic = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef & first_block = 14353374 & max_records = 3 & fmt = csv
+# Testing --approvals
+on , both, fast , export , apps, acctExport, export_approvals , y , addrs = trueblocks.eth & approvals & max_records = 3 & fmt = json & cache
+on , both, fast , export , apps, acctExport, export_approvals_art , y , addrs = trueblocks.eth & approvals & articulate & max_records = 3 & fmt = json
+on , both, fast , export , apps, acctExport, export_approvals_csv , n , addrs = trueblocks.eth & approvals & max_records = 3 & fmt = csv
+on , both, fast , export , apps, acctExport, export_wo_emitter , y , addrs = trueblocks.eth & approvals & max_records = 30 & cache & fmt = json
+on , both, fast , export , apps, acctExport, export_with_emitter , y , addrs = trueblocks.eth & approvals & max_records = 30 & cache & emitter = 0x6b175474e89094c44da98b954eedeac495271d0f & fmt = json
+
on , both, fast , export , apps, acctExport, not_nfts , y , addrs = trueblocks.eth & logs & articulate & first_block = 8876230 & last_block = 9024186 & fmt = json
on , both, fast , export , apps, acctExport, nfts , y , addrs = trueblocks.eth & logs & articulate & nfts & first_block = 8876230 & last_block = 9024186 & fmt = json
on , both, fast , export , apps, acctExport, nfts_fail , y , addrs = trueblocks.eth & nfts & articulate & first_block = 8876230 & last_block = 9024186 & fmt = json
diff --git a/src/dev_tools/testRunner/testCases/tokens.csv b/src/dev_tools/testRunner/testCases/tokens.csv
index 877c415a7a..e18864eff1 100644
--- a/src/dev_tools/testRunner/testCases/tokens.csv
+++ b/src/dev_tools/testRunner/testCases/tokens.csv
@@ -83,6 +83,19 @@ on ,both ,fast ,tokens ,tools ,getTokens ,cache_and_decache ,y
on ,both ,fast ,tokens ,tools ,getTokens ,cache_one ,y ,addrs = 0xa9fe4601811213c340e850ea305481aff02f5b28 & blocks = 12000000 & cache
on ,both ,fast ,tokens ,tools ,getTokens ,decache_one ,y ,addrs = 0xa9fe4601811213c340e850ea305481aff02f5b28 & blocks = 12000000 & decache
+# Approvals tests
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_basic ,y ,addrs = trueblocks.eth & approvals
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_with_token ,y ,addrs = 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth & approvals
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_multiple_accounts ,y ,addrs = trueblocks.eth 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 & approvals
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_with_blocks ,y ,addrs = trueblocks.eth & approvals & blocks = 12000000-13000000
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_by_acct ,y ,addrs = 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth & approvals & by_acct
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_by_acct_multiple ,y ,addrs = 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c trueblocks.eth & approvals & by_acct
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_fmt_json ,y ,addrs = trueblocks.eth & approvals & fmt = json
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_fmt_json_verbose ,y ,addrs = trueblocks.eth & approvals & fmt = json & verbose
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_fmt_csv ,n ,addrs = trueblocks.eth & approvals & fmt = csv & no_header
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_no_zero ,y ,addrs = trueblocks.eth & approvals & no_zero
+on ,both ,fast ,tokens ,tools ,getTokens ,approvals_cache ,y ,addrs = trueblocks.eth & approvals & cache
+
# Capabilities
# chain & fmt & help & nocolor & noop & version & verbose & no_header & file & output & append & cache & decache & ether
on ,both ,fast ,tokens ,tools ,getTokens ,caps_allowed ,y ,addrs = trueblocks.eth & chain & fmt & nocolor & noop & version & verbose & no_header & file & output & append & cache & decache & fail_on_purpose
diff --git a/tests/gold/apps/acctExport/acctExport_accounting_ofx.txt b/tests/gold/apps/acctExport/acctExport_accounting_ofx.txt
index b74c6e4b9c..fd72f89935 100644
--- a/tests/gold/apps/acctExport/acctExport_accounting_ofx.txt
+++ b/tests/gold/apps/acctExport/acctExport_accounting_ofx.txt
@@ -17,6 +17,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_accounting_ofx_bad.txt b/tests/gold/apps/acctExport/acctExport_accounting_ofx_bad.txt
index cff292ab75..a190e15821 100644
--- a/tests/gold/apps/acctExport/acctExport_accounting_ofx_bad.txt
+++ b/tests/gold/apps/acctExport/acctExport_accounting_ofx_bad.txt
@@ -16,6 +16,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_assets_filtered_rev.txt b/tests/gold/apps/acctExport/acctExport_assets_filtered_rev.txt
index 1577a46433..41963e5ecf 100644
--- a/tests/gold/apps/acctExport/acctExport_assets_filtered_rev.txt
+++ b/tests/gold/apps/acctExport/acctExport_assets_filtered_rev.txt
@@ -22,6 +22,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_assets_withdrawals.txt b/tests/gold/apps/acctExport/acctExport_assets_withdrawals.txt
index cd3d40d00d..b84f7686f3 100644
--- a/tests/gold/apps/acctExport/acctExport_assets_withdrawals.txt
+++ b/tests/gold/apps/acctExport/acctExport_assets_withdrawals.txt
@@ -21,6 +21,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_block_not_found.txt b/tests/gold/apps/acctExport/acctExport_block_not_found.txt
index 181528a419..4b36afabea 100644
--- a/tests/gold/apps/acctExport/acctExport_block_not_found.txt
+++ b/tests/gold/apps/acctExport/acctExport_block_not_found.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_cache_and_decache.txt b/tests/gold/apps/acctExport/acctExport_cache_and_decache.txt
index 811fd9edb0..21f3a0ed08 100644
--- a/tests/gold/apps/acctExport/acctExport_cache_and_decache.txt
+++ b/tests/gold/apps/acctExport/acctExport_cache_and_decache.txt
@@ -19,6 +19,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_caps_allowed_e.txt b/tests/gold/apps/acctExport/acctExport_caps_allowed_e.txt
index bc774e5230..08bf918170 100644
--- a/tests/gold/apps/acctExport/acctExport_caps_allowed_e.txt
+++ b/tests/gold/apps/acctExport/acctExport_caps_allowed_e.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_caps_disallowed_2_e.txt b/tests/gold/apps/acctExport/acctExport_caps_disallowed_2_e.txt
index 1472eeec9b..aaa4cd7dff 100644
--- a/tests/gold/apps/acctExport/acctExport_caps_disallowed_2_e.txt
+++ b/tests/gold/apps/acctExport/acctExport_caps_disallowed_2_e.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_cnt_w_logs.txt b/tests/gold/apps/acctExport/acctExport_cnt_w_logs.txt
index 365da15f39..6a21dd3190 100644
--- a/tests/gold/apps/acctExport/acctExport_cnt_w_logs.txt
+++ b/tests/gold/apps/acctExport/acctExport_cnt_w_logs.txt
@@ -18,6 +18,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_cnt_w_traces.txt b/tests/gold/apps/acctExport/acctExport_cnt_w_traces.txt
index 856562c5f8..2ca21a1f73 100644
--- a/tests/gold/apps/acctExport/acctExport_cnt_w_traces.txt
+++ b/tests/gold/apps/acctExport/acctExport_cnt_w_traces.txt
@@ -18,6 +18,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_export_approvals.txt b/tests/gold/apps/acctExport/acctExport_export_approvals.txt
new file mode 100644
index 0000000000..b97ac3676d
--- /dev/null
+++ b/tests/gold/apps/acctExport/acctExport_export_approvals.txt
@@ -0,0 +1,59 @@
+chifra export trueblocks.eth --approvals --max_records 3 --fmt json --cache
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] MaxRecords: 3
+TEST[DATE|TIME] Cache: true
+TEST[DATE|TIME] Caps: cache,decache,ether
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ]
+}
diff --git a/tests/gold/apps/acctExport/acctExport_export_approvals_art.txt b/tests/gold/apps/acctExport/acctExport_export_approvals_art.txt
new file mode 100644
index 0000000000..20490dc9e2
--- /dev/null
+++ b/tests/gold/apps/acctExport/acctExport_export_approvals_art.txt
@@ -0,0 +1,83 @@
+chifra export trueblocks.eth --approvals --articulate --max_records 3 --fmt json
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Articulate: true
+TEST[DATE|TIME] MaxRecords: 3
+TEST[DATE|TIME] Caps: cache,decache,ether
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "500000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "7000000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "1000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ]
+}
diff --git a/tests/gold/apps/acctExport/acctExport_export_approvals_csv.txt b/tests/gold/apps/acctExport/acctExport_export_approvals_csv.txt
new file mode 100644
index 0000000000..d5099db960
--- /dev/null
+++ b/tests/gold/apps/acctExport/acctExport_export_approvals_csv.txt
@@ -0,0 +1,10 @@
+chifra export trueblocks.eth --approvals --max_records 3 --fmt csv
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] MaxRecords: 3
+TEST[DATE|TIME] Caps: cache,decache,ether
+TEST[DATE|TIME] Format: csv
+blockNumber,transactionIndex,logIndex,blockHash,transactionHash,timestamp,date,address,topic0,topic1,topic2,topic3,data,isNFT
+8860511,47,39,0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec,0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951,1572720103,2019-11-02 18:41:43 UTC,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7,,0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000,false
+8860529,145,114,0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1,0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d,1572720358,2019-11-02 18:45:58 UTC,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7,,0x00000000000000000000000000000000000000000000017b7883c06916600000,false
+9279447,73,92,0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26,0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806,1579008384,2020-01-14 13:26:24 UTC,0x6b175474e89094c44da98b954eedeac495271d0f,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce,,0x0000000000000000000000000000000000000000000000000de0b6b3a7640000,false
diff --git a/tests/gold/apps/acctExport/acctExport_export_help.txt b/tests/gold/apps/acctExport/acctExport_export_help.txt
index 94f5db5d07..2d759d32d4 100644
--- a/tests/gold/apps/acctExport/acctExport_export_help.txt
+++ b/tests/gold/apps/acctExport/acctExport_export_help.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_export_help_long.txt b/tests/gold/apps/acctExport/acctExport_export_help_long.txt
index dca20e62bf..05268d72d8 100644
--- a/tests/gold/apps/acctExport/acctExport_export_help_long.txt
+++ b/tests/gold/apps/acctExport/acctExport_export_help_long.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_export_no_params.txt b/tests/gold/apps/acctExport/acctExport_export_no_params.txt
index 6ba3f1f5a4..152f55f307 100644
--- a/tests/gold/apps/acctExport/acctExport_export_no_params.txt
+++ b/tests/gold/apps/acctExport/acctExport_export_no_params.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_export_with_emitter.txt b/tests/gold/apps/acctExport/acctExport_export_with_emitter.txt
new file mode 100644
index 0000000000..abab88152a
--- /dev/null
+++ b/tests/gold/apps/acctExport/acctExport_export_with_emitter.txt
@@ -0,0 +1,492 @@
+chifra export trueblocks.eth --approvals --max_records 30 --cache --emitter 0x6b175474e89094c44da98b954eedeac495271d0f --fmt json
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] MaxRecords: 30
+TEST[DATE|TIME] Emitter: [0x6b175474e89094c44da98b954eedeac495271d0f]
+TEST[DATE|TIME] Cache: true
+TEST[DATE|TIME] Caps: cache,decache,ether
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x3aa52adef5111c586f1c258f1ed934d63711489b36709ab207b94dfbb9f065a4",
+ "blockNumber": 10342473,
+ "data": "0x000000000000000000000000000000000000000000000000d02ab486cedc0000",
+ "date": "2020-06-26 16:21:21 UTC",
+ "logIndex": 190,
+ "timestamp": 1593188481,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xfddda08a6f49bdfd4a60c1105a4736922cb91f437264e0cc29b002d20720a176",
+ "transactionIndex": 163
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc21e3ddd587da8b8d264863a979ce2d7853cb9162139f2b0666289fa21967ad9",
+ "blockNumber": 10342648,
+ "data": "0x000000000000000000000000000000000000000000000000de0b6b3a764000c8",
+ "date": "2020-06-26 16:56:42 UTC",
+ "logIndex": 120,
+ "timestamp": 1593190602,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xcd31d0c0b5ce8de4605ccd785ada2edee6730cffce7e50a80aab9c39c4fbb612",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xadb85be21c729d35e21be7e9d09dc732b789d09cf1b06db5dcc13bcbafa8aba5",
+ "blockNumber": 10342948,
+ "data": "0x000000000000000000000000000000000000000000000001236efcbcbb340000",
+ "date": "2020-06-26 18:04:23 UTC",
+ "logIndex": 188,
+ "timestamp": 1593194663,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x8ab0bfb1cafbf08d8753e46970ff20b57ace7e097e9190b0f022fea2f747f2a5",
+ "transactionIndex": 161
+ }
+ ]
+}
diff --git a/tests/gold/apps/acctExport/acctExport_export_wo_emitter.txt b/tests/gold/apps/acctExport/acctExport_export_wo_emitter.txt
new file mode 100644
index 0000000000..67b77adb5a
--- /dev/null
+++ b/tests/gold/apps/acctExport/acctExport_export_wo_emitter.txt
@@ -0,0 +1,491 @@
+chifra export trueblocks.eth --approvals --max_records 30 --cache --fmt json
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] MaxRecords: 30
+TEST[DATE|TIME] Cache: true
+TEST[DATE|TIME] Caps: cache,decache,ether
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "blockHash": "0x2f419dcdc0e017b00e6023b47a8882c5820833be83840ea4ce9dc8d98ad354ec",
+ "blockNumber": 9364175,
+ "data": "0x0000000000000000000000000000000000000000000000000000000000989680",
+ "date": "2020-01-27 13:06:31 UTC",
+ "logIndex": 37,
+ "timestamp": 1580130391,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000003c065f2713ea9b1e7ac563c11612ee93d3682c1a"
+ ],
+ "transactionHash": "0x4211b2d5c7ba460379e50f581294fab8ccf54b786914759116cf273e30a9210c",
+ "transactionIndex": 20
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ }
+ ]
+}
diff --git a/tests/gold/apps/acctExport/acctExport_factory_not_trace_fail.txt b/tests/gold/apps/acctExport/acctExport_factory_not_trace_fail.txt
index e24001c947..82adfce927 100644
--- a/tests/gold/apps/acctExport/acctExport_factory_not_trace_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_factory_not_trace_fail.txt
@@ -16,6 +16,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_invalid_emitter_fail.txt b/tests/gold/apps/acctExport/acctExport_invalid_emitter_fail.txt
index 4f712ba432..fc45af8eb1 100644
--- a/tests/gold/apps/acctExport/acctExport_invalid_emitter_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_invalid_emitter_fail.txt
@@ -17,6 +17,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_invalid_fourbyte.txt b/tests/gold/apps/acctExport/acctExport_invalid_fourbyte.txt
index 4e251532b0..67e8f06bd6 100644
--- a/tests/gold/apps/acctExport/acctExport_invalid_fourbyte.txt
+++ b/tests/gold/apps/acctExport/acctExport_invalid_fourbyte.txt
@@ -16,6 +16,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_invalid_fourbyte_2.txt b/tests/gold/apps/acctExport/acctExport_invalid_fourbyte_2.txt
index 94c697c55b..508f48baae 100644
--- a/tests/gold/apps/acctExport/acctExport_invalid_fourbyte_2.txt
+++ b/tests/gold/apps/acctExport/acctExport_invalid_fourbyte_2.txt
@@ -17,6 +17,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_invalid_key.txt b/tests/gold/apps/acctExport/acctExport_invalid_key.txt
index 8a471980a1..227ffc0f01 100644
--- a/tests/gold/apps/acctExport/acctExport_invalid_key.txt
+++ b/tests/gold/apps/acctExport/acctExport_invalid_key.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_invalid_topic_fail.txt b/tests/gold/apps/acctExport/acctExport_invalid_topic_fail.txt
index 1f95fccc99..07f0751aee 100644
--- a/tests/gold/apps/acctExport/acctExport_invalid_topic_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_invalid_topic_fail.txt
@@ -17,6 +17,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_load.txt b/tests/gold/apps/acctExport/acctExport_load.txt
index 3caa9f9d1b..99f4c98b52 100644
--- a/tests/gold/apps/acctExport/acctExport_load.txt
+++ b/tests/gold/apps/acctExport/acctExport_load.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_nfts_fail.txt b/tests/gold/apps/acctExport/acctExport_nfts_fail.txt
index 5a58153e97..c92ea5931c 100644
--- a/tests/gold/apps/acctExport/acctExport_nfts_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_nfts_fail.txt
@@ -19,6 +19,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_not_logs_relevant_fail.txt b/tests/gold/apps/acctExport/acctExport_not_logs_relevant_fail.txt
index 36803bcbca..255a3be56d 100644
--- a/tests/gold/apps/acctExport/acctExport_not_logs_relevant_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_not_logs_relevant_fail.txt
@@ -17,6 +17,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_not_logs_topic_fail.txt b/tests/gold/apps/acctExport/acctExport_not_logs_topic_fail.txt
index 5cb2003bff..35eaa429ec 100644
--- a/tests/gold/apps/acctExport/acctExport_not_logs_topic_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_not_logs_topic_fail.txt
@@ -16,6 +16,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_rev_rev_acct.txt b/tests/gold/apps/acctExport/acctExport_rev_rev_acct.txt
index 9dadb355e6..53392e3dea 100644
--- a/tests/gold/apps/acctExport/acctExport_rev_rev_acct.txt
+++ b/tests/gold/apps/acctExport/acctExport_rev_rev_acct.txt
@@ -19,6 +19,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_statement_withdrawals.txt b/tests/gold/apps/acctExport/acctExport_statement_withdrawals.txt
index 58e5a7fe84..77f30b138d 100644
--- a/tests/gold/apps/acctExport/acctExport_statement_withdrawals.txt
+++ b/tests/gold/apps/acctExport/acctExport_statement_withdrawals.txt
@@ -20,6 +20,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_transfer_withdrawals.txt b/tests/gold/apps/acctExport/acctExport_transfer_withdrawals.txt
index 86f445233d..54321b3048 100644
--- a/tests/gold/apps/acctExport/acctExport_transfer_withdrawals.txt
+++ b/tests/gold/apps/acctExport/acctExport_transfer_withdrawals.txt
@@ -21,6 +21,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/acctExport_withdrawals_fail.txt b/tests/gold/apps/acctExport/acctExport_withdrawals_fail.txt
index 19a3d1f784..8f69c7a122 100644
--- a/tests/gold/apps/acctExport/acctExport_withdrawals_fail.txt
+++ b/tests/gold/apps/acctExport/acctExport_withdrawals_fail.txt
@@ -19,6 +19,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals.txt b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals.txt
new file mode 100644
index 0000000000..8d682766e9
--- /dev/null
+++ b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals.txt
@@ -0,0 +1,63 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=3&fmt=json&cache
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_art.txt b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_art.txt
new file mode 100644
index 0000000000..b58bbfc058
--- /dev/null
+++ b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_art.txt
@@ -0,0 +1,87 @@
+export?addrs=trueblocks.eth&approvals&articulate&maxRecords=3&fmt=json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "500000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "7000000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "1000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_csv.txt b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_csv.txt
new file mode 100644
index 0000000000..3beb7c6fa9
--- /dev/null
+++ b/tests/gold/apps/acctExport/api_tests/acctExport_export_approvals_csv.txt
@@ -0,0 +1,6 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=3&fmt=csv
+blockNumber,transactionIndex,logIndex,blockHash,transactionHash,timestamp,date,address,topic0,topic1,topic2,topic3,data,isNFT
+8860511,47,39,0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec,0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951,1572720103,2019-11-02 18:41:43 UTC,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7,,0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000,false
+8860529,145,114,0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1,0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d,1572720358,2019-11-02 18:45:58 UTC,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7,,0x00000000000000000000000000000000000000000000017b7883c06916600000,false
+9279447,73,92,0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26,0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806,1579008384,2020-01-14 13:26:24 UTC,0x6b175474e89094c44da98b954eedeac495271d0f,0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925,0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b,0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce,,0x0000000000000000000000000000000000000000000000000de0b6b3a7640000,false
+
diff --git a/tests/gold/apps/acctExport/api_tests/acctExport_export_with_emitter.txt b/tests/gold/apps/acctExport/api_tests/acctExport_export_with_emitter.txt
new file mode 100644
index 0000000000..b4a275b396
--- /dev/null
+++ b/tests/gold/apps/acctExport/api_tests/acctExport_export_with_emitter.txt
@@ -0,0 +1,495 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=30&cache&emitter=0x6b175474e89094c44da98b954eedeac495271d0f&fmt=json
+{
+ "data": [
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x3aa52adef5111c586f1c258f1ed934d63711489b36709ab207b94dfbb9f065a4",
+ "blockNumber": 10342473,
+ "data": "0x000000000000000000000000000000000000000000000000d02ab486cedc0000",
+ "date": "2020-06-26 16:21:21 UTC",
+ "logIndex": 190,
+ "timestamp": 1593188481,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xfddda08a6f49bdfd4a60c1105a4736922cb91f437264e0cc29b002d20720a176",
+ "transactionIndex": 163
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc21e3ddd587da8b8d264863a979ce2d7853cb9162139f2b0666289fa21967ad9",
+ "blockNumber": 10342648,
+ "data": "0x000000000000000000000000000000000000000000000000de0b6b3a764000c8",
+ "date": "2020-06-26 16:56:42 UTC",
+ "logIndex": 120,
+ "timestamp": 1593190602,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xcd31d0c0b5ce8de4605ccd785ada2edee6730cffce7e50a80aab9c39c4fbb612",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xadb85be21c729d35e21be7e9d09dc732b789d09cf1b06db5dcc13bcbafa8aba5",
+ "blockNumber": 10342948,
+ "data": "0x000000000000000000000000000000000000000000000001236efcbcbb340000",
+ "date": "2020-06-26 18:04:23 UTC",
+ "logIndex": 188,
+ "timestamp": 1593194663,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x8ab0bfb1cafbf08d8753e46970ff20b57ace7e097e9190b0f022fea2f747f2a5",
+ "transactionIndex": 161
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/api_tests/acctExport_export_wo_emitter.txt b/tests/gold/apps/acctExport/api_tests/acctExport_export_wo_emitter.txt
new file mode 100644
index 0000000000..bc1b71d0d2
--- /dev/null
+++ b/tests/gold/apps/acctExport/api_tests/acctExport_export_wo_emitter.txt
@@ -0,0 +1,495 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=30&cache&fmt=json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "blockHash": "0x2f419dcdc0e017b00e6023b47a8882c5820833be83840ea4ce9dc8d98ad354ec",
+ "blockNumber": 9364175,
+ "data": "0x0000000000000000000000000000000000000000000000000000000000989680",
+ "date": "2020-01-27 13:06:31 UTC",
+ "logIndex": 37,
+ "timestamp": 1580130391,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000003c065f2713ea9b1e7ac563c11612ee93d3682c1a"
+ ],
+ "transactionHash": "0x4211b2d5c7ba460379e50f581294fab8ccf54b786914759116cf273e30a9210c",
+ "transactionIndex": 20
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals.txt b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals.txt
new file mode 100644
index 0000000000..9147699a2b
--- /dev/null
+++ b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals.txt
@@ -0,0 +1,71 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=3&cache
+Args: [addrs=trueblocks.eth approvals maxRecords=3 cache]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"maxRecords":3,"cache":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Approvals: true
+MaxRecords: 3
+Cache: true
+Caps: cache,decache,ether
+Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_art.txt b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_art.txt
new file mode 100644
index 0000000000..d7786e362d
--- /dev/null
+++ b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_art.txt
@@ -0,0 +1,95 @@
+export?addrs=trueblocks.eth&approvals&articulate&maxRecords=3
+Args: [addrs=trueblocks.eth approvals articulate maxRecords=3]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"articulate":true,"maxRecords":3}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Approvals: true
+Articulate: true
+MaxRecords: 3
+Caps: cache,decache,ether
+Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "500000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "7000000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "articulatedLog": {
+ "inputs": {
+ "_amount": "1000000000000000000",
+ "_owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "_spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce"
+ },
+ "name": "Approval"
+ },
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_csv.txt b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_csv.txt
new file mode 100644
index 0000000000..e20c7ea5fe
--- /dev/null
+++ b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_approvals_csv.txt
@@ -0,0 +1,70 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=3
+Args: [addrs=trueblocks.eth approvals maxRecords=3]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"maxRecords":3}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Approvals: true
+MaxRecords: 3
+Caps: cache,decache,ether
+Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/sdk_tests/acctExport_export_with_emitter.txt b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_with_emitter.txt
new file mode 100644
index 0000000000..1c7dd494f8
--- /dev/null
+++ b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_with_emitter.txt
@@ -0,0 +1,504 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=30&cache&emitter=0x6b175474e89094c44da98b954eedeac495271d0f
+Args: [addrs=trueblocks.eth approvals maxRecords=30 cache emitter=0x6b175474e89094c44da98b954eedeac495271d0f]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"maxRecords":30,"emitter":["0x6b175474e89094c44da98b954eedeac495271d0f"],"cache":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Approvals: true
+MaxRecords: 30
+Emitter: [0x6b175474e89094c44da98b954eedeac495271d0f]
+Cache: true
+Caps: cache,decache,ether
+Format: json
+{
+ "data": [
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x3aa52adef5111c586f1c258f1ed934d63711489b36709ab207b94dfbb9f065a4",
+ "blockNumber": 10342473,
+ "data": "0x000000000000000000000000000000000000000000000000d02ab486cedc0000",
+ "date": "2020-06-26 16:21:21 UTC",
+ "logIndex": 190,
+ "timestamp": 1593188481,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xfddda08a6f49bdfd4a60c1105a4736922cb91f437264e0cc29b002d20720a176",
+ "transactionIndex": 163
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc21e3ddd587da8b8d264863a979ce2d7853cb9162139f2b0666289fa21967ad9",
+ "blockNumber": 10342648,
+ "data": "0x000000000000000000000000000000000000000000000000de0b6b3a764000c8",
+ "date": "2020-06-26 16:56:42 UTC",
+ "logIndex": 120,
+ "timestamp": 1593190602,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0xcd31d0c0b5ce8de4605ccd785ada2edee6730cffce7e50a80aab9c39c4fbb612",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xadb85be21c729d35e21be7e9d09dc732b789d09cf1b06db5dcc13bcbafa8aba5",
+ "blockNumber": 10342948,
+ "data": "0x000000000000000000000000000000000000000000000001236efcbcbb340000",
+ "date": "2020-06-26 18:04:23 UTC",
+ "logIndex": 188,
+ "timestamp": 1593194663,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x8ab0bfb1cafbf08d8753e46970ff20b57ace7e097e9190b0f022fea2f747f2a5",
+ "transactionIndex": 161
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/acctExport/sdk_tests/acctExport_export_wo_emitter.txt b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_wo_emitter.txt
new file mode 100644
index 0000000000..2ac86b0cec
--- /dev/null
+++ b/tests/gold/apps/acctExport/sdk_tests/acctExport_export_wo_emitter.txt
@@ -0,0 +1,503 @@
+export?addrs=trueblocks.eth&approvals&maxRecords=30&cache
+Args: [addrs=trueblocks.eth approvals maxRecords=30 cache]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"maxRecords":30,"cache":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Approvals: true
+MaxRecords: 30
+Cache: true
+Caps: cache,decache,ether
+Format: json
+{
+ "data": [
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0x4b2f8717f83b21a44e5c4076c8fc9573bfd26aaffcf859e7472c6af7e820eaec",
+ "blockNumber": 8860511,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2019-11-02 18:41:43 UTC",
+ "logIndex": 39,
+ "timestamp": 1572720103,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0xc36909ffb8335811e5b92d662f39c5e5c0e75394bb9638d7136ab4a4bb2b6951",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "blockHash": "0xe384c13e7991bcda44d06295943a724bebf8126b3c521637e2aec171b99ea7d1",
+ "blockNumber": 8860529,
+ "data": "0x00000000000000000000000000000000000000000000017b7883c06916600000",
+ "date": "2019-11-02 18:45:58 UTC",
+ "logIndex": 114,
+ "timestamp": 1572720358,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x00000000000000000000000030f938fed5de6e06a9a7cd2ac3517131c317b1e7"
+ ],
+ "transactionHash": "0x3af5419098b5510f39ec64d6eb8ee08f3fe5cb538469fa9ef263cf7ebd4b607d",
+ "transactionIndex": 145
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xdbbdfb0aa27a09854fe88cb989caf7b2aece565b2e2155897dec18a1a6b43a26",
+ "blockNumber": 9279447,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 13:26:24 UTC",
+ "logIndex": 92,
+ "timestamp": 1579008384,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2543e31e47284e3061cac63b383f39aee75cd83ece58fb1850430312a878c806",
+ "transactionIndex": 73
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x85872df5ffb6cf67a383fa8f9de50a247a6bc4d646825ad4d058acb0a92b4473",
+ "blockNumber": 9280648,
+ "data": "0x0000000000000000000000000000000000000000000000015af1d78b58c40000",
+ "date": "2020-01-14 18:03:14 UTC",
+ "logIndex": 116,
+ "timestamp": 1579024994,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x768d531d2849bd97faa1c11d69bfe825d23d6750e930e1c50152d931913c9ea3",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x339d56932deac32da668ad04ab73a0cd4e5ee56a3046d1db3d028f9f9ad4c849",
+ "blockNumber": 9280660,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:05:24 UTC",
+ "logIndex": 80,
+ "timestamp": 1579025124,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xcaa3ffac6cc9566ddcc488c1eaed02a723449ff0b2dd8e6742dfe5880cb42c6d",
+ "transactionIndex": 44
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf933f025b568e720ac82eace81678072808796a57e51142016418403de7f151",
+ "blockNumber": 9280667,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 18:07:39 UTC",
+ "logIndex": 104,
+ "timestamp": 1579025259,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb9b79d0b75392c20ebc44265931cfbaa055250b1f5e0c7593326b27af2d1532",
+ "transactionIndex": 146
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x726535bd91674bec3eef19894fd8db66f229c82808f13f917b58f716a12c57b6",
+ "blockNumber": 9280703,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:14:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579025679,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x6e78eaec07aa0974a73ff2686483f2ef50fa51642a381a9bf3ea6e4b728e5451",
+ "transactionIndex": 56
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaf228b710b7171e8a88970e429178930d607c8527472977cf06a9ac29df6e766",
+ "blockNumber": 9280722,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:02 UTC",
+ "logIndex": 110,
+ "timestamp": 1579025882,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8f6a028007c33f4ccdd85f52c86608bd14c5983a1df100fd1cf46ed4100c8353",
+ "transactionIndex": 103
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xaaedb16ad2ad5ecb2593f0e4fcea9c7cbd962f16ab2430d3ba893efe4395781c",
+ "blockNumber": 9280725,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:18:43 UTC",
+ "logIndex": 71,
+ "timestamp": 1579025923,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xd56a0fbd11aad1b951281db06c6352b60e6cb5bb5f955fb98b39f8f488ff0ddb",
+ "transactionIndex": 74
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 104,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2fbe9fa9d4d3443368b0a787949ee05a4ef29521125d934b436638fa193bd90a",
+ "transactionIndex": 35
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xb2faad364287439d30ce149cefeaeead60d01bb0e7e3a967a12e4b47473f74ff",
+ "blockNumber": 9280851,
+ "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
+ "date": "2020-01-14 18:47:10 UTC",
+ "logIndex": 107,
+ "timestamp": 1579027630,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x595d708380ad5d4bf8646f7d0ba21833022e1ce7ee7ccec2d74154db8aa54943",
+ "transactionIndex": 37
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 229,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x18462779ed8f9876f3ff10d007aba55434c1e285ce42b6e20442c1d6258cca74",
+ "transactionIndex": 155
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xe6fb85e47011adb79c3f716987e721f67b205a9069fe194c542516d90c1e3d07",
+ "blockNumber": 9280856,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-14 18:48:10 UTC",
+ "logIndex": 232,
+ "timestamp": 1579027690,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xfb958dd92e166bf40f3c494ea9fbf7f6b576d4608e331f2228b4f83ab99ca7c4",
+ "transactionIndex": 157
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x666d71e6bc0f8f242ce1ed80bc4a3ce89d28808daa3ef439bf3a20dda33a69fb",
+ "blockNumber": 9280872,
+ "data": "0x0000000000000000000000000000000000000000000000022b1c8c1227a00000",
+ "date": "2020-01-14 18:53:39 UTC",
+ "logIndex": 162,
+ "timestamp": 1579028019,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x287312cdedb73a3ebf9c65428e12baa35e92f0aeb42d3158c1cd8401a9ced1e3",
+ "transactionIndex": 57
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x1f31e15ae35ccef12598e36f3b8fdc8d634818fbc0c58094cf9722aade4cda20",
+ "blockNumber": 9281237,
+ "data": "0x0000000000000000000000000000000000000000000000056bc75e2d63100000",
+ "date": "2020-01-14 20:13:05 UTC",
+ "logIndex": 136,
+ "timestamp": 1579032785,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x8e443d04c2492b45d633d08ad0df4b8c647851f9e81922f636a9aa616cf2537b",
+ "transactionIndex": 113
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 111,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x2b852a3dd391a485b2ad18214beba2980ee214bcf6deeeebb3aac22f00334b0e",
+ "transactionIndex": 82
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xa81e0f1112ebdc2c21164cd84f3d982235989828a1f48090f31725c4bb15e799",
+ "blockNumber": 9289048,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 00:53:42 UTC",
+ "logIndex": 114,
+ "timestamp": 1579136022,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x86bc7510b8e33b19b6599eb01b2ccc9edf59dc5cb13eb69fecffe5294f740611",
+ "transactionIndex": 84
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xc3c392d25e79391156e3ff44f2c4b7b259892736880df28793cda14332ed9e54",
+ "blockNumber": 9289058,
+ "data": "0x00000000000000000000000000000000000000000000000091b77e5e5d9a0000",
+ "date": "2020-01-16 00:56:12 UTC",
+ "logIndex": 93,
+ "timestamp": 1579136172,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf8fa03aba758a490a9223eb2ccd2cf381c209b509842c10461eb17485fafc4f2",
+ "transactionIndex": 47
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 137,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xf28a46739d063ef5bdd0c014f795a3386a6193e858f56bed3699eb2cf4f29295",
+ "transactionIndex": 134
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 140,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0xdfa86b79189e1aa683beb793f25c95da6c399e03aefbe72c3d6e02c32923067b",
+ "transactionIndex": 136
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 143,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x7b3f9afc686b6d02260ee537f660e4e35060b53943475be93d35f37823823608",
+ "transactionIndex": 138
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x65fe2dce762754a84def78f1167a24ae7748a61f9a095109da264779290821de",
+ "blockNumber": 9289120,
+ "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
+ "date": "2020-01-16 01:07:38 UTC",
+ "logIndex": 146,
+ "timestamp": 1579136858,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000df869fad6db91f437b59f1edefab319493d4c4ce"
+ ],
+ "transactionHash": "0x419b67b704693a6ca3827e7716715e3075c8a50e9812fede27203c551090fa8b",
+ "transactionIndex": 140
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xeaa37da531b363403ee4c68ea3d44afa3f3a5531c942bde7149f897b947773e8",
+ "blockNumber": 9318933,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-01-20 14:37:34 UTC",
+ "logIndex": 118,
+ "timestamp": 1579531054,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x1b69c20dfdbb248f0790d5798654eb4d79f19733a11869854bf3cb09310ab65c",
+ "transactionIndex": 107
+ },
+ {
+ "address": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "blockHash": "0x2f419dcdc0e017b00e6023b47a8882c5820833be83840ea4ce9dc8d98ad354ec",
+ "blockNumber": 9364175,
+ "data": "0x0000000000000000000000000000000000000000000000000000000000989680",
+ "date": "2020-01-27 13:06:31 UTC",
+ "logIndex": 37,
+ "timestamp": 1580130391,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000003c065f2713ea9b1e7ac563c11612ee93d3682c1a"
+ ],
+ "transactionHash": "0x4211b2d5c7ba460379e50f581294fab8ccf54b786914759116cf273e30a9210c",
+ "transactionIndex": 20
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x28283919bf2b2c00a692b62b8d583434657123cbbdff89987332993c7970d2fe",
+ "blockNumber": 9458061,
+ "data": "0x00000000000000000000000000000000000000000000001b1ae4d6e2ef500000",
+ "date": "2020-02-10 23:07:14 UTC",
+ "logIndex": 51,
+ "timestamp": 1581376034,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000b42616e266cb0c6d34c1434f09b95ed50bb551ed"
+ ],
+ "transactionHash": "0x8de0bf13d62b6f9435142bf5516e774fe780089d0c047751e3ce89cebdfac15a",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x67aa65df452652e2f7bbe9dcdf64eb3c9ca70eb3585241c0a44fa4a132e4ebb1",
+ "blockNumber": 9962076,
+ "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "date": "2020-04-28 16:29:49 UTC",
+ "logIndex": 54,
+ "timestamp": 1588091389,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x000000000000000000000000445b774c012c5418d6d885f6cbfeb049a7fe6558"
+ ],
+ "transactionHash": "0xc094104acb241f48fc3a7d7972e3331d6a5544a106052c1a3ca0ca1f209fd698",
+ "transactionIndex": 49
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0xba60d83b8de8f8af15c6de40c36a39a75b3b94a8cca228134e33cac402969cf2",
+ "blockNumber": 10279295,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-16 21:46:15 UTC",
+ "logIndex": 60,
+ "timestamp": 1592343975,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x4bbabbb0cf842635caea3dcc46107ca3dbf88fcb096ae7feaabcd6c039cafa65",
+ "transactionIndex": 33
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x733f333febe506bb353d8ad78d0a743330cd5b2eaa0f103968877d1e9265be28",
+ "blockNumber": 10290317,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 14:47:23 UTC",
+ "logIndex": 54,
+ "timestamp": 1592491643,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x717d21a307469b781a8231f177fcb2b2a683d537ddeea2da6eec69f4b12b1c42",
+ "transactionIndex": 46
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x8b5178b7a72f9f2169a6c0860ac1fe75c913404216282b6544abb45b1ffff757",
+ "blockNumber": 10292014,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-18 21:07:17 UTC",
+ "logIndex": 128,
+ "timestamp": 1592514437,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x54df753f5a53c2ee4ef08e6b03e5e44cf1ceab98459b9bacd6f3c7aeee5d54d8",
+ "transactionIndex": 92
+ },
+ {
+ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "blockHash": "0x5f464a4fec4ef7df373e331c1804662b2a64030f22735d611b7d939e14224f15",
+ "blockNumber": 10293554,
+ "data": "0x0000000000000000000000000000000000000000000000004563918244f40000",
+ "date": "2020-06-19 02:52:22 UTC",
+ "logIndex": 168,
+ "timestamp": 1592535142,
+ "topics": [
+ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
+ "0x000000000000000000000000f503017d7baf7fbc0fff7492b751025c6a78179b",
+ "0x0000000000000000000000007d655c57f71464b6f83811c55d84009cd9f5221c"
+ ],
+ "transactionHash": "0x510acf20070895b13a5e7fe050e4756a22c0f274ae7d6416a175a863c7cdcb23",
+ "transactionIndex": 109
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/apps/chifra/chifra_help_export.txt b/tests/gold/apps/chifra/chifra_help_export.txt
index 723d807954..8d1808f3ed 100644
--- a/tests/gold/apps/chifra/chifra_help_export.txt
+++ b/tests/gold/apps/chifra/chifra_help_export.txt
@@ -14,6 +14,7 @@ Flags:
-p, --appearances export a list of appearances
-r, --receipts export receipts instead of transactional data
-l, --logs export logs instead of transactional data
+ -O, --approvals export all token approval transactions for the given address
-t, --traces export traces instead of transactional data
-n, --neighbors export the neighbors of the given address
-A, --statements export only statements
diff --git a/tests/gold/apps/chifra/chifra_help_tokens.txt b/tests/gold/apps/chifra/chifra_help_tokens.txt
index 24cbc9c6a9..f2d7fbb665 100644
--- a/tests/gold/apps/chifra/chifra_help_tokens.txt
+++ b/tests/gold/apps/chifra/chifra_help_tokens.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_basic.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_basic.txt
new file mode 100644
index 0000000000..b08098d0f7
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_basic.txt
@@ -0,0 +1,379 @@
+tokens?addrs=trueblocks.eth&approvals
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct.txt
new file mode 100644
index 0000000000..5a93fb1363
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct.txt
@@ -0,0 +1,6 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%20trueblocks.eth&approvals&byAcct
+{
+ "errors": [
+ "The --by_acct option is not allowed with --approvals."
+ ]
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct_multiple.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct_multiple.txt
new file mode 100644
index 0000000000..fa20c8087f
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_by_acct_multiple.txt
@@ -0,0 +1,6 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%200xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c%20trueblocks.eth&approvals&byAcct
+{
+ "errors": [
+ "The --by_acct option is not allowed with --approvals."
+ ]
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_cache.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_cache.txt
new file mode 100644
index 0000000000..d7d381c578
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_cache.txt
@@ -0,0 +1,379 @@
+tokens?addrs=trueblocks.eth&approvals&cache
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_csv.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_csv.txt
new file mode 100644
index 0000000000..24c7b10957
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_csv.txt
@@ -0,0 +1,28 @@
+tokens?addrs=trueblocks.eth&approvals&fmt=csv&noHeader
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x0000000000004946c0e9f43f4dee607b0ef1fa1c,115792089237316195423570985008687907853269984665640564039457584007913129639930,11373477,168,141,1606917470,2020-12-02 13:57:50 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x1f9840a85d5af5bf1d1762f925bdaddc4201f984,79228162514264337593543950335,11373648,128,24,1606919718,2020-12-02 14:35:18 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x58b6a8a3302369daec383334672404ee733ab239,115792089237316195423570985008687907853269984665640564039453157405169617241697,12930151,175,80,1627691194,2021-07-31 00:26:34 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0x58b6a8a3302369daec383334672404ee733ab239,115792089237316195423570985008687907853269984665640564039455368446995741316059,12964803,310,117,1628164343,2021-08-05 11:52:23 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7,0x6b175474e89094c44da98b954eedeac495271d0f,100000000000000000000,12271496,379,171,1618848477,2021-04-19 16:07:57 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x445b774c012c5418d6d885f6cbfeb049a7fe6558,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,9962076,54,49,1588091389,2020-04-28 16:29:49 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,11373565,274,128,1606918695,2020-12-02 14:18:15 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7d655c57f71464b6f83811c55d84009cd9f5221c,0x6b175474e89094c44da98b954eedeac495271d0f,20000000000000000000,10957425,227,138,1601382590,2020-09-29 12:29:50 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x9d37f793e5ed4ebd66d62d505684cd9f756504f6,0x6b175474e89094c44da98b954eedeac495271d0f,19315600000000000000,10957469,115,76,1601383191,2020-09-29 12:39:51 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xabea9132b05a70803a4e85094fd0e1800777fbef,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,12085923,295,93,1616379984,2021-03-22 02:26:24 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xb42616e266cb0c6d34c1434f09b95ed50bb551ed,0x6b175474e89094c44da98b954eedeac495271d0f,0,9458061,51,46,1581376034,2020-02-10 23:07:14 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4,0x6b175474e89094c44da98b954eedeac495271d0f,0,10361939,111,101,1593449947,2020-06-29 16:59:07 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xdf869fad6db91f437b59f1edefab319493d4c4ce,0x6b175474e89094c44da98b954eedeac495271d0f,0,9289120,146,140,1579136858,2020-01-16 01:07:38 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe5b16563a38342a2c64eebb436bc2da4ec83a531,0x6b175474e89094c44da98b954eedeac495271d0f,0,12526741,248,94,1622257738,2021-05-29 03:08:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe5c783ee536cf5e63e792988335c4255169be4e1,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,12104313,249,135,1616624968,2021-03-24 22:29:28 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0x7a58c0be72be218b41c608b7fe7c5bb630736c71,115792089237316195423570985008687907853269984665640563539457584007913129639935,13694150,193,195,1637989830,2021-11-27 05:10:30 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x401f6c983ea34274ec46f84d70b31c151321188b,0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0,115792089237316195423570985008687907853269984665640564039332991149123129639935,13463339,43,50,1634850677,2021-10-21 21:11:17 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0,8860529,114,145,1572720358,2019-11-02 18:45:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a,0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315,0,9364175,37,20,1580130391,2020-01-27 13:06:31 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,12964831,219,290,1628164715,2021-08-05 11:58:35 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x881d40237659c251811cec9c364ef91dc08d300c,0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009,90071992547409910000000000,11501082,310,232,1608611385,2020-12-22 04:29:45 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x881d40237659c251811cec9c364ef91dc08d300c,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,115792089237316195423570985008687907853269984665640564039457584007913129639935,13071841,200,123,1629591598,2021-08-22 00:19:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7d655c57f71464b6f83811c55d84009cd9f5221c,0xd56dac73a4d6766464b38ec6d91eb45ce7457c44,3000000000000000000000,10957420,194,98,1601382550,2020-09-29 12:29:10 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x9d37f793e5ed4ebd66d62d505684cd9f756504f6,0xd56dac73a4d6766464b38ec6d91eb45ce7457c44,503830000000000000000,10957469,196,104,1601383191,2020-09-29 12:39:51 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x19992b52338b7b49de9679ae018a7027803db1aa,0xda007777d86ac6d989cc9f79a73261b3fc5e0da0,0,13013976,429,184,1628820012,2021-08-13 02:00:12 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0xdac17f958d2ee523a2206206994597c13d831ec7,115792089237316195423570985008687907853269984665640564039457584007913129639935,12757255,105,87,1625350452,2021-07-03 22:14:12 UTC
+
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json.txt
new file mode 100644
index 0000000000..901d2258bd
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json.txt
@@ -0,0 +1,379 @@
+tokens?addrs=trueblocks.eth&approvals&fmt=json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json_verbose.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json_verbose.txt
new file mode 100644
index 0000000000..cbaf443a28
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_fmt_json_verbose.txt
@@ -0,0 +1,430 @@
+tokens?addrs=trueblocks.eth&approvals&fmt=json&verbose
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c",
+ "tokenName": "Chi Gastoken by 1inch"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
+ "tokenName": "Uniswap (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "spenderName": "Everest",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "spenderName": "zkSync",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "spenderName": "Orochi DAO",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "spenderName": "HackFS",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "spenderName": "Gitcoin Pre Round 6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "spenderName": "EthCC 4 Regular Ticket",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71",
+ "tokenName": "ConstitutionDAO"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "spenderName": "Polygon (Matic): Plasma Bridge",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
+ "tokenName": "Matic Token"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "tokenName": "Dai Stablecoin v1.0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "spenderName": "MetaCartel Multisig and Friends",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "tokenName": "AlexMasmej"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ "tokenName": "USD Coin (L1)"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009",
+ "tokenName": "SingularDTV"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
+ "tokenName": "Wrapped Ether (L1)"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "spenderName": "DAppNode: SushiSwap NODEstaking",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0",
+ "tokenName": "DAppNode DAO Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7",
+ "tokenName": "Tether USD (L1)"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_multiple_accounts.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_multiple_accounts.txt
new file mode 100644
index 0000000000..95e4b52a3b
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_multiple_accounts.txt
@@ -0,0 +1,799 @@
+tokens?addrs=trueblocks.eth%200x054993ab0f2b1acc0fdc65405ee203b4271bebe6&approvals
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_no_zero.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_no_zero.txt
new file mode 100644
index 0000000000..959dc5d30c
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_no_zero.txt
@@ -0,0 +1,267 @@
+tokens?addrs=trueblocks.eth&approvals&noZero
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_blocks.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_blocks.txt
new file mode 100644
index 0000000000..f37f580099
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_blocks.txt
@@ -0,0 +1,141 @@
+tokens?addrs=trueblocks.eth&approvals&blocks=12000000-13000000
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1628632395,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12908066,
+ "lastAppDate": "2021-07-27 12:24:27 UTC",
+ "lastAppLogID": 157,
+ "lastAppTs": 1627388667,
+ "lastAppTxID": 79,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1628632395,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_token.txt b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_token.txt
new file mode 100644
index 0000000000..b32645e098
--- /dev/null
+++ b/tests/gold/tools/getTokens/api_tests/getTokens_approvals_with_token.txt
@@ -0,0 +1,491 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%20trueblocks.eth&approvals
+{
+ "data": [
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_basic.txt b/tests/gold/tools/getTokens/getTokens_approvals_basic.txt
new file mode 100644
index 0000000000..75b97356fd
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_basic.txt
@@ -0,0 +1,34 @@
+chifra tokens trueblocks.eth --approvals
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb42616e266cb0c6d34c1434f09b95ed50bb551ed 0x6b175474e89094c44da98b954eedeac495271d0f 0 9458061 51 46 1581376034 2020-02-10 23:07:14 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10361939 111 101 1593449947 2020-06-29 16:59:07 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xdf869fad6db91f437b59f1edefab319493d4c4ce 0x6b175474e89094c44da98b954eedeac495271d0f 0 9289120 146 140 1579136858 2020-01-16 01:07:38 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359 0 8860529 114 145 1572720358 2019-11-02 18:45:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a 0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 0 9364175 37 20 1580130391 2020-01-27 13:06:31 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 13013976 429 184 1628820012 2021-08-13 02:00:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_by_acct.txt b/tests/gold/tools/getTokens/getTokens_approvals_by_acct.txt
new file mode 100644
index 0000000000..80f689954d
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_by_acct.txt
@@ -0,0 +1,36 @@
+chifra tokens 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth --approvals --by_acct
+TEST[DATE|TIME] Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] ByAcct: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+Error: The --by_acct option is not allowed with --approvals.
+Usage:
+ chifra tokens [flags] [address...] [block...]
+
+Arguments:
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
+ blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
+
+Flags:
+ -O, --approvals returns all open approvals for the given address(es)
+ -p, --parts strings which parts of the token information to retrieve
+ One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
+ -b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
+ -c, --changes only report a balance when it changes from one block to the next
+ -z, --no_zero suppress the display of zero balance accounts
+ -o, --cache force the results of the query into the cache
+ -D, --decache removes related items from the cache
+ -x, --fmt string export format, one of [none|json*|txt|csv]
+ -v, --verbose enable verbose output
+ -h, --help display this help screen
+
+Notes:
+ - An address must be either an ENS name or start with '0x' and be forty-two characters long.
+ - Blocks is a space-separated list of values, a start-end range, a special, or any combination.
+ - If the token contract(s) from which you request balances are not ERC20 compliant, the results are undefined.
+ - If the queried node does not store historical state, the results are undefined.
+ - Special blocks are detailed under chifra when --list.
+ - If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_by_acct_multiple.txt b/tests/gold/tools/getTokens/getTokens_approvals_by_acct_multiple.txt
new file mode 100644
index 0000000000..0a60b1ac69
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_by_acct_multiple.txt
@@ -0,0 +1,36 @@
+chifra tokens 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c trueblocks.eth --approvals --by_acct
+TEST[DATE|TIME] Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] ByAcct: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+Error: The --by_acct option is not allowed with --approvals.
+Usage:
+ chifra tokens [flags] [address...] [block...]
+
+Arguments:
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
+ blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
+
+Flags:
+ -O, --approvals returns all open approvals for the given address(es)
+ -p, --parts strings which parts of the token information to retrieve
+ One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
+ -b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
+ -c, --changes only report a balance when it changes from one block to the next
+ -z, --no_zero suppress the display of zero balance accounts
+ -o, --cache force the results of the query into the cache
+ -D, --decache removes related items from the cache
+ -x, --fmt string export format, one of [none|json*|txt|csv]
+ -v, --verbose enable verbose output
+ -h, --help display this help screen
+
+Notes:
+ - An address must be either an ENS name or start with '0x' and be forty-two characters long.
+ - Blocks is a space-separated list of values, a start-end range, a special, or any combination.
+ - If the token contract(s) from which you request balances are not ERC20 compliant, the results are undefined.
+ - If the queried node does not store historical state, the results are undefined.
+ - Special blocks are detailed under chifra when --list.
+ - If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_cache.txt b/tests/gold/tools/getTokens/getTokens_approvals_cache.txt
new file mode 100644
index 0000000000..b190883f20
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_cache.txt
@@ -0,0 +1,35 @@
+chifra tokens trueblocks.eth --approvals --cache
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] Cache: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb42616e266cb0c6d34c1434f09b95ed50bb551ed 0x6b175474e89094c44da98b954eedeac495271d0f 0 9458061 51 46 1581376034 2020-02-10 23:07:14 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10361939 111 101 1593449947 2020-06-29 16:59:07 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xdf869fad6db91f437b59f1edefab319493d4c4ce 0x6b175474e89094c44da98b954eedeac495271d0f 0 9289120 146 140 1579136858 2020-01-16 01:07:38 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359 0 8860529 114 145 1572720358 2019-11-02 18:45:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a 0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 0 9364175 37 20 1580130391 2020-01-27 13:06:31 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 13013976 429 184 1628820012 2021-08-13 02:00:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_fmt_csv.txt b/tests/gold/tools/getTokens/getTokens_approvals_fmt_csv.txt
new file mode 100644
index 0000000000..9e1eca16a4
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_fmt_csv.txt
@@ -0,0 +1,34 @@
+chifra tokens trueblocks.eth --approvals --fmt csv --no_header
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] NoHeader: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: csv
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x0000000000004946c0e9f43f4dee607b0ef1fa1c,115792089237316195423570985008687907853269984665640564039457584007913129639930,11373477,168,141,1606917470,2020-12-02 13:57:50 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x1f9840a85d5af5bf1d1762f925bdaddc4201f984,79228162514264337593543950335,11373648,128,24,1606919718,2020-12-02 14:35:18 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x58b6a8a3302369daec383334672404ee733ab239,115792089237316195423570985008687907853269984665640564039453157405169617241697,12930151,175,80,1627691194,2021-07-31 00:26:34 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0x58b6a8a3302369daec383334672404ee733ab239,115792089237316195423570985008687907853269984665640564039455368446995741316059,12964803,310,117,1628164343,2021-08-05 11:52:23 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7,0x6b175474e89094c44da98b954eedeac495271d0f,100000000000000000000,12271496,379,171,1618848477,2021-04-19 16:07:57 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x445b774c012c5418d6d885f6cbfeb049a7fe6558,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,9962076,54,49,1588091389,2020-04-28 16:29:49 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7a250d5630b4cf539739df2c5dacb4c659f2488d,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,11373565,274,128,1606918695,2020-12-02 14:18:15 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7d655c57f71464b6f83811c55d84009cd9f5221c,0x6b175474e89094c44da98b954eedeac495271d0f,20000000000000000000,10957425,227,138,1601382590,2020-09-29 12:29:50 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x9d37f793e5ed4ebd66d62d505684cd9f756504f6,0x6b175474e89094c44da98b954eedeac495271d0f,19315600000000000000,10957469,115,76,1601383191,2020-09-29 12:39:51 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xabea9132b05a70803a4e85094fd0e1800777fbef,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,12085923,295,93,1616379984,2021-03-22 02:26:24 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xb42616e266cb0c6d34c1434f09b95ed50bb551ed,0x6b175474e89094c44da98b954eedeac495271d0f,0,9458061,51,46,1581376034,2020-02-10 23:07:14 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4,0x6b175474e89094c44da98b954eedeac495271d0f,0,10361939,111,101,1593449947,2020-06-29 16:59:07 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xdf869fad6db91f437b59f1edefab319493d4c4ce,0x6b175474e89094c44da98b954eedeac495271d0f,0,9289120,146,140,1579136858,2020-01-16 01:07:38 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe5b16563a38342a2c64eebb436bc2da4ec83a531,0x6b175474e89094c44da98b954eedeac495271d0f,0,12526741,248,94,1622257738,2021-05-29 03:08:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe5c783ee536cf5e63e792988335c4255169be4e1,0x6b175474e89094c44da98b954eedeac495271d0f,115792089237316195423570985008687907853269984665640564039457584007913129639935,12104313,249,135,1616624968,2021-03-24 22:29:28 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0x7a58c0be72be218b41c608b7fe7c5bb630736c71,115792089237316195423570985008687907853269984665640563539457584007913129639935,13694150,193,195,1637989830,2021-11-27 05:10:30 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x401f6c983ea34274ec46f84d70b31c151321188b,0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0,115792089237316195423570985008687907853269984665640564039332991149123129639935,13463339,43,50,1634850677,2021-10-21 21:11:17 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7,0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359,0,8860529,114,145,1572720358,2019-11-02 18:45:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a,0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315,0,9364175,37,20,1580130391,2020-01-27 13:06:31 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,12964831,219,290,1628164715,2021-08-05 11:58:35 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x881d40237659c251811cec9c364ef91dc08d300c,0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009,90071992547409910000000000,11501082,310,232,1608611385,2020-12-22 04:29:45 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x881d40237659c251811cec9c364ef91dc08d300c,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,115792089237316195423570985008687907853269984665640564039457584007913129639935,13071841,200,123,1629591598,2021-08-22 00:19:58 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x7d655c57f71464b6f83811c55d84009cd9f5221c,0xd56dac73a4d6766464b38ec6d91eb45ce7457c44,3000000000000000000000,10957420,194,98,1601382550,2020-09-29 12:29:10 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x9d37f793e5ed4ebd66d62d505684cd9f756504f6,0xd56dac73a4d6766464b38ec6d91eb45ce7457c44,503830000000000000000,10957469,196,104,1601383191,2020-09-29 12:39:51 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0x19992b52338b7b49de9679ae018a7027803db1aa,0xda007777d86ac6d989cc9f79a73261b3fc5e0da0,0,13013976,429,184,1628820012,2021-08-13 02:00:12 UTC
+14000000,1642114795,2022-01-13 22:59:55 UTC,0xf503017d7baf7fbc0fff7492b751025c6a78179b,0xe592427a0aece92de3edee1f18e0157c05861564,0xdac17f958d2ee523a2206206994597c13d831ec7,115792089237316195423570985008687907853269984665640564039457584007913129639935,12757255,105,87,1625350452,2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_fmt_json.txt b/tests/gold/tools/getTokens/getTokens_approvals_fmt_json.txt
new file mode 100644
index 0000000000..0a461c3ffc
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_fmt_json.txt
@@ -0,0 +1,375 @@
+chifra tokens trueblocks.eth --approvals --fmt json
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ]
+}
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_fmt_json_verbose.txt b/tests/gold/tools/getTokens/getTokens_approvals_fmt_json_verbose.txt
new file mode 100644
index 0000000000..9d74793ff7
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_fmt_json_verbose.txt
@@ -0,0 +1,427 @@
+chifra tokens trueblocks.eth --approvals --fmt json --verbose
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] Verbose: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c",
+ "tokenName": "Chi Gastoken by 1inch"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
+ "tokenName": "Uniswap (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "spenderName": "Everest",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "spenderName": "zkSync",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "spenderName": "Orochi DAO",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "spenderName": "HackFS",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "spenderName": "Gitcoin Pre Round 6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "spenderName": "EthCC 4 Regular Ticket",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71",
+ "tokenName": "ConstitutionDAO"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "spenderName": "Polygon (Matic): Plasma Bridge",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
+ "tokenName": "Matic Token"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "tokenName": "Dai Stablecoin v1.0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "spenderName": "MetaCartel Multisig and Friends",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "tokenName": "AlexMasmej"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ "tokenName": "USD Coin (L1)"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009",
+ "tokenName": "SingularDTV"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
+ "tokenName": "Wrapped Ether (L1)"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "spenderName": "DAppNode: SushiSwap NODEstaking",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0",
+ "tokenName": "DAppNode DAO Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7",
+ "tokenName": "Tether USD (L1)"
+ }
+ ]
+}
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_multiple_accounts.txt b/tests/gold/tools/getTokens/getTokens_approvals_multiple_accounts.txt
new file mode 100644
index 0000000000..e700caacf3
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_multiple_accounts.txt
@@ -0,0 +1,63 @@
+chifra tokens trueblocks.eth 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 --approvals
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb42616e266cb0c6d34c1434f09b95ed50bb551ed 0x6b175474e89094c44da98b954eedeac495271d0f 0 9458061 51 46 1581376034 2020-02-10 23:07:14 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10361939 111 101 1593449947 2020-06-29 16:59:07 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xdf869fad6db91f437b59f1edefab319493d4c4ce 0x6b175474e89094c44da98b954eedeac495271d0f 0 9289120 146 140 1579136858 2020-01-16 01:07:38 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359 0 8860529 114 145 1572720358 2019-11-02 18:45:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a 0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 0 9364175 37 20 1580130391 2020-01-27 13:06:31 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 13013976 429 184 1628820012 2021-08-13 02:00:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xe592427a0aece92de3edee1f18e0157c05861564 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 71675043520450277 12697303 279 99 1624544065 2021-06-24 14:14:25 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 1000000000000000000 13193257 390 227 1631213410 2021-09-09 18:50:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 13269886 51 45 1632237491 2021-09-21 15:18:11 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb42616e266cb0c6d34c1434f09b95ed50bb551ed 0x6b175474e89094c44da98b954eedeac495271d0f 0 9458061 51 46 1581376034 2020-02-10 23:07:14 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10367593 196 194 1593526558 2020-06-30 14:15:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10361939 111 101 1593449947 2020-06-29 16:59:07 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xdf869fad6db91f437b59f1edefab319493d4c4ce 0x6b175474e89094c44da98b954eedeac495271d0f 0 9289120 146 140 1579136858 2020-01-16 01:07:38 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359 0 8860529 114 145 1572720358 2019-11-02 18:45:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a 0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 0 9364175 37 20 1580130391 2020-01-27 13:06:31 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 13013976 429 184 1628820012 2021-08-13 02:00:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_no_zero.txt b/tests/gold/tools/getTokens/getTokens_approvals_no_zero.txt
new file mode 100644
index 0000000000..7e7892cf4f
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_no_zero.txt
@@ -0,0 +1,27 @@
+chifra tokens trueblocks.eth --approvals --no_zero
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] NoZero: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_with_blocks.txt b/tests/gold/tools/getTokens/getTokens_approvals_with_blocks.txt
new file mode 100644
index 0000000000..a244916f62
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_with_blocks.txt
@@ -0,0 +1,17 @@
+chifra tokens trueblocks.eth --approvals 12000000-13000000
+TEST[DATE|TIME] Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [12000000-13000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Parts: [all]
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 12908066 157 79 1627388667 2021-07-27 12:24:27 UTC
+12999999 1628632395 2021-08-10 21:53:15 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_approvals_with_token.txt b/tests/gold/tools/getTokens/getTokens_approvals_with_token.txt
new file mode 100644
index 0000000000..fb81bfca10
--- /dev/null
+++ b/tests/gold/tools/getTokens/getTokens_approvals_with_token.txt
@@ -0,0 +1,41 @@
+chifra tokens 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth --approvals
+TEST[DATE|TIME] Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+TEST[DATE|TIME] Blocks: [17000000]
+TEST[DATE|TIME] Approvals: true
+TEST[DATE|TIME] Caps: cache,decache
+TEST[DATE|TIME] Format: txt
+blockNumber timestamp date owner spender token allowance lastAppBlock lastAppLogID lastAppTxID lastAppTs lastAppDate
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xe592427a0aece92de3edee1f18e0157c05861564 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 71675043520450277 12697303 279 99 1624544065 2021-06-24 14:14:25 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 1000000000000000000 13193257 390 227 1631213410 2021-09-09 18:50:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 13269886 51 45 1632237491 2021-09-21 15:18:11 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10367593 196 194 1593526558 2020-06-30 14:15:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x0000000000004946c0e9f43f4dee607b0ef1fa1c 115792089237316195423570985008687907853269984665640564039457584007913129639930 11373477 168 141 1606917470 2020-12-02 13:57:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 79228162514264337593543950335 11373648 128 24 1606919718 2020-12-02 14:35:18 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xe592427a0aece92de3edee1f18e0157c05861564 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 71675043520450277 12697303 279 99 1624544065 2021-06-24 14:14:25 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039453157405169617241697 12930151 175 80 1627691194 2021-07-31 00:26:34 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x58b6a8a3302369daec383334672404ee733ab239 115792089237316195423570985008687907853269984665640564039455368446995741316059 12964803 310 117 1628164343 2021-08-05 11:52:23 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x6b175474e89094c44da98b954eedeac495271d0f 100000000000000000000 12271496 379 171 1618848477 2021-04-19 16:07:57 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x445b774c012c5418d6d885f6cbfeb049a7fe6558 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 9962076 54 49 1588091389 2020-04-28 16:29:49 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 11373565 274 128 1606918695 2020-12-02 14:18:15 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 1000000000000000000 13193257 390 227 1631213410 2021-09-09 18:50:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0x6b175474e89094c44da98b954eedeac495271d0f 20000000000000000000 10957425 227 138 1601382590 2020-09-29 12:29:50 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0x6b175474e89094c44da98b954eedeac495271d0f 19315600000000000000 10957469 115 76 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 13269886 51 45 1632237491 2021-09-21 15:18:11 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xabea9132b05a70803a4e85094fd0e1800777fbef 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12085923 295 93 1616379984 2021-03-22 02:26:24 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb42616e266cb0c6d34c1434f09b95ed50bb551ed 0x6b175474e89094c44da98b954eedeac495271d0f 0 9458061 51 46 1581376034 2020-02-10 23:07:14 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10367593 196 194 1593526558 2020-06-30 14:15:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4 0x6b175474e89094c44da98b954eedeac495271d0f 0 10361939 111 101 1593449947 2020-06-29 16:59:07 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xdf869fad6db91f437b59f1edefab319493d4c4ce 0x6b175474e89094c44da98b954eedeac495271d0f 0 9289120 146 140 1579136858 2020-01-16 01:07:38 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5b16563a38342a2c64eebb436bc2da4ec83a531 0x6b175474e89094c44da98b954eedeac495271d0f 0 12526741 248 94 1622257738 2021-05-29 03:08:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe5c783ee536cf5e63e792988335c4255169be4e1 0x6b175474e89094c44da98b954eedeac495271d0f 115792089237316195423570985008687907853269984665640564039457584007913129639935 12104313 249 135 1616624968 2021-03-24 22:29:28 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0x7a58c0be72be218b41c608b7fe7c5bb630736c71 115792089237316195423570985008687907853269984665640563539457584007913129639935 13694150 193 195 1637989830 2021-11-27 05:10:30 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x401f6c983ea34274ec46f84d70b31c151321188b 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 115792089237316195423570985008687907853269984665640564039332991149123129639935 13463339 43 50 1634850677 2021-10-21 21:11:17 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359 0 8860529 114 145 1572720358 2019-11-02 18:45:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a 0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 0 9364175 37 20 1580130391 2020-01-27 13:06:31 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 0 12964831 219 290 1628164715 2021-08-05 11:58:35 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009 90071992547409910000000000 11501082 310 232 1608611385 2020-12-22 04:29:45 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x881d40237659c251811cec9c364ef91dc08d300c 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 115792089237316195423570985008687907853269984665640564039457584007913129639935 13071841 200 123 1629591598 2021-08-22 00:19:58 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x7d655c57f71464b6f83811c55d84009cd9f5221c 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 3000000000000000000000 10957420 194 98 1601382550 2020-09-29 12:29:10 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x9d37f793e5ed4ebd66d62d505684cd9f756504f6 0xd56dac73a4d6766464b38ec6d91eb45ce7457c44 503830000000000000000 10957469 196 104 1601383191 2020-09-29 12:39:51 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x19992b52338b7b49de9679ae018a7027803db1aa 0xda007777d86ac6d989cc9f79a73261b3fc5e0da0 0 13013976 429 184 1628820012 2021-08-13 02:00:12 UTC
+14000000 1642114795 2022-01-13 22:59:55 UTC 0xf503017d7baf7fbc0fff7492b751025c6a78179b 0xe592427a0aece92de3edee1f18e0157c05861564 0xdac17f958d2ee523a2206206994597c13d831ec7 115792089237316195423570985008687907853269984665640564039457584007913129639935 12757255 105 87 1625350452 2021-07-03 22:14:12 UTC
diff --git a/tests/gold/tools/getTokens/getTokens_by_account_table.txt b/tests/gold/tools/getTokens/getTokens_by_account_table.txt
index ae32aa2e7d..960d35fb12 100644
--- a/tests/gold/tools/getTokens/getTokens_by_account_table.txt
+++ b/tests/gold/tools/getTokens/getTokens_by_account_table.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_cache_and_decache.txt b/tests/gold/tools/getTokens/getTokens_cache_and_decache.txt
index d502c000dd..77c9d6be92 100644
--- a/tests/gold/tools/getTokens/getTokens_cache_and_decache.txt
+++ b/tests/gold/tools/getTokens/getTokens_cache_and_decache.txt
@@ -11,10 +11,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -33,3 +34,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_caps_allowed.txt b/tests/gold/tools/getTokens/getTokens_caps_allowed.txt
index ff2710d56a..802b9f6e72 100644
--- a/tests/gold/tools/getTokens/getTokens_caps_allowed.txt
+++ b/tests/gold/tools/getTokens/getTokens_caps_allowed.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_caps_disallowed_2.txt b/tests/gold/tools/getTokens/getTokens_caps_disallowed_2.txt
index 2b67bd6248..cb58cdbdb3 100644
--- a/tests/gold/tools/getTokens/getTokens_caps_disallowed_2.txt
+++ b/tests/gold/tools/getTokens/getTokens_caps_disallowed_2.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_caps_disallowed_3.txt b/tests/gold/tools/getTokens/getTokens_caps_disallowed_3.txt
index c30437947a..40460b6a4a 100644
--- a/tests/gold/tools/getTokens/getTokens_caps_disallowed_3.txt
+++ b/tests/gold/tools/getTokens/getTokens_caps_disallowed_3.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_fmt_api.txt b/tests/gold/tools/getTokens/getTokens_fmt_api.txt
index 659abfd295..24760077a5 100644
--- a/tests/gold/tools/getTokens/getTokens_fmt_api.txt
+++ b/tests/gold/tools/getTokens/getTokens_fmt_api.txt
@@ -8,10 +8,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -30,3 +31,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_fmt_junk.txt b/tests/gold/tools/getTokens/getTokens_fmt_junk.txt
index e8507cd059..9823db14f7 100644
--- a/tests/gold/tools/getTokens/getTokens_fmt_junk.txt
+++ b/tests/gold/tools/getTokens/getTokens_fmt_junk.txt
@@ -8,10 +8,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -30,3 +31,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_help.txt b/tests/gold/tools/getTokens/getTokens_help.txt
index fd914ea97f..3f1f6e024a 100644
--- a/tests/gold/tools/getTokens/getTokens_help.txt
+++ b/tests/gold/tools/getTokens/getTokens_help.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_help_long.txt b/tests/gold/tools/getTokens/getTokens_help_long.txt
index 3aed16b94c..9b80305bcd 100644
--- a/tests/gold/tools/getTokens/getTokens_help_long.txt
+++ b/tests/gold/tools/getTokens/getTokens_help_long.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_help_verbose.txt b/tests/gold/tools/getTokens/getTokens_help_verbose.txt
index f576ce8c57..a6505bf146 100644
--- a/tests/gold/tools/getTokens/getTokens_help_verbose.txt
+++ b/tests/gold/tools/getTokens/getTokens_help_verbose.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_info_junk.txt b/tests/gold/tools/getTokens/getTokens_info_junk.txt
index f799f4aaad..69ec025def 100644
--- a/tests/gold/tools/getTokens/getTokens_info_junk.txt
+++ b/tests/gold/tools/getTokens/getTokens_info_junk.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_addr.txt b/tests/gold/tools/getTokens/getTokens_invalid_addr.txt
index 84caac32c4..759482bbb5 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_addr.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_addr.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_dollars.txt b/tests/gold/tools/getTokens/getTokens_invalid_dollars.txt
index 0b8404d7f6..e9972e768c 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_dollars.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_dollars.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_params_1.txt b/tests/gold/tools/getTokens/getTokens_invalid_params_1.txt
index da028fb44b..99d3909167 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_params_1.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_params_1.txt
@@ -7,10 +7,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -29,3 +30,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_params_2.txt b/tests/gold/tools/getTokens/getTokens_invalid_params_2.txt
index 0cf60d829c..3618a99248 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_params_2.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_params_2.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_params_3.txt b/tests/gold/tools/getTokens/getTokens_invalid_params_3.txt
index 1e4c1efa63..32ce18d11f 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_params_3.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_params_3.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_invalid_token.txt b/tests/gold/tools/getTokens/getTokens_invalid_token.txt
index bf53ebcf3e..bb578392ef 100644
--- a/tests/gold/tools/getTokens/getTokens_invalid_token.txt
+++ b/tests/gold/tools/getTokens/getTokens_invalid_token.txt
@@ -9,10 +9,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -31,3 +32,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_noparams.txt b/tests/gold/tools/getTokens/getTokens_noparams.txt
index c086d6abdf..575e47d96c 100644
--- a/tests/gold/tools/getTokens/getTokens_noparams.txt
+++ b/tests/gold/tools/getTokens/getTokens_noparams.txt
@@ -7,10 +7,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -29,3 +30,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_token_does_not_exist.txt b/tests/gold/tools/getTokens/getTokens_token_does_not_exist.txt
index fe91c767a1..26e7643b5a 100644
--- a/tests/gold/tools/getTokens/getTokens_token_does_not_exist.txt
+++ b/tests/gold/tools/getTokens/getTokens_token_does_not_exist.txt
@@ -8,10 +8,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -30,3 +31,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/getTokens_wei.txt b/tests/gold/tools/getTokens/getTokens_wei.txt
index 4d65b8b3c5..26804be69f 100644
--- a/tests/gold/tools/getTokens/getTokens_wei.txt
+++ b/tests/gold/tools/getTokens/getTokens_wei.txt
@@ -6,10 +6,11 @@ Usage:
chifra tokens [flags] [address...] [block...]
Arguments:
- addrs - two or more addresses (0x...), the first is an ERC20 token, balances for the rest are reported (required)
+ addrs - two or more addresses (one for --approvals), the first is an ERC20 token, balances for the rest are reported (required)
blocks - an optional list of one or more blocks at which to report balances, defaults to 'latest'
Flags:
+ -O, --approvals returns all open approvals for the given address(es)
-p, --parts strings which parts of the token information to retrieve
One or more of [ name | symbol | decimals | totalSupply | version | some | all ]
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
@@ -28,3 +29,4 @@ Notes:
- If the queried node does not store historical state, the results are undefined.
- Special blocks are detailed under chifra when --list.
- If the --parts option is not empty, all addresses are considered tokens and each token's attributes are presented.
+ - For the --approvals option, all open approvals are reported for each provided address.
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_basic.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_basic.txt
new file mode 100644
index 0000000000..0d62207197
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_basic.txt
@@ -0,0 +1,387 @@
+tokens?addrs=trueblocks.eth&approvals
+Args: [addrs=trueblocks.eth approvals]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct.txt
new file mode 100644
index 0000000000..11f8eb49c2
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct.txt
@@ -0,0 +1,14 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%20trueblocks.eth&approvals&byAcct
+Args: [addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth approvals byAcct]
+Opts: {"addrs":["0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth"],"approvals":true,"byAcct":true}
+Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+ByAcct: true
+Caps: cache,decache
+Format: json
+{
+ "errors": [
+ "The --by_acct option is not allowed with --approvals."
+ ]
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct_multiple.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct_multiple.txt
new file mode 100644
index 0000000000..0471314b42
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_by_acct_multiple.txt
@@ -0,0 +1,14 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%200xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c%20trueblocks.eth&approvals&byAcct
+Args: [addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c trueblocks.eth approvals byAcct]
+Opts: {"addrs":["0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c trueblocks.eth"],"approvals":true,"byAcct":true}
+Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xa0b86a33e6776b13c81a70e84dfe9ea82daa0e6c 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+ByAcct: true
+Caps: cache,decache
+Format: json
+{
+ "errors": [
+ "The --by_acct option is not allowed with --approvals."
+ ]
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_cache.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_cache.txt
new file mode 100644
index 0000000000..f529c3a27b
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_cache.txt
@@ -0,0 +1,388 @@
+tokens?addrs=trueblocks.eth&approvals&cache
+Args: [addrs=trueblocks.eth approvals cache]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"cache":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+Cache: true
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_csv.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_csv.txt
new file mode 100644
index 0000000000..0d62207197
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_csv.txt
@@ -0,0 +1,387 @@
+tokens?addrs=trueblocks.eth&approvals
+Args: [addrs=trueblocks.eth approvals]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json.txt
new file mode 100644
index 0000000000..0d62207197
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json.txt
@@ -0,0 +1,387 @@
+tokens?addrs=trueblocks.eth&approvals
+Args: [addrs=trueblocks.eth approvals]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json_verbose.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json_verbose.txt
new file mode 100644
index 0000000000..df2920341f
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_fmt_json_verbose.txt
@@ -0,0 +1,439 @@
+tokens?addrs=trueblocks.eth&approvals&verbose
+Args: [addrs=trueblocks.eth approvals verbose]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"verbose":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+Verbose: true
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c",
+ "tokenName": "Chi Gastoken by 1inch"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
+ "tokenName": "Uniswap (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239",
+ "tokenName": "Livepeer Token"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "spenderName": "Everest",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "spenderName": "Uniswap V2: Router 2",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "spenderName": "zkSync",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "spenderName": "Orochi DAO",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "spenderName": "HackFS",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "spenderName": "Gitcoin Pre Round 6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "spenderName": "EthCC 4 Regular Ticket",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f",
+ "tokenName": "Dai Stablecoin (L1)"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71",
+ "tokenName": "ConstitutionDAO"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "spenderName": "Polygon (Matic): Plasma Bridge",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
+ "tokenName": "Matic Token"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "spenderName": "Giveth Bridge",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
+ "tokenName": "Dai Stablecoin v1.0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "spenderName": "MetaCartel Multisig and Friends",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315",
+ "tokenName": "AlexMasmej"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ "tokenName": "USD Coin (L1)"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009",
+ "tokenName": "SingularDTV"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "spenderName": "Metamask: Swap Router",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
+ "tokenName": "Wrapped Ether (L1)"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "spenderName": "GitCoin Grant 6,7,8",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "spenderName": "Panvala Related: BatchZkSyncDeposit",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44",
+ "tokenName": "Panvala pan"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "spenderName": "DAppNode: SushiSwap NODEstaking",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0",
+ "tokenName": "DAppNode DAO Token"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "spenderName": "Uniswap V3 Router()",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7",
+ "tokenName": "Tether USD (L1)"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_multiple_accounts.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_multiple_accounts.txt
new file mode 100644
index 0000000000..4f21a7647b
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_multiple_accounts.txt
@@ -0,0 +1,806 @@
+tokens?addrs=trueblocks.eth%200x054993ab0f2b1acc0fdc65405ee203b4271bebe6&approvals
+Args: [addrs=trueblocks.eth 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 approvals]
+Opts: {"addrs":["trueblocks.eth 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6"],"approvals":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b 0x054993ab0f2b1acc0fdc65405ee203b4271bebe6]
+Blocks: [17000000]
+Approvals: true
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_no_zero.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_no_zero.txt
new file mode 100644
index 0000000000..9d0ddfa8cc
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_no_zero.txt
@@ -0,0 +1,276 @@
+tokens?addrs=trueblocks.eth&approvals&noZero
+Args: [addrs=trueblocks.eth approvals noZero]
+Opts: {"addrs":["trueblocks.eth"],"approvals":true,"noZero":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Parts: [all]
+NoZero: true
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_blocks.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_blocks.txt
new file mode 100644
index 0000000000..84742518d9
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_blocks.txt
@@ -0,0 +1,149 @@
+tokens?addrs=trueblocks.eth&approvals&blocks=12000000-13000000
+Args: [addrs=trueblocks.eth approvals blocks=12000000-13000000]
+Opts: {"addrs":["trueblocks.eth"],"blocks":["12000000-13000000"],"approvals":true}
+Addrs: [0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [12000000-13000000]
+Approvals: true
+Parts: [all]
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1628632395,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1628632395,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12908066,
+ "lastAppDate": "2021-07-27 12:24:27 UTC",
+ "lastAppLogID": 157,
+ "lastAppTs": 1627388667,
+ "lastAppTxID": 79,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1628632395,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 12999999,
+ "date": "2021-08-10 21:53:15 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1628632395,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}
diff --git a/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_token.txt b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_token.txt
new file mode 100644
index 0000000000..ca54379f1d
--- /dev/null
+++ b/tests/gold/tools/getTokens/sdk_tests/getTokens_approvals_with_token.txt
@@ -0,0 +1,498 @@
+tokens?addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6%20trueblocks.eth&approvals
+Args: [addrs=0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth approvals]
+Opts: {"addrs":["0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 trueblocks.eth"],"approvals":true}
+Addrs: [0x054993ab0f2b1acc0fdc65405ee203b4271bebe6 0xf503017d7baf7fbc0fff7492b751025c6a78179b]
+Blocks: [17000000]
+Approvals: true
+Caps: cache,decache
+Format: json
+{
+ "data": [
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639930",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373477,
+ "lastAppDate": "2020-12-02 13:57:50 UTC",
+ "lastAppLogID": 168,
+ "lastAppTs": 1606917470,
+ "lastAppTxID": 141,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
+ },
+ {
+ "allowance": "79228162514264337593543950335",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373648,
+ "lastAppDate": "2020-12-02 14:35:18 UTC",
+ "lastAppLogID": 128,
+ "lastAppTs": 1606919718,
+ "lastAppTxID": 24,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "71675043520450277",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12697303,
+ "lastAppDate": "2021-06-24 14:14:25 UTC",
+ "lastAppLogID": 279,
+ "lastAppTs": 1624544065,
+ "lastAppTxID": 99,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039453157405169617241697",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12930151,
+ "lastAppDate": "2021-07-31 00:26:34 UTC",
+ "lastAppLogID": 175,
+ "lastAppTs": 1627691194,
+ "lastAppTxID": 80,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039455368446995741316059",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964803,
+ "lastAppDate": "2021-08-05 11:52:23 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1628164343,
+ "lastAppTxID": 117,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x58b6a8a3302369daec383334672404ee733ab239"
+ },
+ {
+ "allowance": "100000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12271496,
+ "lastAppDate": "2021-04-19 16:07:57 UTC",
+ "lastAppLogID": 379,
+ "lastAppTs": 1618848477,
+ "lastAppTxID": 171,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9962076,
+ "lastAppDate": "2020-04-28 16:29:49 UTC",
+ "lastAppLogID": 54,
+ "lastAppTs": 1588091389,
+ "lastAppTxID": 49,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x445b774c012c5418d6d885f6cbfeb049a7fe6558",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11373565,
+ "lastAppDate": "2020-12-02 14:18:15 UTC",
+ "lastAppLogID": 274,
+ "lastAppTs": 1606918695,
+ "lastAppTxID": 128,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "1000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13193257,
+ "lastAppDate": "2021-09-09 18:50:10 UTC",
+ "lastAppLogID": 390,
+ "lastAppTs": 1631213410,
+ "lastAppTxID": 227,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "20000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957425,
+ "lastAppDate": "2020-09-29 12:29:50 UTC",
+ "lastAppLogID": 227,
+ "lastAppTs": 1601382590,
+ "lastAppTxID": 138,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "19315600000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 115,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 76,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13269886,
+ "lastAppDate": "2021-09-21 15:18:11 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1632237491,
+ "lastAppTxID": 45,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12085923,
+ "lastAppDate": "2021-03-22 02:26:24 UTC",
+ "lastAppLogID": 295,
+ "lastAppTs": 1616379984,
+ "lastAppTxID": 93,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9458061,
+ "lastAppDate": "2020-02-10 23:07:14 UTC",
+ "lastAppLogID": 51,
+ "lastAppTs": 1581376034,
+ "lastAppTxID": 46,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb42616e266cb0c6d34c1434f09b95ed50bb551ed",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10367593,
+ "lastAppDate": "2020-06-30 14:15:58 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1593526558,
+ "lastAppTxID": 194,
+ "owner": "0x054993ab0f2b1acc0fdc65405ee203b4271bebe6",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10361939,
+ "lastAppDate": "2020-06-29 16:59:07 UTC",
+ "lastAppLogID": 111,
+ "lastAppTs": 1593449947,
+ "lastAppTxID": 101,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xb9a6f2ff16812e9ad7e1f759fca4ecd7a3ab74e4",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9289120,
+ "lastAppDate": "2020-01-16 01:07:38 UTC",
+ "lastAppLogID": 146,
+ "lastAppTs": 1579136858,
+ "lastAppTxID": 140,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xdf869fad6db91f437b59f1edefab319493d4c4ce",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12526741,
+ "lastAppDate": "2021-05-29 03:08:58 UTC",
+ "lastAppLogID": 248,
+ "lastAppTs": 1622257738,
+ "lastAppTxID": 94,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5b16563a38342a2c64eebb436bc2da4ec83a531",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12104313,
+ "lastAppDate": "2021-03-24 22:29:28 UTC",
+ "lastAppLogID": 249,
+ "lastAppTs": 1616624968,
+ "lastAppTxID": 135,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe5c783ee536cf5e63e792988335c4255169be4e1",
+ "timestamp": 1642114795,
+ "token": "0x6b175474e89094c44da98b954eedeac495271d0f"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640563539457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13694150,
+ "lastAppDate": "2021-11-27 05:10:30 UTC",
+ "lastAppLogID": 193,
+ "lastAppTs": 1637989830,
+ "lastAppTxID": 195,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0x7a58c0be72be218b41c608b7fe7c5bb630736c71"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039332991149123129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13463339,
+ "lastAppDate": "2021-10-21 21:11:17 UTC",
+ "lastAppLogID": 43,
+ "lastAppTs": 1634850677,
+ "lastAppTxID": 50,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x401f6c983ea34274ec46f84d70b31c151321188b",
+ "timestamp": 1642114795,
+ "token": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 8860529,
+ "lastAppDate": "2019-11-02 18:45:58 UTC",
+ "lastAppLogID": 114,
+ "lastAppTs": 1572720358,
+ "lastAppTxID": 145,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7",
+ "timestamp": 1642114795,
+ "token": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 9364175,
+ "lastAppDate": "2020-01-27 13:06:31 UTC",
+ "lastAppLogID": 37,
+ "lastAppTs": 1580130391,
+ "lastAppTxID": 20,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x3c065f2713ea9b1e7ac563c11612ee93d3682c1a",
+ "timestamp": 1642114795,
+ "token": "0x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12964831,
+ "lastAppDate": "2021-08-05 11:58:35 UTC",
+ "lastAppLogID": 219,
+ "lastAppTs": 1628164715,
+ "lastAppTxID": 290,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
+ },
+ {
+ "allowance": "90071992547409910000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 11501082,
+ "lastAppDate": "2020-12-22 04:29:45 UTC",
+ "lastAppLogID": 310,
+ "lastAppTs": 1608611385,
+ "lastAppTxID": 232,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13071841,
+ "lastAppDate": "2021-08-22 00:19:58 UTC",
+ "lastAppLogID": 200,
+ "lastAppTs": 1629591598,
+ "lastAppTxID": 123,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x881d40237659c251811cec9c364ef91dc08d300c",
+ "timestamp": 1642114795,
+ "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ {
+ "allowance": "3000000000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957420,
+ "lastAppDate": "2020-09-29 12:29:10 UTC",
+ "lastAppLogID": 194,
+ "lastAppTs": 1601382550,
+ "lastAppTxID": 98,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x7d655c57f71464b6f83811c55d84009cd9f5221c",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "503830000000000000000",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 10957469,
+ "lastAppDate": "2020-09-29 12:39:51 UTC",
+ "lastAppLogID": 196,
+ "lastAppTs": 1601383191,
+ "lastAppTxID": 104,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x9d37f793e5ed4ebd66d62d505684cd9f756504f6",
+ "timestamp": 1642114795,
+ "token": "0xd56dac73a4d6766464b38ec6d91eb45ce7457c44"
+ },
+ {
+ "allowance": "0",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 13013976,
+ "lastAppDate": "2021-08-13 02:00:12 UTC",
+ "lastAppLogID": 429,
+ "lastAppTs": 1628820012,
+ "lastAppTxID": 184,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0x19992b52338b7b49de9679ae018a7027803db1aa",
+ "timestamp": 1642114795,
+ "token": "0xda007777d86ac6d989cc9f79a73261b3fc5e0da0"
+ },
+ {
+ "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
+ "blockNumber": 14000000,
+ "date": "2022-01-13 22:59:55 UTC",
+ "lastAppBlock": 12757255,
+ "lastAppDate": "2021-07-03 22:14:12 UTC",
+ "lastAppLogID": 105,
+ "lastAppTs": 1625350452,
+ "lastAppTxID": 87,
+ "owner": "0xf503017d7baf7fbc0fff7492b751025c6a78179b",
+ "spender": "0xe592427a0aece92de3edee1f18e0157c05861564",
+ "timestamp": 1642114795,
+ "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
+ }
+ ],
+ "meta": {
+ "client": "0xdeadbeef",
+ "finalized": "0xdeadbeef",
+ "staging": "0xdeadbeef",
+ "ripe": "0xdeadbeef",
+ "unripe": "0xdeadbeef",
+ "chainId": 1,
+ "networkId": 1,
+ "chain": "mainnet"
+ }
+}