Closed moul closed 1 year ago
yes, it should definitely be omitted, evmos found this issue when it finished its airdrop.
a snippet to get the escrow address:
import ( "crypto/sha256" "fmt"
"github.com/gnolang/gno/pkgs/bech32"
)
func GetEscrowAddress(portID, channelID string) (string, error) { contents := fmt.Sprintf("%s/%s", portID, channelID)
preImage := []byte("ics20-1")
preImage = append(preImage, 0)
preImage = append(preImage, contents...)
hash := sha256.Sum256(preImage)
return bech32.Encode("cosmos", hash[:20])
}
// GetEscrowAddress("transfer", "channel-141")
I find another edge case to manage: escrow accounts, i.e.
https://www.mintscan.io/cosmos/account/cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf (looks like to be for osmosis).
~5M atom on may 20th. ~9M atom on the airdrop file.
cat snapshot_consolidated_10562840.json | jq '.[] | select(.address=="cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf")'
I suggest that we just skip them completely.