Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7869

"User token input does not match amm" error [duplicate]

$
0
0

i getting the below error, how fix it?

Operation (SWAP):

USDC(EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) ->SOL(So11111111111111111111111111111111111111112)

Liquidity Pool(Raydium): 58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2

Error:

Transaction simulation failed: Error processing Instruction 2: customprogram error: 0x2a

Logs:

0: "Program 11111111111111111111111111111111 invoke [1]" 1: "Program11111111111111111111111111111111 success" 2: "ProgramTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]" 3: "Programlog: Instruction: InitializeAccount" 4: "ProgramTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3442 of 800000compute units" 5: "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DAsuccess" 6: "Program 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8invoke [1]" 7: "Program log: calc_exact len:0" 8: "Programconsumption: 782345 units remaining" 9: "Program consumption: 782239units remaining" 10: "Program log: Error: User token input does notmatch amm" 11: "Program 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8consumed 15275 of 796558 compute units" 12: "Program675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 failed: custom programerror: 0x2a"


My scenario is SWAP from USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) to SOL (So1111111111111111111111111111111111112), the swap is executed in script using @raydium-io/raydium-sdk (version: 1.1.0-beta. 39 ) and @solana/web3.js(version : 1.63.1).

Transaction data:

{"recentBlockhash": "2k2HT595PjzDAcjJ6eqmF64bsQnKGfrNVQyESQ2A7yZr","feePayer": "8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","nonceInfo": null,"instructions": [        {"keys": [                {"pubkey": "8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","isSigner": true,"isWritable": true                },                {"pubkey": "GBa6dxiVfo7ZG56HFDhf1SRBLcBKuRSMgaWcKHDQf9jX","isSigner": true,"isWritable": true                }            ],"programId": "11111111111111111111111111111111","data": [                0,                0,                0,                0,                240,                29,                31,                0,                0,                0,                0,                0,                165,                0,                0,                0,                0,                0,                0,                0,                6,                221,                246,                225,                215,                101,                161,                147,                217,                203,                225,                70,                206,                235,                121,                172,                28,                180,                133,                237,                95,                91,                55,                145,                58,                140,                245,                133,                126,                255,                0,                169            ]        },        {"keys": [                {"pubkey": "GBa6dxiVfo7ZG56HFDhf1SRBLcBKuRSMgaWcKHDQf9jX","isSigner": true,"isWritable": true                },                {"pubkey": "So11111111111111111111111111111111111111112","isSigner": false,"isWritable": false                },                {"pubkey": "8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","isSigner": true,"isWritable": true                },                {"pubkey": "SysvarRent111111111111111111111111111111111","isSigner": false,"isWritable": false                }            ],"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","data": [                1            ]        },        {"keys": [                {"pubkey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","isSigner": false,"isWritable": false                },                {"pubkey": "EJQxe3iyrGdFteR3vU6ZDaiy4xvB2Aj9AQCFhLCjNtJH","isSigner": false,"isWritable": true                },                {"pubkey": "5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1","isSigner": false,"isWritable": false                },                {"pubkey": "FRgSPA6MLFaS1B1mZeh4NiLMwmNrE5T7b8MAjxrXfVQN","isSigner": false,"isWritable": true                },                {"pubkey": "AtTCGn6VeYgbfxS3EmSf7kS9KHFZTXw7VKGxhtLmpgDd","isSigner": false,"isWritable": true                },                {"pubkey": "8tyN7yuKiHBvdLqgv1HwKAsApe9Y6XW6Jg4Prh585CRQ","isSigner": false,"isWritable": true                },                {"pubkey": "7BhGoVxPZrCofU2UE2bwKjmP77rGRDbtkygCzSNY9r3M","isSigner": false,"isWritable": true                },                {"pubkey": "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX","isSigner": false,"isWritable": false                },                {"pubkey": "Fnm1bPXURtoS7aqytpigeCpzccWbu9QuhbNsDTcq9VLL","isSigner": false,"isWritable": true                },                {"pubkey": "9tcPaHpysj5nWynBp2pLJzEZdj1ohcnBFGHLL7NK1yht","isSigner": false,"isWritable": true                },                {"pubkey": "9MfhfM7UZpyVN56NLypjdCk5b7biiSVxNBCpaoZN63bv","isSigner": false,"isWritable": true                },                {"pubkey": "6mWQMjT3qTpPgko9qTHU6a3fw3mkSXb1PVvr744nW7ap","isSigner": false,"isWritable": true                },                {"pubkey": "S8JCjapwzADtvNLoVmN4kgoiVB5yTudDaByy6Z3pgt9","isSigner": false,"isWritable": true                },                {"pubkey": "AhugP4JnFezxrDSLFmQzvS4kqg4t6Ve3SSK9PXCJSG2G","isSigner": false,"isWritable": true                },                {"pubkey": "4MPrQFswSu5zgHqovRhRUEtLLZ6jNp4rsSwb17HvZ7G2","isSigner": false,"isWritable": false                },                {"pubkey": "PFATeyRkDhqCa1sspMxr1ZyyFiPhQC77LQtXpYbvZQc","isSigner": false,"isWritable": true                },                {"pubkey": "GBa6dxiVfo7ZG56HFDhf1SRBLcBKuRSMgaWcKHDQf9jX","isSigner": true,"isWritable": true                },                {"pubkey": "8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","isSigner": true,"isWritable": true                }            ],"programId": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8","data": [                11,                173,                4,                213,                2,                0,                0,                0,                0,                89,                78,                54,                33,                0,                0,                0,                0            ]        },        {"keys": [                {"pubkey": "GBa6dxiVfo7ZG56HFDhf1SRBLcBKuRSMgaWcKHDQf9jX","isSigner": true,"isWritable": true                },                {"pubkey": "Cnko8X8ZYUjMVUCzajkXs2hqMwRaqbXjD4ugLMHGNZtF","isSigner": false,"isWritable": true                },                {"pubkey": "8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","isSigner": true,"isWritable": true                }            ],"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","data": [                9            ]        }    ],"signers": ["8spngYvecZYQiHuruZaMtDazqwu35wF2AAJAxRQG9vuU","GBa6dxiVfo7ZG56HFDhf1SRBLcBKuRSMgaWcKHDQf9jX"    ]}

Viewing all articles
Browse latest Browse all 7869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>