Closed 0xJohnnyboy closed 2 years ago
Thanks for all the detail and the clear description in the bug report, this makes it much easier to troubleshoot.
The splTokenAccount
should be the SPL token account address where you want to receive the SPL tokens from mint proceeds. You didn't specify an actual address but from the variable you used it looks like you're using your wallet address instead of an actual SPL token account. If that's the case, you can just leave that value blank and Sugar will create the associated token account for your user wallet by default (user wallet = signing keypair running the command).
That's likely the issue. If you can try putting in an actual SPL token address or leaving it blank and rerunning, let me know if that works. If not, we'll do more troubleshooting.
Oh sorry that wasn't really clear, I'm actually using an address, that's just a placeholder to say what I'm using because I figured an arbitrary base58 chain wouldn't mean anything for debugging purposes. I'm using the same wallet address that I use in creators
field.
I'll edit the original post right now.
I didn't know that Sugar would create the account I'll try that ASAP this evening and I'll let you know.
Leaving the splTokenAccount
field blank solved it for me, thanks @samuelvanderwaal 🎉 🙏
But if I were to put one, what should I put exactly ? Since this is not part of Sugar docs, I referred to the CMV2 docs which state the following:
splTokenAccount | PublicKey | SPL token wallet to receive proceedings from SPL token payments |
---|
This may be candid, but I thought I just had to put my wallet address. I assume the spl-token create-account {json file}
creates the account needed for the keypair in solana config
. Am I right ?
Leaving the
splTokenAccount
field blank solved it for me, thanks @samuelvanderwaal tada prayBut if I were to put one, what should I put exactly ? Since this is not part of Sugar docs, I referred to the CMV2 docs which state the following: splTokenAccount PublicKey SPL token wallet to receive proceedings from SPL token payments
This may be candid, but I thought I just had to put my wallet address. I assume the
spl-token create-account {json file}
creates the account needed for the keypair insolana config
. Am I right ?
Yeah, the description here isn't the best. Sugar is currently expecting either: 1) a blank field or 2) an actual SPL token account.
If you leave the field blank it creates the associated SPL token account for your wallet. If you provide a specific SPL token account, it uses that to send received SPL token funds to.
In case the confusion here is around SPL token accounts:
Native Solana wallets can only hold SOL, not SPL tokens. SPL tokens are always stored at a token account that is specific to the mint for that SPL token. Associated token accounts are ways to deterministically derive the token account for any given wallet. You can read more about that here.
Thanks for the in depth explanation. I'm closing the issue since I can confirm this works fully, on devnet, mainnet with a spl-token account.
Issue description
Hi,
I tried to set up a CM (on devnet) with an Spl token, basically so that people can mint using USDC. But when using the
launch
command, I get an error (see relevant log output section).I used this Spl Token mint address at first
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
which is USDC, and then I created a token account using thespl-token
tool suite, which isSPZPFkHV7LKzENjXCvMYTCioS5CDhJvtNFKn7tcfDm8
.I used this config file. My assets are fine since it runs flawlessly without the Spl setting. EDIT: {VARIABLE} are placeholder for actual addresses or values
I also clone Sugar and tried looking for the error message using ctrl + shift + F, but nothing came up.
Is this related to devnet ? I don't really mind trying mainnet if you tell me this should work but people should at least be aware that it breaks on devnet if that's the case.
Thanks for reading :)
Relevant log output
Priority this issue should have
Medium (should be fixed soon)