Conversation
- for initialize_pool - for withdraw_pool_usdc
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/soteriateam/uxd-multisig-ui/A1iVC3Ukq5jLwyaZ12XVVKEAeRUJ |
|
I think we want to create them |
|
Maybe can do the redeem |
81b064d to
2a7f27d
Compare
src/components/Multisig.tsx
Outdated
| // pool_signer -- this is the multisig PDA : 35F3GaWyShU5N5ygYAFWDw6bGVNHnAHSe8RKzqRD2RkT | ||
| //? While testing we used to use a derivation from the uxp mint for creating this account | ||
| { | ||
| pubkey: multisigPDA, |
There was a problem hiding this comment.
shouldnt it be changed back to what you were doing before with derivation?
src/components/Multisig.tsx
Outdated
|
|
||
| export function MultisigInstance({ multisig }: { multisig: PublicKey }) { | ||
| const { multisigClient } = useWallet(); | ||
| const { multisigClient, uxdClient } = useWallet(); |
src/components/Multisig.tsx
Outdated
| const multisigPDA = new PublicKey("35F3GaWyShU5N5ygYAFWDw6bGVNHnAHSe8RKzqRD2RkT"); //? Can we actually get that from the multisigClient? | ||
| const uxpMint = new PublicKey('MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey');//new PublicKey("UXPhBoR3qG4UCiGNJfV7MqhHyFqKN68g45GoYvAeL2M"); | ||
| const usdcMint = new PublicKey("2wmVCSfPxGPjrnMMn7rchp4uaeoTqN39mXFC2zhPdri9"); //* That"s the mainnet one | ||
| const uxpMultisigTokenAccount = new PublicKey("GJgkVjjsYZeY2RLKcd7346A2dreykurTxkeNw6ysVQkc"); //! We should be able to get it from chain |
There was a problem hiding this comment.
This one needs to be the MNDE token account for the test, as the TMP change line 847
Comment and use 4BWt4xZ5okZRfd3KtXujjHJaHCLfjekJPLMdUzhFmSQW instead
src/components/Multisig.tsx
Outdated
| const usdcMint = new PublicKey("2wmVCSfPxGPjrnMMn7rchp4uaeoTqN39mXFC2zhPdri9"); //* That"s the mainnet one | ||
| const uxpMultisigTokenAccount = new PublicKey("GJgkVjjsYZeY2RLKcd7346A2dreykurTxkeNw6ysVQkc"); //! We should be able to get it from chain | ||
|
|
||
| function WithdrawUSDCPoolListItemDetails({ |
There was a problem hiding this comment.
Should just be withdrawIdoPool, code could stay generic and not use any mention of specific mint. For a later refactor I guess, let's just make this work
src/components/Multisig.tsx
Outdated
| // We use the uxp mint address as the seed, could use something else though. | ||
| const [_poolSigner] = await anchor.web3.PublicKey.findProgramAddress( | ||
| [uxpMint.toBuffer()], | ||
| UXDIDOProgramAdress |
There was a problem hiding this comment.
same comments about genericity (UXD Ido and uxp mint) but w/e
| }, | ||
| ]; | ||
| const transaction = new Keypair(); | ||
| const txSize = 1000; // todo |
There was a problem hiding this comment.
TX size might end up being bigger than 1000, if you still have your issue please double check this, shouldn't be though, but keep in mind
There was a problem hiding this comment.
looks ok at least until execution
| multisigClient.programId, | ||
| accounts, | ||
| data, | ||
| { |
There was a problem hiding this comment.
^ So you call the multisig program createTransaction, sending the multisigProgramID, the accounts this specific transaction expect, and the data serialized as expected by this transaction.
Below you should be doing the same but for the "nested" instruction.
as said on slack earlier. You pass the multisig programID but that should be the IDOprogramId. The account should be the account the Initialize account expect. And you should probably by passing some data too.
Remember to zoom out, and this "what is this instruction actually doing"
I'm not sure about where the data should be cause I don't have the IDE open, but please read the function signature of multisig. createTransaction and determine wether it should be passed where it is now or in the nesting
There was a problem hiding this comment.
also should have an result checking for the success to be dsplayed. non essential for now
There was a problem hiding this comment.
That one was quite the trick. See code update for how it is supposed to work
There was a problem hiding this comment.
yeah will do later, I'm planning maybe a small refactor tonight for more clarity and separating components into their own file, easier to navigate
src/components/Multisig.tsx
Outdated
| { | ||
| pubkey: poolSigner, | ||
| isWritable: false, | ||
| isSigner: true, |
src/components/Multisig.tsx
Outdated
| }, | ||
| // uxp_mint -- This is UXP UXPhBoR3qG4UCiGNJfV7MqhHyFqKN68g45GoYvAeL2M token () https://solscan.io/token/UXPhBoR3qG4UCiGNJfV7MqhHyFqKN68g45GoYvAeL2M () | ||
| { | ||
| pubkey: new PublicKey("UXPhBoR3qG4UCiGNJfV7MqhHyFqKN68g45GoYvAeL2M"), |
There was a problem hiding this comment.
Please no hardcoded variable. How do we keep up with this. I wanna rewrite it already, feel like so easy to get mixed up
There was a problem hiding this comment.
also same as above, please prepare variable with explicit names before and assign the value in one place, there here use said variable for explicitness so we can reason
src/components/Multisig.tsx
Outdated
| uxpMint, | ||
| poolUxp, | ||
| poolUsdc, | ||
| creatorUxp: uxpMultisigTokenAccount, |
…gramId during tx signature
…instructions array
|
@ThomasProust Not sure what's the state of this PR. Can we maybe close it is it's stale/unused, and add the close to another one/remove/hide depending on what's available. I don't think we have the time not to make a proper tool |

Need to check that the accounts arrays are correct.
At the moment we are creating the required accounts live (they are just logged into the console).
Maybe we prefer to initialize them manually beforehand and input them via the form?