-
Notifications
You must be signed in to change notification settings - Fork 41
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
update place_and_take for perp and spot #154
Conversation
@@ -143,7 +146,7 @@ def __init__( | |||
|
|||
self.tx_params = tx_params | |||
|
|||
self.tx_version = tx_version if tx_version is not None else Legacy | |||
self.tx_version = tx_version if tx_version is not None else 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaulting to version 0 tx because of LUTs
src/driftpy/drift_client.py
Outdated
StandardTxSender( | ||
self.connection, | ||
opts, | ||
blockhash_commitment=tx_sender_blockhash_commitment if tx_sender_blockhash_commitment is not None else 'finalized') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaulting to 'finalized' for fetching blockhash because of too many 'blockhash not found' errors
src/driftpy/drift_client.py
Outdated
remaining_accounts.append(AccountMeta(fulfillment_config.phoenix_quote_vault, is_writable=True, is_signer=False)) | ||
remaining_accounts.append(AccountMeta(self.get_spot_market_account(market_index).vault, is_writable=True, is_signer=False)) | ||
remaining_accounts.append(AccountMeta(self.get_spot_market_account(QUOTE_SPOT_MARKET_INDEX).vault, is_writable=True, is_signer=False)) | ||
remaining_accounts.append(AccountMeta(TOKEN_PROGRAM_ID, is_writable=False, is_signer=False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: cross reference and double check with https://github.com/drift-labs/protocol-v2/blob/4eb477f24f9f03dec39e299026772f5d3c10365b/sdk/src/driftClient.ts#L3607-L3790
No description provided.