Skip to main content
9 events
when toggle format what by license comment
Oct 20, 2022 at 18:54 comment added Qhapaq Qowi Thanks for the edit, that's a good point! I seem to get the same output regardless of including the _ in [instructorPubKey, _], but I've made a note of it! I'm still getting the same error, though. I'll update my question with the changes...
Oct 17, 2022 at 16:05 history edited Ademola CC BY-SA 4.0
added 318 characters in body
Oct 16, 2022 at 19:17 comment added Qhapaq Qowi Understood. I've been running anchor test, which I thought built, deployed, and tested, but I also tried explicitly with anchor build and anchor deploy, but still no luck.
Oct 15, 2022 at 19:28 comment added Ademola It isn't necessary. As far as I've seen most people(myself included) just prefer passing in each seed as a reference. As for the error persisting, make sure to rebuild and redeploy your contract before testing again.
Oct 13, 2022 at 21:42 comment added Qhapaq Qowi Just tried it, but the error stays the same. Thanks for clarifying about b"instructor"! May I ask why the change to the seeds is necessary? Just curious! As in, why the seeds is changed to ....as_bytes().as_ref() and why we use Buffer,from(...encode())? I'll see if I can find anything in the docs too. But yeah, I'm quite puzzled about this... It was working before adding the seeds, and I've modified it from that point twice and gotten to this same error both times haha
Oct 13, 2022 at 21:02 history edited Ademola CC BY-SA 4.0
added 226 characters in body
Oct 13, 2022 at 20:55 comment added Ademola I'll update my answer to give what I think is the best solution. It involves changing your anchor program though
Oct 13, 2022 at 19:06 comment added Qhapaq Qowi I actually blindly tried that previously too, but I get the same error. So, I'm thinking the issue may be something else... For educational purposes though, why exactly use anchor.utils.bytes.utf8.encode("instructor") as opposed to Buffer.from("instructor")? I feel like I've seen both being used. Does it have to do with "instructor".as_bytes() being used in the seed as opposed to b"instructor"?
Oct 13, 2022 at 18:40 history answered Ademola CC BY-SA 4.0