Skip to content
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

add optional position mint params #121

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

fuzzyyeti
Copy link
Contributor

Add an optional parameter to specify the positionMint instead of generating it internally. This allows the ability to assign an ephemeral keypair that can be saved for later execution in the case of a multi-sig wallet.

Copy link
Collaborator

@yugure-orca yugure-orca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return value of getEphemeralSigners

Could you check the return value of getEphemeralSigners method ?

As far as I read the documentation, the return value is Pubkey.
If it is a PDA, the private key should not exist theoretically.

Checking if a method returns a different value each time

It is explained that this function is for use with createAccount, so we should be able to create an account.

However, we don't want the same value returned over and over again. Could you please ask with the Squads team to see if it changes each time or if it can be changed.

If we explain to them what we want to do, they will probably have some good advice.

sdk/src/impl/whirlpool-impl.ts Show resolved Hide resolved
Copy link
Collaborator

@yugure-orca yugure-orca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit.

@@ -1,6 +1,6 @@
import { Address } from "@coral-xyz/anchor";
import { Percentage, TransactionBuilder } from "@orca-so/common-sdk";
import { PublicKey } from "@solana/web3.js";
import {Keypair, PublicKey } from "@solana/web3.js";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Keypair is no longer used.

@@ -276,14 +281,15 @@ export class WhirlpoolImpl implements Whirlpool {
`upper tick ${tickUpper} is not an initializable tick for tick-spacing ${whirlpool.tickSpacing}`
);

const positionMintKeypair = Keypair.generate();
const positionMintKeypair = Keypair.generate();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: This change is not needed (" " added)

@yugure-orca
Copy link
Collaborator

yugure-orca commented Nov 13, 2023

Note

  • The ephemeral signer is the same each time you ask for it 👉until it is used.👈
  • For now, Ephemeral signers function is specific for Squads because its PR is just draft state and not merged into wallet standard yet.

see also

@fuzzyyeti fuzzyyeti merged commit 2dfb9f7 into orca-so:main Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants