Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c20e019b43 | ||
|
|
c7be7cf4fd |
@@ -160,6 +160,8 @@ const (
|
||||
Scorch
|
||||
VaultLiquidUnstake
|
||||
XOrca
|
||||
Quantum
|
||||
WhaleStreetV2
|
||||
)
|
||||
|
||||
var swapKindNames = [122]string{"Saber", "SaberAddDecimalsDeposit", "SaberAddDecimalsWithdraw", "TokenSwap", "Sencha", "Step", "Cropper",
|
||||
@@ -333,8 +335,20 @@ func decodeSwap(dec *bin.Decoder) (Swap, error) {
|
||||
case RaydiumLaunchlabBuy, RaydiumLaunchlabSell:
|
||||
return out, skipU64()
|
||||
// -------- Side(u8) payload --------
|
||||
case Serum, Aldrin, AldrinV2, Dradex, Openbook, Phoenix, OpenBookV2, TokenMill, Plasma, TesseraV, Futarchy, WhaleStreet, Manifest:
|
||||
case Serum, Aldrin, AldrinV2, Dradex, Openbook, Phoenix, OpenBookV2, TokenMill, Plasma, TesseraV, Futarchy,
|
||||
WhaleStreet, Manifest, Quantum:
|
||||
return out, skipU8()
|
||||
case WhaleStreetV2:
|
||||
if err := skipU8(); err != nil {
|
||||
return Swap{}, err
|
||||
}
|
||||
if err := skipU64(); err != nil {
|
||||
return Swap{}, err
|
||||
}
|
||||
if err := skipU64(); err != nil {
|
||||
return Swap{}, err
|
||||
}
|
||||
return out, nil
|
||||
// -------- MeteoraDlmmSwapV2: RemainingAccountsInfo --------
|
||||
case MeteoraDlmmSwapV2:
|
||||
return out, skipRemaining()
|
||||
|
||||
@@ -48,6 +48,7 @@ type TxSignal struct {
|
||||
CULimit uint32 `json:"cu_limit"`
|
||||
SWQoSAgent string `json:"swqos_agent"`
|
||||
SWQoSTips decimal.Decimal `json:"swqos_tips"`
|
||||
TableCnt int `json:"table_cnt"`
|
||||
|
||||
ExactSOL bool `json:"exact_in"`
|
||||
|
||||
|
||||
@@ -182,7 +182,8 @@ func ParseTransactionForEntries(ctx context.Context, slot uint64, entriesReader
|
||||
}
|
||||
|
||||
func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransaction, loader *AddressTables, parsed chan<- TxSignal, handlers map[solana.PublicKey]Handler) {
|
||||
if loader != nil && len(versioned.AddressTableLookups) > 0 {
|
||||
tableCnt := len(versioned.AddressTableLookups)
|
||||
if loader != nil && tableCnt > 0 {
|
||||
lookupTableOk := true
|
||||
for _, lookups := range versioned.AddressTableLookups {
|
||||
lookupTableOk = loader.FillToTx(&versioned, lookups.AccountKey, lookups.WritableIndexes)
|
||||
@@ -266,6 +267,7 @@ func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransac
|
||||
one.CULimit = cuLimit
|
||||
one.SWQoSAgent = swqosAgent
|
||||
one.SWQoSTips = swqosTips
|
||||
one.TableCnt = tableCnt
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user