Crates.io | astroport-tokenfactory-tracker |
lib.rs | astroport-tokenfactory-tracker |
version | 2.0.0 |
source | src |
created_at | 2024-06-20 10:43:25.105685 |
updated_at | 2024-06-25 09:55:16.648324 |
description | Cosmos Bank hook for tokenfactory tokens |
homepage | https://astroport.fi |
repository | https://github.com/astroport-fi/astroport |
max_upload_size | |
id | 1277855 |
size | 255,584 |
Tracks balances of TokenFactory token holders using timestamps
Initializes the contract with the TokenFactory denom to track as well as the TokenFactory module address.
You can find the module address by using
wasmd query auth module-account tokenfactory
Instantiate message
{
"tracked_denom": "factory/creator/denom",
"tokenfactory_module_address": "wasm19ejy8n9qsectrf4semdp9cpknflld0j6el50hx"
}
Once the contract is instantiated it will only track the denom specified. Attach this contract to TokenFactory (only admin can do this)
wasmd tx tokenfactory set-beforesend-hook factory/creator/denom wasm1trackingcontract
This contract has no executable messages
balance_at
Query the balance of an address at a given timestamp in seconds. If timestamp is not set, it will return the value at the current timestamp.
{
"balance_at": {
"address": "wasm1...addr",
"timestamp": 1698745413
}
}
total_supply_at
Query the total supply at a given timestamp in seconds. If timestamp is not set, it will return the value at the current timestamp.
{
"total_supply_at": {
"timestamp": 1698745413
}
}