add instr sol transfer and cufee
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user