add instr sol transfer and cufee

This commit is contained in:
thloyi
2026-01-05 11:46:54 +08:00
parent 91b70e23d6
commit dd76b04b19
3 changed files with 26 additions and 9 deletions

View File

@@ -31,9 +31,16 @@ func TransferParser(result *RawTx, instruction Instruction, offset [2]uint, tx *
}
var lamports uint64 = binary.LittleEndian.Uint64(decodeData)
//from := result.accountList[result.Transaction.Message.Instructions[offset[0]].Accounts[0]]
from := result.accountList[result.Transaction.Message.Instructions[offset[0]].Accounts[0]]
to := result.accountList[instruction.Accounts[1]]
if offset[1] == 0 {
tx.Transfer = append(tx.Transfer, SolTransfer{
From: from,
To: to,
Amount: decimal.NewFromInt(int64(lamports)), // solana decimals
})
}
// load platform by to address
platform, ok := platformFeeAddresses[to]
if ok {