Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd442195c | |||
| 0633707142 | |||
| 8e49f01054 | |||
|
|
62cc64a90a |
@@ -39,6 +39,8 @@ var platformFeeAddresses = map[solana.PublicKey]string{
|
||||
solana.MustPublicKeyFromBase58("F4hJ3Ee3c5UuaorKAMfELBjYCjiiLH75haZTKqTywRP3"): PlatformBullX,
|
||||
solana.MustPublicKeyFromBase58("47hEzz83VFR23rLTEeVm9A7eFzjJwjvdupPPmX3cePqF"): PlatformBanana,
|
||||
solana.MustPublicKeyFromBase58("9yMwSPk9mrXSN7yDHUuZurAh1sjbJsfpUqjZ7SvVtdco"): PlatformTrojan,
|
||||
solana.MustPublicKeyFromBase58("92Med3qeK7duC5iiYsHX38H2f2twJfRsSx93oNrza2VH"): PlatformTrojan,
|
||||
solana.MustPublicKeyFromBase58("65gDv7pZQCZELsNpNYSFEBtNFpWZAbxmRFB6BGMqFkHH"): PlatformTrojan,
|
||||
solana.MustPublicKeyFromBase58("4mih95RmBqfHYvEfqq6uGGLp1Fr3gVS3VNSEa3JVRfQK"): PlatformRaybot,
|
||||
solana.MustPublicKeyFromBase58("3udvfL24waJcLhskRAsStNMoNUvtyXdxrWQz4hgi953N"): PlatformMoonshot,
|
||||
solana.MustPublicKeyFromBase58("3kxSQybWEeQZsMuNWMRJH4TxrhwoDwfv41TNMLRzFP5A"): PlatformMEVX,
|
||||
|
||||
@@ -177,8 +177,13 @@ func (tx *Tx) Parser() error {
|
||||
tx.Swaps = append(tx.Swaps, swap)
|
||||
}
|
||||
// tx.Swaps = append(tx.Swaps, swaps...)
|
||||
if ii == int(offset[0]) && j == int(offset[1]) {
|
||||
j = j + 1
|
||||
} else {
|
||||
j = int(offset[1])
|
||||
ii = int(offset[0])
|
||||
}
|
||||
|
||||
} else if p, exists := actionPrograms[innerProgramAccount]; exists {
|
||||
offset, err := p(tx, innerInstr, innersMap[i], [2]uint{uint(i), uint(j)})
|
||||
if err != nil {
|
||||
|
||||
2
pump.go
2
pump.go
@@ -79,6 +79,7 @@ type PumpCreateEvent struct {
|
||||
TokenTotalSupply uint64
|
||||
TokenProgram solana.PublicKey
|
||||
IsMayhemMode bool
|
||||
IsCashbackEnabled bool
|
||||
}
|
||||
|
||||
func CreateParser(tx *Tx, instr Instruction, innerInstructions InnerInstructions, offset [2]uint) ([]Swap, [2]uint, error) {
|
||||
@@ -148,6 +149,7 @@ func CreateParser(tx *Tx, instr Instruction, innerInstructions InnerInstructions
|
||||
BaseReserve: decimal.NewFromUint64(createEvent.RealTokenReserves),
|
||||
QuoteReserve: decimal.Zero,
|
||||
Mayhem: createEvent.IsMayhemMode,
|
||||
Cashback: createEvent.IsCashbackEnabled,
|
||||
UserBaseBalance: userBase,
|
||||
UserQuoteBalance: decimal.NewFromUint64(userQuote),
|
||||
EntryContract: entryContract,
|
||||
|
||||
5
rawtx.go
5
rawtx.go
@@ -326,7 +326,9 @@ func FromRpcTransactionWithMeta(tx rpc.TransactionWithMeta, blockTime *uint64, s
|
||||
}
|
||||
sTx.Meta.Fee = meta.Fee
|
||||
//sTx.Meta.InnerInstructions = meta.InnerInstructions
|
||||
|
||||
if meta.ComputeUnitsConsumed != nil {
|
||||
sTx.Meta.ComputeUnitsConsumed = *meta.ComputeUnitsConsumed
|
||||
}
|
||||
for _, innerInstr := range meta.InnerInstructions {
|
||||
var instrs []Instruction
|
||||
for _, instr := range innerInstr.Instructions {
|
||||
@@ -514,6 +516,7 @@ func intSliceFromUint16Slice(in []uint16) []int {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func getAtaIdxByOwner(result *RawTx, owner solana.PublicKey, mint solana.PublicKey) (int, error) {
|
||||
var preBalance *TokenBalance
|
||||
for _, pre := range result.Meta.PreTokenBalances {
|
||||
|
||||
Reference in New Issue
Block a user