Skip to content

[Bug] Error running the example given by jupiter #54

Description

@miaobei5555

Error running the example given by jupiter

`IDexAggregator dex = new JupiterDexAg(account_1.PublicKey);

TokenData tokenA = await dex.GetTokenBySymbol("SOL");
TokenData tokenB = await dex.GetTokenBySymbol("USDC");

SwapQuoteAg swapQuote = await dex.GetSwapQuote(
tokenA.MintAddress,
tokenB.MintAddress,
DecimalUtil.ToUlong(5m, tokenB.Decimals),
SwapMode.ExactOut
);
var quote = DecimalUtil.FromBigInteger(swapQuote.InputAmount, tokenA.Decimals);

Transaction tx = await dex.Swap(swapQuote);

var result = await SignAndSendTransaction(tx, account_1);

Console.WriteLine(result);`

Error Content
Transaction simulation failed: Error processing Instruction 2: Provided seeds do not result in a valid address

Detailed Information
{"jsonrpc":"2.0","error":{"code":-32002,"message":"Transaction simulation failed: Error processing Instruction 2: Provided seeds do not result in a valid address","data":{"accounts":null,"err":{"InstructionError":[2,"InvalidSeeds"]},"innerInstructions":null,"logs":["Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [1]","Program log: CreateIdempotent","Program log: Error: Associated address does not match seed derivation","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 4960 of 1399700 compute units","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL failed: Provided seeds do not result in a valid address"],"returnData":null,"unitsConsumed":5260}},"id":0}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions