Skip to content

Instantly share code, notes, and snippets.

@GEEGABYTE1
Created June 1, 2023 04:52
Show Gist options
  • Save GEEGABYTE1/1bbbd4fb9237ff477fc021bf02b67aaf to your computer and use it in GitHub Desktop.
Save GEEGABYTE1/1bbbd4fb9237ff477fc021bf02b67aaf to your computer and use it in GitHub Desktop.
Transaction History Length Alg
const data = await alchemy.core.getAssetTransfers({ // fetch Transaction Data
fromBlock:"0x0",
fromAddress: desiredWallet,
category: ["external", "internal", "erc20", "erc721", "erc1155"],
})
const transfers = data['transfers']
const bool_array = []
if (transfers.length > 5) {
bool_array.push(true)
} else {
bool_array.push(false)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment