Open ValarDragon opened 3 years ago
@ValarDragon Is there an easy way to check if an account is a module account, or should we create a list using the hacky method you mentioned and hardcode it in as a "blacklist"?
It feels as though the cleaner approach would be to have some sort of check while the lists are being generated so that we don't have to manually update the module account list if it changes (especially if superfluid staking accounts are considered modules in which case some change to the airdrop list generation process will be necessary).
Its unfortunately pretty inconvenient atm.
Basically you have to call GetAccount. Then you have to see if you can type-cast the account into a authtypes.ModuleAccount. (You should attempt type casting into *authtypes.ModuleAccount
. Its best to attempt type casting into both)
Its unfortunately pretty inconvenient atm.
Basically you have to call GetAccount. Then you have to see if you can type-cast the account into a authtypes.ModuleAccount. (You should attempt type casting into
*authtypes.ModuleAccount
. Its best to attempt type casting into both)
Would the idea be that if trying to typecast a given account into a authtypes.ModuleAccount throws an error, we keep that specific account in the list? e.g.:
for currentAccount in airdrop list {
acc = GetAccount(currentAccount)
err = *authtypes.ModuleAccount(acc)
if err != nil {break}
}
not break, but continue yeah
We should remove all module accounts from the produced airdrop balances. (https://github.com/osmosis-labs/osmosis/blob/main/cmd/osmosisd/cmd/balances_from_state_export.go)
Alot of the balances are from module accounts. (Unvested developer tokens, all bonded osmo, etc.). You can get the module accounts from a genesis file hackily as
cat state_export.json | grep -A 9 -B 1 /cosmos.auth.v1beta1.ModuleAccount > module_account_list.txt
We should parse all of those in golang, and remove them (except the community-pool) from the output derived balances.