Deploy your first Solidity smart contract with Remix IDE

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • In this video, I will show you how to deploy smart contracts using Remix IDE (web app for Solidity development). As example, I created a simple contract that can receive and store ether. Owner of the contract can withdraw accumulated funds to any valid public address.
    Remix IDE:
    remix.ethereum...
    Code from video:
    gist.github.co...
    Solidity official docs:
    docs.solidityl...
    Learn Solidity by example:
    cryptozombies.io/
    • Learn Solidity (0.5) -...
    #solidity #ethereum #smartcontracts
    Blog: fullstak.pl/
    Instagram: / fullstak_pl
    Discord: / discord
    Twitter: / artichmaro

Комментарии • 126

  • @ArturChmaro
    @ArturChmaro  2 года назад +11

    🎁 Web3 Starter for JS Devs (free email course): @t

  • @Oscar08814
    @Oscar08814 Год назад +2

    Oh my god, I've been like 3 days looking for a guide like this, thank you for sharing and explaining so clearly!

  • @esiriel
    @esiriel 2 года назад +6

    that was a GREAT tutorial ! Thank you for making all your explanations so clear - it's very very helpful. thanks again Artur !

  • @kristians.wesslen9788
    @kristians.wesslen9788 2 года назад +1

    Great intro to Remix.IDE and basic smart contracts!

  • @user-he6el7bc2o
    @user-he6el7bc2o Год назад

    the sound quality and words clarity is awesome ...

  • @josephdelgiorgio3382
    @josephdelgiorgio3382 2 года назад +1

    Solid video, thank you. Very easy to learn with a great teacher!

  • @MrAKGarg007
    @MrAKGarg007 2 года назад +1

    Very clear explanation of Smart Contract in minimum possible time. Thanks for making this.

  • @moudhafersalhi1302
    @moudhafersalhi1302 2 года назад +3

    Great video man! i am really thankful. I watched many other videos and it was so complicated to follow and understand, although i have over 8 years experience as dotnet and web developer... with your video i was able to understand it very well, thanks agaibn

  • @hadiaali6960
    @hadiaali6960 2 года назад

    my English is not good, but i understand completely, what you say, thank you for your simple but professional explication.

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Glad that my video helped you Hadi!

  • @bigmac5865
    @bigmac5865 2 года назад

    OK Artur Here is The Feedback ...... GREAT JOB. 1/ NOT too Complicated NOT too silly Simple ! 2/ The Spec is close to a DApp I have been trying to Prototype. 3/ Nobody else had solved the Move Ether from the Wallet without using the Remix Value Box in the Deploy section. 4/ Now we are left with the problem of re-using the Deployed Contract once we've closed down Remix for the night. How do we relink up to it ? 5/ I loved your interaction with the Contract Address from Etherscan. I hadn't see that before so please do more of that. 5/ Can the Contract be run from Etherscan without using REmix once it has been deployed. I'd like to see that as it will build up my Etherscan skills. Dude. H

  • @63montywilliams50
    @63montywilliams50 2 года назад +2

    good content. Clearly and thoroughly illustrates basic concepts! liked and subscribed

  • @julefrv
    @julefrv Год назад +1

    Wow !! Actually you're good and I like you're contents keep up bro 💪

  • @khairiyusoff5040
    @khairiyusoff5040 2 года назад

    Glad I found your video bro. Easy to understand.

  • @cryptoknight7256
    @cryptoknight7256 2 года назад +1

    Thank you for your video! Quick question: Why can't we create contracts on remix for production? What are the concerns again?

  • @glyricstv8568
    @glyricstv8568 Месяц назад

    I write my first smart contract for a crowdsale I setup usdt as the accepted payment option but when I test the buy token function it send fractional amount if usdt to the funding wallet. How can I set to that it sends the whole amount

  • @local.interloper
    @local.interloper 2 года назад

    Real solid job my friend :D

  • @user-si1nr5dc2c
    @user-si1nr5dc2c Год назад

    Thanks a lot for your video. Very useful. I have a question: is it possible to use a smart contract for a booking website to track stuff?

  • @heidimacomber859
    @heidimacomber859 2 года назад +1

    Artur, great tutorial. What if I made a mistake and deployed in Remix before my contract was updated? What can I do?

    • @cooldj2552
      @cooldj2552 2 года назад

      if you made a mistake in contracts it won't be deployed since the script or version are not compatible, but if you referring to values that is different story.

  • @ScarsofApathy
    @ScarsofApathy 2 года назад

    Very helpful, thank you!

  • @anonymoushippopotamus3862
    @anonymoushippopotamus3862 2 года назад

    Thanks for the upload!

  • @fseitun
    @fseitun 2 года назад

    great video! isn't it better to track the account's balance through address(this).balance?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Why better?

    • @fseitun
      @fseitun 2 года назад

      ​@@ArturChmaro i'm no expert, but your balance variable could go out of sync with the real balance. If you'd replace line 13 with balance += msg.value * 2 (it's an absurd case, I know) this would be obvious since address(this).balance would have a different value than balance

  • @azizovic8155
    @azizovic8155 Год назад

    hey artur , i saw u are using Rinkeby testnet , may i know why ? i always thought ropsten is better idk, which would u think is best for testing a smart contract ? thanks!

  • @angelarobertson6990
    @angelarobertson6990 2 года назад +1

    can we use this contract directly from server side like php?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Sure thing. Any backend language may use smart contracts. Just include right library, provide smart contract address, network, ABI code and you good to go :)

  • @manouchehryazdiha1412
    @manouchehryazdiha1412 2 года назад

    Great video Thanks!

  • @ehsansafari8552
    @ehsansafari8552 2 года назад

    Great starter, thanks

  • @FabioNatalucci
    @FabioNatalucci 2 года назад

    good content! thanks!

  • @raregear
    @raregear Год назад

    Why the contract should count its own balance? Isn't there any variable that already has the value of contracts balance?

    • @ArturChmaro
      @ArturChmaro  Год назад +1

      It's just an example of how to store/read values from contract. You may of course fetch balance using address.balance :)

    • @raregear
      @raregear Год назад

      @@ArturChmaro thanks! I just learned smart contract from your video.

  • @ishakfilali4168
    @ishakfilali4168 Год назад

    Thank you

  • @cholasmotas
    @cholasmotas 2 года назад

    Hey man. I love your video. Do you know how I can stop a mint that has not had the consideration included, and now sits in pending state.

  • @HD-iu8jc
    @HD-iu8jc 2 года назад +1

    Hi thanks great video , just an issue how do we get back to the smart contract in REMIX few days later ?indeed the deployed contract is not in the remix application anymore . Is there a link with the browser refreshing/cleaned , How can I interact again with this contract in a new browser?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Just write down address and import it to Remix after deploying to testnet ;)

    • @HD-iu8jc
      @HD-iu8jc 2 года назад

      @@ArturChmaro thanks for reply can we DM? or give me a link how to do it thanks again

  • @funk3548
    @funk3548 Год назад

    hey, thanks for the video, I learned a lot from it. If you see this, I am having trouble figuring out why the message "Only owner can withdraw" is not appearing in my error message although the error message does appear. I just can't seem to get it to return the nice labels even though it will not let addresses other than owner withdraw. Is there anything I should try? I've rewatched this video many times and am not seeing where I've gone wrong

  • @parishkritsingh4770
    @parishkritsingh4770 2 года назад

    Nice 👍🏻 I understood

  • @pankaj_9998
    @pankaj_9998 2 года назад

    very useful bro thanks

  • @Cornerstonecontractors
    @Cornerstonecontractors Месяц назад

    How do you recover the deployed contract if it disappeared? I changed pages and my deployed and funded contract disappeared. I still have the address and can verify the contract. I am unable to view, stop, start or withdrawal on the contract because it's not longer there in remix. Any ideas would be helpful. Thank you.

    • @ArturChmaro
      @ArturChmaro  Месяц назад +1

      there is option to load contract from address. Just make sure the code is the same and paste the address of contract in Deploy > Contract > At address

  • @cryptofan4380
    @cryptofan4380 2 года назад

    How can I make a function to collect the fee (1% of each transaction) into a new wallet address to use the fees for buyback periodically ?

  • @kevinplale9831
    @kevinplale9831 2 года назад

    I’m getting the error for function withdraw(uint amount, address payable destaddr) public {

  • @khairiyusoff5040
    @khairiyusoff5040 2 года назад

    After writing my smart contract in remix ide, how do i save it into my harddisk? I cannot save the code anywhere.

  • @manjeetsinghchauhan4917
    @manjeetsinghchauhan4917 2 года назад

    I am new to blockchain technology; I was following your tutorial to write my first smart contract. While deploying the smart contract, I was stuck because Rinkeby's wallet was empty to pay the gas fee. Please suggest how to fill some ETH in my Rinkeby wallet for testing. Do I need real ETH in the Rinkeby Test Network to deploy the smart contract and test the code? This way, the learning will be very costly to the new developers. Please suggest some workaround for new developers.

  • @shehrozk.3275
    @shehrozk.3275 2 года назад

    Loved the video, Can you show me the direction if I want to deploy a smart contract on DigiByte?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Haven't heard of this digi thing

  • @ninadsonawane1970
    @ninadsonawane1970 2 года назад

    Thanks man!

  • @eupasswood1402
    @eupasswood1402 2 года назад

    Hi Mate! Let me ask, how can I put anykind of Github Repo's to Remix, or how can I put anyone Folders from my Computer to Remix also?? Thanks forwards!

  • @fahimally3923
    @fahimally3923 Месяц назад

    hello sir, why my gas fee is high than yours? can you please help me on this situation?

  • @alphamomentsTV
    @alphamomentsTV 2 года назад

    Great video man. how can i add. max buy limit. set custom tax for buys and sells and also send those tax to a designated wallet?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Will try to shoot video on that soon ;)

  • @onlineincomex
    @onlineincomex 7 месяцев назад

    Thanku

  • @56ll451
    @56ll451 2 года назад

    Sir plz show me how to write bnb smart contract code for flash loans

  • @Arr0gance42
    @Arr0gance42 2 года назад

    Hi Artur, would the withdraw process be the same from a bnb based contract as I deposited some funds into a contract, however cannot seem to withdraw them and overall find them :(

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Well it depends on your contract code. If contract "knows" how to use funds sent to it then it's all good. However if you moved coins to token that doesn't know how to withdraw/transfer them then I'm afraid funds are lost forever...

  • @Faisudashing
    @Faisudashing 2 года назад

    please do you have any video arbitrage and earn Eth from arbitrage

  • @cashflowdriven7036
    @cashflowdriven7036 2 года назад

    Can you record an alternative to faucet ropsten? That doesn't work any longer. Thanks

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Try chainlink faucets or polygon Mumbai :)

  • @alikeremozturk1033
    @alikeremozturk1033 2 года назад

    Hi great video, what will it cost to deploy a ERC-721 contract I've made it on rinkeby testnet and made a lazy minting dapp. when I tried to mint that on my website it shows the fee as 650$. is it contract deploying fee ? Or did I make something wrong m (I will try it on mainnet in remix to see the deoploying fee)

    • @ArturChmaro
      @ArturChmaro  2 года назад +1

      $650 sounds super expensive. Not sure to tbh... I'd advise you to deploy contract and do minting on Rinkeby. Then check gas spendings in the block explorer and just calculate them for mainnet average base fee. It should give you better overview on costs.

  • @spinochillomania007
    @spinochillomania007 2 года назад

    How to add eth in metamask

  • @maulanamalik8322
    @maulanamalik8322 2 года назад

    what if i dont have any eth in may metamask can i still mkae this smart contaract program?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      You can, but not on real network. For production you need real crypto

  • @austinwedvick5787
    @austinwedvick5787 Год назад

    I have a smart contract I deployed and need help withdrawing the funds to the proper account if you can help me would be greatly appreciated

  • @dogcare5376
    @dogcare5376 2 года назад

    Hi dear Admin, could I ask you how to change Metadata in solidity 0.4.24 in order to compile a new contract with a different name, symbol, total supply? I have just got stuck. I do really appreciate if possible kindly instruct me to sort out the problem and compile the file. Thank you, sir ☺

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Not sure I got you right. Can you upload code somewhere and provide the link?

  • @cempakajanuari5983
    @cempakajanuari5983 2 года назад

    Deployed on BSC, how a contract can recive BUSD? Thanks anyway for an answer

    • @ArturChmaro
      @ArturChmaro  2 года назад

      I'm not BSC expert, but from my point of view BUSD is just an ERC20, so your contract has to be aware of how to deal with ERC20 (collect, withdraw and transfer them). Just include ERC20 interface and that's it :)

  • @OnlyPureContent
    @OnlyPureContent 2 года назад

    Hello ben i have one question : How to do Unlockable Content with smart contracts?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      You can just add it as private function that may be called by owner only.

  • @tevada6860
    @tevada6860 Год назад

    could i know your theme in vscode

  • @sabzzer9986
    @sabzzer9986 2 года назад

    So is this a way to make money ?

  • @fahimsaqib3883
    @fahimsaqib3883 2 года назад

    this contract is not on the real blockchain right ?? how to deploy it on the real blockchain , please reply

  • @1990gmac
    @1990gmac 2 года назад

    HOW DO I RE-ACCESS A CONTRACT IF THE BROWSER CLOSES TO END IT?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Just copy-paste address of the contract and import it to Remix IDE. It works for contracts deployed to networks only (doesn't work for JS VM deployed contracts)

  • @PhotoSlash
    @PhotoSlash 2 года назад

    Does this work also for creating smart contract for polygon in order to sell nfts on opensea?

    • @ArturChmaro
      @ArturChmaro  2 года назад +1

      Yep, just set your provider to Polygon and that's it. You can deploy straight from REMIX.

  • @krishnahulsure2623
    @krishnahulsure2623 2 года назад

    I need help can we change a contract once it has been deployed

  • @vishnu76241
    @vishnu76241 2 года назад

    Can I do this with just 30$

  • @fungsoh2357
    @fungsoh2357 2 года назад

    hi artur, how do we set the buy and sell tax over here?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      You have to customize code a bit. Just add variables to store tax values, calculate the tax and forward it to other address or just hold it within the contract ;)

    • @fungsoh2357
      @fungsoh2357 2 года назад

      @@ArturChmaro hi arthur, would you mind to show example please :)
      Besides, I’ve seen some of the project disable the sell function for the first 15mins, they claimed that is to anti bot, so we can set that ‘sell’ function on or off in here too?

  • @bigmac5865
    @bigmac5865 2 года назад

    WELL DONE. H

  • @marcosarzina1102
    @marcosarzina1102 2 года назад

    is it compatible in ERC1155?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      yes

    • @marcosunt1206
      @marcosunt1206 2 года назад

      @@ArturChmaro would be great to go deeper and understand (for us) how the contract could receive multiple tokens, such as eth, matic, etc , btw btc can be included as well on the same contract ? I guess we have to deploy 1 contract per chain so each coin has unique address per coin?? Nevertheless not clear about non ETH world as BTC, immense thanks as always

  • @automotiveexpert7917
    @automotiveexpert7917 5 месяцев назад

    Can you help me with something!

  • @SeptiantoSendiany
    @SeptiantoSendiany 2 года назад

    bro how to get ether test net?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Just google for "rinkeby faucet" or {testnet name} faucet ;)

  • @biofilms2435
    @biofilms2435 2 года назад

    Hey can you explain why the notation of the withdawal amount is 1 with many zeros behind instead of , e.g 0.1 as I would expect.

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Wei refers to the smallest denomination of ether (ETH), the currency used on the Ethereum network. For instance, 1 ether (ETH) is equivalent to 1* 10^18 wei

  • @D3CK3RON3R
    @D3CK3RON3R 2 года назад

    Hello Artur. Really like this video presentation. I get everything to work. Plus my smart contract shows 57.000 ether on the VM network. When I check the contract in Ethers it shows a balance of
    57.054160009418068523 Ether and Tokens equal 0:
    I can't switch to the Injected web3 network. Any suggestions? Thxs Henry

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Have you deployed contract to Javascript VM and then tried to call it from ethers? I'm afraid it won't work. You have to deploy contract to testnet and then call from ethers.

  • @schwarzchauhan
    @schwarzchauhan Год назад

    15:21

  • @theodale6805
    @theodale6805 2 года назад

    This is vulnerable to reentrancy

  • @brandcop555
    @brandcop555 3 года назад

    Artur do you have telegram? I want to talk with you

  • @bigmac5865
    @bigmac5865 2 года назад

    Artur Hi ... Dude .. See you on Twitter then Email ... H