New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Solidity: Deployment in Remix

BaseMon, Oct 9, 2023, 12:00 AM

Deploy and interact with Ethereum smart contracts using Remix IDE. Understand contract addresses, transactions, and gain hands-on experience for seamless development! 📚 Head to Base Camp for full courses on smart contract development: https://docs.base.org/base-camp/docs/welcome ✅ Subscribe to our channel here: https://www.youtube.com/@BuildonBase ► Build on Base: https://base.org ► Follow us on Twitter: https://twitter.com/buildonbase ► Join our Discord: https://base.org/discord

Transcript

and now I have an address of a contract so remember that when you deploy a contract in ethereum an address is generated this address is like it's like the IP for a server or any particular resource in Internet in ethereum the identity is the address which is similar to this so this address as you can see is represented in hexadecimal and is there are 20 characters from The X to the n okay so these characters are 20 bytes land and all the ethereum address have the same form so we deploy the contract and now as you can see also in the console we can see details about the transaction for instance what was the status of the transaction the transaction hash who sent the transaction one good thing about remix it's that you can select different accounts and if you notice this account is the same that we have in the front so that means that when we deploy the contract we are deploying as this account this is the source okay and then we can see details about how much gas it consume how much gas it costs to deploy this transaction the execution calls and then more information like logs decoded output the code input and of course the transaction hash okay now let's do another transaction if you notice this contract this contract has two methods or functions the function is store that receives a value and sets the number value to the new value that I'm passing and also a retrieved function that gets me this particular number since we haven't stored anything yet we can try calling retrieve and as you can see a call to the smart contract was performed and then it return data in this case 0 because the default value is zero let's say I want to store a hundred then I click store and check how the transaction was successful now what we do is checking the information of the transaction let the transaction hash who sent the transaction to who we are sending this transaction which is this address also does cause and transaction cause and finally we can see the input that is decoded and here we are saying the value that we are passing is an hexadecimal and this is the value so this is an interesting number let's see because right now is represented as hexadecimal let's see what happens when we say Google help me to find a x to decimal converter and we're going to use this one and let's paste the value and convert to decimal and you see that is the hundred so this is just adequalet input but check that we are passing the 100 and then the engine do the decoding okay now if we retrieve the value we have 100 which is good okay so another thing that you can do is I mean you can try to recompile and everything should be good and if you notice we had these artifacts folder this artifacts folder is generated because we have this option to generate the artifact in a folder we are going to disable and then we can delete this folder that we don't need okay and I think that's all for the introduction to remix we are going to continue with the rest of the exercises and thank you so much

Automatic transcript — names and jargon may be misspelled.