2 stable releases
2.0.0 | Jun 25, 2024 |
---|---|
1.0.0 | Jun 20, 2024 |
#2 in #tokenfactory
31 downloads per month
Used in 3 crates
290KB
5K
SLoC
Astroport TokenFactory Tracker
Tracks balances of TokenFactory token holders using timestamps
InstantiateMsg
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
ExecuteMsg
This contract has no executable messages
QueryMsg
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
}
}
Dependencies
~15MB
~312K SLoC