This commit is contained in:
thloyi
2026-02-02 14:13:00 +08:00
parent c25c856a47
commit 0eb1628119
3 changed files with 269 additions and 9 deletions

View File

@@ -61,6 +61,13 @@ func (tx *Tx) Parser() error {
return errors.New("rawTx is nil")
}
accountList := tx.rawTx.getAccountList()
if tx.rawTx.Meta.Err == nil {
for _, acc := range tx.rawTx.Transaction.Message.Instructions {
if accountList[acc.ProgramIDIndex] == solana.VoteProgramID {
tx.Vote = true
}
}
}
tx.TxHash = (*[64]byte)((tx.rawTx.Transaction.Signatures[0][:]))
tx.Signer = tx.rawTx.GetSigner()