Balance changes estimated in transaction not accurate for complex instructions #207
iseedouble
started this conversation in
General
Replies: 1 comment 1 reply
-
@iseedouble Do you have a link where I can attempt to reproduce this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am creating an application to create an openbook market id. However when signing the transaction with the phamtom wallet, I've noticed that the estimated cost of the transaction is not correct. The costs is supposed to be around 2.8 SOL for rent fees, but I get about 0.004 SOL instead. This error occurs when the transaction has this instruction:
DexInstructions.initializeMarket({ market: market.publicKey, requestQueue: requestQueue.publicKey, eventQueue: eventQueue.publicKey, bids: bids.publicKey, asks: asks.publicKey, baseVault: baseVault.publicKey, quoteVault: quoteVault.publicKey, baseMint, quoteMint, baseLotSize: new BN(baseLotSize), quoteLotSize: new BN(quoteLotSize), feeRateBps, vaultSignerNonce, quoteDustThreshold, programId: dexProgramId, authority: undefined, })
https://github.com/openbook-dex/openbook-ts/blob/d3f05744aa37d5532a0d6ecd6112cc5b7278ed85/packages/openbook/src/instructions.js#L172
If I remove this instruction the costs is well calculated for the other instructions which are some SystemProgram.createAccount instructions
Anyone knows why this is happening?
Beta Was this translation helpful? Give feedback.
All reactions