Current location: Current location: Home > cs > Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep73 Text
Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep73
[cs] Time: 2025-07-11 11:28:07 Source: AIHackNode Author: php Click: 102 times
oftime uh all right righthere and intelligence vs consciousnessthe first one we need to gothrough is this one the create metadaccounts uh we need to make sure thatit's all set up correctly uh so thecorrect one should be ticket metadata umthe mint is the ticketmint the mint Authority is thecollection mint that's correct the payerwill be the the pair the updateauthorities of collection mint SystemProgram rent perfect signer seedsum our name our string uh this isactually going to be our ticket namebecause we updated we want to have ourticket name be the one with thenumber um let's see okay so seller isfine address is going to be the let'ssee this is the creators address wedon't actually have any creators forthis one so I'm going to go ahead andremove this and putnone true true and then this is going tobe n none because it has no collectiondetails this is just like if youremember from the token metadata uhinformation the specific mint accounthasnone all right so we have that one nextup we have the master Edition so let'sgo ahead and start creating it so thisone the first thing I know is this isgoing to be the ticketmint the master Edition is going to bethe Ticket Master Edition once again Althe metadata is ticketmetadata and let's go down pair yep themint is a ticket mint Ticket MasterEdition the mint Authority is thecollection mint update Authority iscollection mint M toen token metad yeprent everything good um sum is zeroperfect now we need to actuallyverify this as part of the collection soset andverify or set and verify side CL ctionitem cuz we're adding a new collectionitem um we're going to go ahead this isthe authority record we remember earlierwe set it as none so we're going to setit as none now uh and I'm going to makethis a little bit prettier enterenter enter all right so we need a newCPI context once again new assigner umso new assigner let's see if it dideverything that would be funum so it needed to be a token metadataprogram perfect set and verify sizecollection item that is correct um nowwe're we're missing a bunch of thedifferent items so let's just fill thatin uh so the first one is themetadata uh this is just going to be thecontext. accounts. ticketmetadata. toacinfo next one is going to be thecollection Authority whichcollection Authority which is thatcollection mint uh the pair is going tobe the pair that we're used to uh we'regoing to have an updateAuthority which is going to be thecollection mint again uh we're going tohave the collectionmetadata context. accounts do weactually include this maybe do we did weforget somethingI think we forgot something that's okaylet's go add it two of the things thatwe we actually we missed two things Ijust double checked um we missed thecollection metadata and the collectionmet Master collection Master Edition andcollection metadata so we're going tocopy and paste this um we're going tochange a couple things so this is goingto be collection metadata and this onedown here is going to becollection MasterEdition and then we we just need tochange these two use the collection mintaccount there we go all right go back upto our code so collection metadatashould be now collection metadata. toacinfo uh the next one let's say next oneI believe it is the collection MasterEdition socollection Master Edition which is ourcollection Master Edition um and let'smake sure I have everything so lookslike it don't let's see what I'm missingI'm missing a so oh okay so I'm notimporting it let's import it uh let's dothis one let's make sure it imported inthe rightplace one thing I don't reallyappreciate is it's putting it all here Iactually want it to all go up here solet's go pull itout and put it uphere so let's so create master Editionjust going to clean this up a little bitum it's doing it's adding it in a placeI'm not exactly fond of um this is whyyou don't do autocomplete sometimes uhso let's go and copy and paste thiswholething intohere and then just update it as neededpull itout all right let's see if it addedeverything whoops I put a extracharacter that'sokay all right so where is it set andverify collection um looks like I'mmissing something uh Missing collectionand collection metadata um ahI'm I added an extra thing and then weneed the collection mint socollectionmint as expected collection mint andit's all happy all right so we've doneall this now that we've created theticket we need to increase the ticketnumber by one there we go all right sowe have everything Let's test this let'ssee if it works um looks like there'ssome errors um let's just remove theseand get them working uh before we startbecause otherwise we will run intoerrors later uh system program/ transferthis is just us needing to include thesystem programsouse anchor laying uh SystemProgram now let's see if we're missinganything else wehave looks like we have everything nowlooks like everything isHappy yep everything's seems to be happylet us now Anker buildit so built correctly now let's go buyour tickets um I'm going to go ahead andcreate another function for this just sothat uh I can make sure that I buy thetickets I can buy multiple tickets veryeasily so buyticket this is going to be a newfunction uh we're going to buy all thosetickets so const buy ticket I equalsawait uh program.methods. buyticket and then it's going to beaccounts token program token program IDinstruction um now we have to get thatblock hash with context again uh we aregoing to have to get some information uhwe're going to have to create anew transaction so this is going to benew anchor transactionuh we're going to do the same thing wedidearlier uh there we go all all that coderight there add by ticket instruction umand then we need to just constsignature send it confirm ourtransaction and console logit this is going to be the buyticketsignature and then we have to actuallycall it so let's go call by ticket overhere await byticket all right so we have our test
(Editor in charge: rust)
Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep36Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep75
Related content
- Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep20
- The 3 Year AI Reset_ How To Get Ahead While Others Lose Their Jobs (Prepare Now) _ Emad Mostaque - Ep5
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep56
- [Hindi (auto-generated)] 2025's Most Important Career Podcast - AI Skills For All Ages _ Masters' Union Dr. Nandini Seth - Ep7
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep201
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep34
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep12
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep6
- GenAI Essentials – Full Course for Beginners - Ep38
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep34
- [Hindi (auto-generated)] 2025's Most Important Career Podcast - AI Skills For All Ages _ Masters' Union Dr. Nandini Seth - Ep4
- [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep98
- Psycho Killer _ Interview with a Killer S2 E1_ Gary Hilton - Ep9
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep5
Wonderful recommendations
- GenAI Essentials – Full Course for Beginners - Ep73
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep20
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep90
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep29
- Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep46
- 50 Cent Goes In on Diddy, Drake, Jay Z, Snoop, Eminem, Trump 2024, Vegas Shows +More Scandals - Ep10
Popular Clicks