all right uh I think that we are live can you guys hear me yes can you guys hear me well I think okay um so we going to get started um so today I'm going to show you how to create an S2 token on the Bas blockchain uh Bas is super popular right now so the demand for token on base is going to explode so no matter if you want to create your own token or you want to create a token for someone else um you're going to have a lot of demand so uh for those who are new here I'm Julian uh and I've been a blockchain developer since many years I used this technology uh on a dayto day basis and uh yeah so we going to get into it so I see some activity in the chat uh Tong Nepali Ragu gani Dr remix Josh s um hope you're feeling better H thanks but I'm not unfortunately but uh yeah still a little bit sick but that's okay that's okay because we have something important to talk about today um so uh before before we get started uh very quickly uh let me remind you that we have our solity boot camp that is starting very soon so the registration for the boot camp is going to end uh tomorrow so you have less than 24 hours to register so if you are interested to become a solidity Pro and be job ready uh check out the boot camp in one month we can turn you into a pro um all right so let's move on to our topic today so deploying a token on base so first of all what is base so BAS is is a blockchain blockchain that is connected to ethereum and currently there is a massive momentum on Bas um so here you can see the total value locked on for different blockchain and base here in purple is skyrocketing uh this is absolutely insane uh why is this I already talk about this this week but the tldr is that it belongs to coinbase and and coinbase has the full stack basically they they have the exchange they have they have the wallet they have the blockchain so they're really well positioned to have a lot of people uh on the blockchain so technically base is what we call a L2 so a L2 is a secondary blockchain uh that is connected to ethereum and so all of this is like technical name but what's important to understand is that you benefit from the SEC security of ethereum but uh at much cheaper uh cheaper cost because the transaction fee on Bay are much cheaper than ethereum so that is the big reason why a lot of people are flocking to to Bas um so under the hood Bas uses the same technology as ethereum okay so that means if you know how to create tokens on on ethereum you can also do it on base and that's awesome because you don't need to relearn a lot of different Tech this is super super interesting um so now uh let's get into the technical details okay so uh a token is technically what we call a smart contract and a smart contract uh is basically a small program on the blockchain um so you know just the name smart contract isn't really a great name because it's smart contract is not really smart not really a contract it's just a program and that different programming language but the one that you need to focus on is called solidity so here uh you can see some solidity code this is the the documentation of 3dt um and so if you are used to uh JavaScript um it looks a little bit similar but it's actually it's actually quite quite different um so we are going to use this programming language solidity to create our token on base uh but the next question is what is a token um good question so here you can see on coin market cap the top crypto uh and some of these crypto are actually token like tether this is a token um what else usdc uh technically this is a token and many of these asset here are actually token and that token this is implemented as a smart contract and this smart contract has to follow a a certain standard that is called erc20 and so you can find the documentation um publicly here um and so it has to implement a couple of functions uh here for your smart construct to be correct but uh this only Define the what we call function signature so basically the interface it's like it's like a high level of specification but it doesn't uh give you all the details it's up to you to code your erc20 token like you want as long as you respect some rules if you want that are um that that are described by this document and so everybody can code their own s20 but it's actually quite dangerous to do this because it's very easy to make a mistake and you know on the blockchain when you make a mistake it can be a disaster because hackers can come in there's a security hole they're going to drain all your contract they're going to steal all the coin uh they're going to do a rug pool all sort of nasty stuff so you don't want this to happen and every time you code some solidity you want to make sure it's safe so that's why some people created what we call a library so it's basically like a toolkit if you want um and so oh you can also see this as a some ready to use code so this is a solidity Library open zipling that you can use to implement erc20 tokens they have other functionality but most people mainly use yeah open zipling for creating yes 20 token um all right so now you understand the high level uh of what is a spart contract what is solidity so now we going to do the coding all right so for that uh we're going to use a website that is called remix um uh it's called remix that's basically a tool to code solidity this is technically this is what we call an IDE if you're not a developer can forget about this this is basically just a tool okay and what's great is that you can load remix directly in your web browser uh you can find the address here remix.ogg I'm going to put this um in the chat and yeah so with remix you have nothing to install it's super easy um and so to create your first smart contract you go here in this menu the file explorer um we're going to click on create new file and we're going to call our smart contract token and the extension for city is do Sol uh s o all right and so after here you're going to codee your smart track uh so I'm going to zoom in a little bit because I think it's a little bit small uh let me see yeah should be should be enough like this okay um so how we going to code this by hand uh we could do it uh but I already explained we're going to use open zipling and and even if we want to use open zipling we can actually go even faster and we're going to use chat GPT uh to ask us to create the code for us so code a um code ANC 20 uh token uh with solidity and open Z plan all right so let's see what is going to do uh blah blah blah blah blah blah okay I don't care I don't care just give us the code uh so you have to be careful with ch GPT sometime you give you some outdated stuff for example here you say yeah create a new truffle project so truffle is an outdated framework for spot contract you shouldn't use it anymore um and here there is the interesting part the code so we're going to copy this we're going to remix okay we're going to paste this and here we have our code so we going to deifer this line by line okay so first this is what we call call a comment uh with two slash at the beginning you can just ignore that now this is the pragma statement so you identify the version of solidity um so here we want version 0.8.0 usually you want the latest version so right now I think we are at 08.25 uh let's check this here yeah 8.25 correct after we're going to import the library that we're going to use so it's called open zipling and why we have this this/ contract token Etc is because this is the structure of open zipling so you have different sub folder in open zipling um and one of them is called as20 and inside there is this solid file called s 20 and so we want to grab it um and actually if you want to read what is in this file here has 20 you have to see you have to go to the website of op ziplink so what we can do is open ziplink GitHub um and open ziplink contract so we go to this so if you're not a coder this is GitHub and this is where we put the code uh where where we put the where coder upload their code okay um and so now we're going to go into contract directory we're going to go in token uh we're going to go in RC 20c 20 here okay so here you can see some solidity code um so don't worry we're not we don't have to understand everything but I just want to show you a couple of stuff um so here for example this is how we track the balances of different user um let's keep going here you have the name and the symbol of the token and here there are some function that uh we already found in the specification like name uh s symbol um so here if we go into the specification you can see those function name symbol so there is just what we call function signature here there is no definition so that means this part has to be exactly the same um but what is inside the function that is up to you so here we can see that the function signature matches the specification of lc20 all right so uh we're going to get back to uh to remix so here we import this Library okay and after in this part this is where we Define our smart contract so we use this contract keyword uh we name our contract and we're going to iner it iner it means that I'm going to take this as a base this is going to be my my base okay um it's like if you if you make a pizza okay and then you're going to have the base of the pizza and then you put all the the other ingredients um cheese uh what else what else can you put in a in a pizza macaroni I don't know ananas uh pineapple sorry I'm speaking French now uh pineapple I know some Italian will be really angry if you tell them you put uh pineapple on on on a pizza but anyway so this is the base of the pizza okay and so with this we already have a lot of functionality um and that means most of our code is already ready so the only thing we need to do is to configure the contract and so how we do this with this Constructor so this is a special function that is called only one time it's when we first deploy the contract uh this function is going to be called and so we pass what is what we call the initial Supply so that's the number of coin that's going to be uh minted uh that uh that our our token will have so we can decide whatever we want 1,000 one million one billion and we also going to pass some other argument here so the name of the token my token and then the symbol of the token so this is what we will see on coin market cap for example uh on the different exchange we will see this tickers is like small abbreviation to easily identify the token um and after we are going to call one of the function of s20 mint so actually mint is defined in s20 of open zipling okay so even though we didn't Define this function we can still call it and we for we pass it to argument the address of the sender so the address that deploy this contract and the initial uh Supply so that means the person who deploy the contract usually that's going to be the developer this person's going to get all the initial Supply and then it's up to the developer to distribute these tokens so there are many mechanism to distribute tokens uh Ico Etc this is a simplified version okay just for this example we're going to keep it simple but in reality it can be a little bit more complex than this um okay so here we have a really really basic contract and uh and next we want to deploy it so to deploy it we will need what we call a wallet okay so in the wallet we are going to use is called metamask so wallet is basically you can see it as your password manager okay inside your wallet you have a secret that we call Private key and with this this is how you can interact with the blockchain and how you can send transaction and when we deploy smart contract this is a special kind of transaction so we going to install metamask uh this is technically this is a Chrome extension so you go to the Chrome web store uh and you search metamask and you install it uh just have to click on it and after you going see a little fox here um in your extensions um here so you see this fox with different account account One account two Etc so by default it's going to create the first account and you're not going to have any money in it so it's up to you to send money to uh this account and you can create uh as much as many a new account that you want and so you can see that each of these account is identified by a weird number here so 0x uh something okay let's go back to to remix so here yeah so here this number 0 x 6 uh F Etc so that is the address that's basically like your bank account number okay and so we are going to deploy the smart contract from this address from this bank account number um so we uh yeah so here we were in uh in in remix and we need to so there are different network uh in uh sorry metamask that different network in metamask you have ethereum menet a couple of other one and we are going to deploy uh on base test net so before you Deploy on the base on a real based Network that we call menet you need to deploy it first on another kind of network that we call test net so it's also a public network meaning that there are several computers that are connected but it's not the real one and this is used by developer who want to try out new things before you deploy to production in uh even in web to you also do this you also you always do a sort of test deployment where you test you make sure that everything is working fine and then you do the real deployment so here our test deployment will be on base test net and if anything breaks it doesn't matter because it's not the real Network and we won't lose any money on it but because by default this network is not in metamask what you need to do is to click on ADD Network all right and here so they have some predefined Network already but base testet is not in them so you click on ADD Network manually uh this is at the bottom um and and here you can have to fill the different uh different parameters so here uh base test net uh then uh new RPC URL so let me see I have it somewhere yeah so in the documentation of Bas you can find all of this info so for the URL we're going to select this it's called RPC endpoint uh okay where is it uh I think it's here new RPC endpoint uh Chen ID uh so that's this one uh then currency symbol it's e and blog Explorer uh it's going to be uh let me see where did I put it yeah this one Bas sepolia block Scout so block explorer that is basically it's the equivalent of a web browser but for the blockchain okay so you can this is a tool that you can use to inspect the blockchain and find transactions uh all right and so after you click on save so me I already add added it so I can't I can't click on Save but uh here I'm going to cancel and after once you do this and you click on your metam mask you will see the B test net okay so that means you you've added it the network properly um all right so once we did this uh next step is to get what what we call some test net ether so when you're going to deploy the contract you're going to pay some money uh you need to pay the miners and this m but it's not going to be real money because we are on test net so uh this sort of fake money this is what we call test net ether um and you cannot buy it the only way to get it is to use what we call a foset so this is a special kind of website that is provided uh by some some important actor uh in the community like here we have the foret of quick notes quick note that is a an API for blockchain developers so it's basically the provide a service to let you uh access the blockchain more easily um and they also provide some stuff for free like here are the faets so you go uh you go to the fet of sepolia so I'm going to put this uh in the chat uh and and after what you're going to do so you're going to connect uh you're going to connect the wallet okay you're going to click here and you connect metamask uh and after so you select base seoa you're going to put your address here so let me see where I put my address um so here you select the correct account copy to clipboard you go there you click on continue um and there is a little cave yet okay super annoying but they do this to prevent spamming so if you just do this it's not going to work first you need to have some money on um on ethereum menet okay and exactly those you can see it here 0.00001 e um okay it's almost not visible so let's go in remix uh yeah you need this amount on menet um so you buy some ether and you transfer this amount on this address uh you won't need to spend this amount but you will need to have it on menet and after that um click on continue and you're going to see this screen and it's going to show you a transaction hash and transaction hash is basically uh an identifier for your transaction this is a special number remember that uh a special string of character that start with Zer X and you can identify a transaction and so to identify a transaction you will go on what we call a blockchain Explorer so I explained this before that's a basically like a web browser but F the blockchain um and you're going to put the transaction hash uh here so okay let me just uh or if you can click here directly it will take you actually to the the correct place Place uh and here is the transaction detail all right with a transaction hash success means it it worked uh from their address to our address you X6 something and they sent us 0.05 eth so that is not real eth okay uh you didn't find a magical you didn't find a lofo in the system okay I can see some guys in the chat what so crazy we can get some free Ean no no no no that's T net all right um but it will still be useful to do our test deployment um so what we going to do once we have this is that we going to do our um our deployment so we are going in remix okay um then we're going to go in the tab deploy and run transaction so first we're going to do a test deployment locally um with remix is possible to deploy your contract on a so-called local blockchain so that's a blockchain that is just in your web browser uh so it's only for testing even before test net is one level uh before test net so you don't even need any uh sorry you don't even need any test net either here because this is a sort of U imaginary blockchain we can do whatever we want and so remix is going to create some magical money so here for example remix has an account called 0x 5B something and we have almost 100 ether in it again this is not real ether so we're going to deploy our contract so we need some input because in a Constructor we have this initial Supply argument so let's just put 1,000 here okay um and uh by the way uh 1,000 uh so that you know it's not it's not what you think okay because the um we we have a system of um of of decimals in the smart contract so in tokens so basically when you want to transfer one token you don't actually transfer one token but you you have to transfer for example 1 time 10 power 18 so here for the supply it will probably be a huge number uh something like this with many zero and you can calculate this yourself but here let's just keep it simple and we're just going to put 1,000 all right so we click on deployed we can see that something is happening here so that's a transaction there's a green check mark means it was successful and here if you click here you can extend expand that part and you can see a few buttons um and so those buttons allow you to interact with your deploy smart contract so here you can see that our smart contract which is our token basically has an address so you can copy it here um so this is smart contract address and we can interact with it we can call decimals so 18 that's normal because open zipling give uh give you 18 uh decimals name uh it's called my token this is where we Define uh symbol mtk and total Supply 1,000 this is what we inputed so everything is normal all right so one once you've done this uh I'm going to clear this the next step is to do the actual deployment to test net so now you're going to go in environment you're going to click on injected provider um and it's going to connect to manam mask so here we're going to select the account that we want to connect to so account two where we have our test net ether we click on next all right it's connecting um and after that um we are going to do the deployment again so 1,000 we click on deploy and uh okay so so so yeah let's try to send this gas estimation fail I don't know why that's the case uh but let's try anyway so confirm transaction uh uh about to create a transaction on men Network so here I think um remix give you a wrong info it's not on men Network it's on testet but anyway uh let's click on confirm and so we'll see the popup from men mask okay uh so it's going to ask us so let me see what's the problem here okay so the problem is that even on on the test net of Base uh even the test net is oh why is it trying to do it on ethereum menet okay okay I think I think there is an issue guys no no no so let's reject this let's go back and we didn't select the proper netork okay typical Noob mistake oh I'm ashamed typical Noob mistake okay so step one you select the proper Network okay base test net then step two make sure you select the correct address okay that's the that's the case here uh all right so let's try again now deploy uh so now okay now it seems it makes more sense so we can see here that it's going to do this on base test net estimation fee $5 but that's not true because that's um that's like just a theoretical price but we're not really going to pay that because that's test net ether um and in terms of ether so max fee will be 0.01 and that's okay because we have um 0.05 so we have enough so we're going to click on confirm uh all right let's go and now you can see that below it's going to say creation of my token pendings so it's going to take a bit more time compared to when you do it locally and and that's very normal but that's because uh when you do it locally there is no need to wait for another computer um on the network uh but in this case we are interacting with the network so it's going to take some time before a transaction is mine uh at least a couple of second and so here we see that the transaction was mined uh so that's great and so we can click here to see more detail uh okay so let me expand this uh let's expand this okay so here we will see a transaction hash let's click here um and now we are going on the Explorer of base test net okay so base uh hyphen cia. blog scan.com um they're going to put our transaction hash and it find it and that is the proof that the transaction actually happened okay so remix didn't just tell you some uh here you can see in the blockchain Explorer we can see this transaction and it was successful um and here it created my token contract my token okay so let's click on it token name my token um yeah it's uh very very good so if you click on contract unfortunately what you see is unreadable um here what we called deployed bite code so that's this represent the code of your contract that's because on the blockchain uh we don't actually the blockchain doesn't uh the base the base blockchain and ethereum that's the same they do not know what is solidity because solidity is compiled to a a l level uh a low level code that we call bite code and it's basically some some some figures here uh it's not very uh human friendly uh but the blockchain can understand that but if we verify our contract that means if we provide the solidity code to the blockchain Explorer here you can see there's a button called verify and publish if you do this operation after you will be able to read the actual code the actual code here and that is very important because uh users they want to see this user before they buy your token they will go to see on a website like this if your token is real or if it has any sort of lofl so nobody's going to buy your token if you didn't verify um so we're not going to do this step but in the real deployment you will have to do it again uh I mean you'll have to do that all right um so yeah everything worked fine and and so there's a last step we're not going to do it here but I'm going to explain it to you so what what about if you want to deploy to base menet the real Network so the steps are almost exactly the same the only difference is that you will need to have some real money um in your in your base in your base address so that means you will go on the bridge between ethereum and base um and this is this website here you're going to select how much ether you're going to transfer for example uh one ether so connect the wallet it's going to connect to metamask um and so it's going to send some money from your ethereum account to your base account um and after once you have enough money on your base account then you can you can do the transaction so uh you will go in remix uh so first of all here you will select you will add the network uh let me see the Bas base menet here you can see it you click on ADD okay uh you then once it's added you're going to uh transition to base menet you select the proper address you go to remix um and here you make sure it's injected provider click on deploy and this time it's going to do the deployment on menet so exactly the same thing except that you you spend some real money uh okay so so now we are going to do the Q&A but first uh brief reminder so we have the 3 boot camp that is uh the enrollment is closing in less than 24 hours so if you want to become a professional blockchain developer uh register for the boot camp FYI the price is going to increase at each new cohort so I recommend if you if you can't afford the boot camp now it's better to take it now because it's going to be more expensive later so what we saw in this live stream this is quite basic if you want to be a professional 3 developer there are still many things to learn um like for example y gas optimization security Etc so we are going to cover everything that you need to know in this booth Camp all right guys so now let's see what we have in the Q&A um all right um TSX hey Julian new stream schedule um I don't know yet I'll try what is sure is that I've been very absent from the channel the past few months because I was really busy uh preparing the boot camp but now that boot camp is a little bit more structured uh I have more time to be on YouTube again so I def finally spend more time and uh yeah if I can I'll maintain this schedule and even why not doing doing it from Monday to to Friday possibly yeah there will be more all I can say for now is that there will be more video uh from me from now on that's for sure uh all right well what we have here Ragu is gas fee same as s20 or less than base so on Bas the gas fee will be less yeah that's the whole point um I I have a question how to burn the liquidity can you show it to to me um so liquidity is is once you have your your token that is deployed and you uh basically you have distributed the token to the different people um what what you can do is um um burn what we call the the lp token um so so if what you can okay okay let me let me rewind this before um before you distribute the token what you can do is you provide all the liquidity to an exchange then you get the lp token so when I say you I mean you as a developer you get all the lp token and then you're going to burn all these LP tokens so you're going to send them to some address that that nobody controls and after people can just buy the token from The decentralized Exchange um and that's it so this is what we call burning liquidity um all right uh what else we have uh Z call hey the blocks thank you for this information you're always super helpful uh thanks man dantu long time no see uh cool uh gut replica how do you incorporate native token to NE negate gas fee uh I don't know what you mean there is no way to to make it free people will always have to to pay for for gas Fe unless you you build your own blockchain um all right uh cant is it possible to set the automatic lock liquidity pool in the code uh let me see uh can you do that you could let me see how would you do that so you could create a function that when it's executed uh send the liquidity to to to Unis swap for example and then when you receive the token back it it burn the token uh yeah you could do it but the thing is you would still need a human to trigger this transaction so I'm not sure there is a lot of benefit of doing this versus just doing it manually but yeah if there we can do it um all right uh Z called uh that would be something cool to add to my CV that boot camp um yeah that's the point is that to make you job ready with this boot camp uh all right um the files can you make adjustable fee in a contract to prevent snipers on token launch um so let me see uh you what you can do is you can prevent Welles so for it you cannot for example you can say okay the maximum transfer is something like uh let me see how how would you prevent Wells um you could refuse you could block a transfer if the recipient has already a certain amount so let's say the recipient has like 10% of the supply then this recipient cannot receive money anymore so it's not exactly what you're saying but uh um but to prevent sniper so what I what I just said would help because a sniper wouldn't be able to snipe too much uh too much of the token but there are other things that you you could do but I don't have this all I can think for now um Conant that's it's better to send liquidity to locked LP manually uh this is how I would do it uh I wouldn't bother to create a function for that all right guys uh so if there's no more question uh we are going to stop here so yeah reminder uh if you want to get your career uh if you want to get started for your career of solidity Dev check out the boot camp you have 24 hours to uh register um all right guys so thank you very much and I will see you next week have a good day bye everybody