-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are two types of errors related to purchases #50
Comments
滑点设置太小 |
How much slippage do I need to set, the current slippage basis is 500 |
Why do you speak English when you are Chinese? |
I've increased the slippage and no longer prompts "Error Code: TooMuchSolRequired. Error Number: 6002. Error Message: slippage: Too much SOL required to buy the given amount of tokens", but it will also prompt "failed: SBF program panicked" |
I'm a sophomore and I took on a development assignment online, but I had a little trouble, this is someone else's home field, so I speak English more easily for everyone to understand |
When I make a single purchase of more than 1.5sol:
SendTransactionError: Simulation failed.
Message: Transaction simulation failed: Error processing Instruction 1: Program failed to complete.
Logs:
[
"Program log: Instruction: InitializeAccount3",
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4188 of 984164 compute units",
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success",
"Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 20307 of 1000000 compute units",
"Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]",
"Program log: Instruction: Buy",
"Program log: panicked at programs/pump/src/lib.rs:152:9:\nattempt to subtract with overflow",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 18010 of 979693 compute units",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P failed: SBF program panicked"
].
Catch the
SendTransactionError
and callgetLogs()
on it for full details.at Connection.sendEncodedTransaction (chunk-XCAX5GFN.js?v=e792720a:14040:17)
at async Connection.sendRawTransaction (chunk-XCAX5GFN.js?v=e792720a:14007:24)
at async Connection.sendTransaction (chunk-XCAX5GFN.js?v=e792720a:13971:18)
at async sendTx2 (util.ts:515:24)
at async PumpFunSDK.oneCreateAndBuy (pumpfun.ts:306:18)
at async cj (index.tsx:290:28)
at async onClick (index.tsx:567:36)
When I add multiple purchases to a block, the total amount exceeds 1.5sol:
SendTransactionError: Simulation failed.
Message: Transaction simulation failed: Error processing Instruction 3: custom program error: 0x1772.
Logs:
[
"Program log: Instruction: InitializeAccount3",
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4188 of 177903 compute units",
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success",
"Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 21807 of 195239 compute units",
"Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]",
"Program log: Instruction: Buy",
"Program log: AnchorError thrown in programs/pump/src/lib.rs:136. Error Code: TooMuchSolRequired. Error Number: 6002. Error Message: slippage: Too much SOL required to buy the given amount of tokens..",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 18634 of 173432 compute units",
"Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P failed: custom program error: 0x1772"
].
Catch the
SendTransactionError
and callgetLogs()
on it for full details.at Connection.sendEncodedTransaction (chunk-XCAX5GFN.js?v=e792720a:14040:17)
at async Connection.sendRawTransaction (chunk-XCAX5GFN.js?v=e792720a:14007:24)
at async Connection.sendTransaction (chunk-XCAX5GFN.js?v=e792720a:13971:18)
at async sendTx2 (util.ts:515:24)
at async PumpFunSDK.oneCreateAndBuy (pumpfun.ts:306:18)
at async cj (index.tsx:290:28)
at async onClick (index.tsx:567:36)
I'm using devnet and I'd like to ask if this happens on mainnet
Looking forward to hearing from you
The text was updated successfully, but these errors were encountered: