This commit is contained in:
thloyi
2025-11-27 16:39:01 +08:00
parent 1f63a3a18f
commit d8e8d7ba89
2 changed files with 16 additions and 0 deletions

View File

@@ -17,6 +17,17 @@ var actionPrograms = map[solana.PublicKey]actionParser{
budgGetProgram: budgetParser,
}
func ParseRawTx(rawTx *RawTx) (*Tx, error) {
tx := &Tx{
rawTx: rawTx,
}
err := tx.Parser()
if err != nil {
return nil, err
}
return tx, nil
}
func (tx *Tx) Parser() error {
if tx.rawTx == nil {
return errors.New("rawTx is nil")