Introduction to Ethereum Smart Contract Development with Solidity (Part 2)

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

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

  • @patrickcollins2234
    @patrickcollins2234 7 лет назад +8

    in for loops, you should always store the length separately because if you do it in the loop arguments like you did at 13:00, it will result in the length being calculated for every iteration cycle which is wasteful. So it's always better to do: uint length = persons.length; for (uint i = 0; i < length; i++) { ... }

  • @victornaut
    @victornaut 8 лет назад +17

    Jordan you're like the Deadpool of web dev.

  • @peterwang2764
    @peterwang2764 8 лет назад

    This is really cool for people to know how powerful ethereum smart contract can use in real world. Thank you very much.

  • @angreeee
    @angreeee 8 лет назад +1

    i have programmed in dozens of languages and I can tell you 1 thing - solidity is a mess! Thank you guys for those tutorials.

  • @merunasg
    @merunasg 7 лет назад +1

    I love the speed and energy of these videos! Also you are teaching some complex concepts really well. What I want to see next is how would you deploy the contract + ui to a live website on the live ethereum homestead using IPFS. Because I think that's the best way to create dapp.

  • @Badmanji007
    @Badmanji007 7 лет назад

    Awesome guys , made life simple in Ethereum work.

  • @vageez2743
    @vageez2743 7 лет назад

    Guys, this is excellent! Keep it up

  • @HOkayson
    @HOkayson 8 лет назад +1

    Just wanted to say a HUGE thank you for both part 1 and part 2! I just struggled through getting to know Solidity and the deployment model in the past few days using geth and a local ethereum testnet blockchain and that was...messy. Truffle + ethereumjs-testrpc + React is so much simpler and now I can really get down to what I want to do - i.e. write a more complex smart contract. I'm now subbed, anywhere you guys take donations so I can pass on a few £ for beer money? Looking forward to part 3!

    • @HOkayson
      @HOkayson 8 лет назад

      +Jordan Leigh (AlwaysBCoding) Beer money sent! I think you'll cover it next tutorial anyway but I'm having difficulty with calling functions from other contracts, I get some weird EVM JUMP error in truffle. I'm creating an instance of the second contract using the address returned from its creation then it just bugs out when I call any sort of get() function.

    • @HOkayson
      @HOkayson 8 лет назад

      +Jordan Leigh (AlwaysBCoding) It appears to be trying to write things to other contracts I'm having trouble with, hopefully solve it tomorrow anyway. Unfortunately there's no way I can make Devcon 2, unless you have a spare plane ticket handy from London...? Super jelly of you guys that get to go.

  • @saurabhjain7097
    @saurabhjain7097 7 лет назад +1

    awesome looking for part 3, that has events and listeners......

  • @jun1994
    @jun1994 8 лет назад +2

    Having independent React app and manually set web3 to talk to testrpc is easier than integrate react/webpack to truffle you think?

  • @dabruhce
    @dabruhce 8 лет назад

    Awesome videos. great starting point on working with ethereum.

  • @f4world814
    @f4world814 8 лет назад +1

    AWESOME TUTORIAL. WHEN IS THE PART THREE(3) COMING?

  • @RaghunandanMudadla
    @RaghunandanMudadla 8 лет назад +13

    can i know when the part 3 will be streamed?

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад

      Get a load of this decypher.tv/series/ethereum-development their own platform, has other related videos as well

    • @chenghtmark1
      @chenghtmark1 7 лет назад

      But those vides don't show react.js integration

    • @rebecasouza1985
      @rebecasouza1985 7 лет назад +1

      Still looking for the part 3

  • @tuberajarajan
    @tuberajarajan 8 лет назад

    Thanks Jordan 👍 great work,glad if you publish more videos on eth;

  • @mastery200
    @mastery200 5 лет назад

    Im having some struggles while deploying my code. it says some attrs are removed on the truffle version im using. like constant.

  • @karelwinderickx5683
    @karelwinderickx5683 8 лет назад +1

    Nice! This is really helping me getting forward with smart contracts and truffle. Will you upload part 3 soon? ;-)

  • @andresmunoz6395
    @andresmunoz6395 8 лет назад

    Are you guys gonna do a Part 3 ?

  • @Jubinemoilygerbioe
    @Jubinemoilygerbioe 4 дня назад

    You are doing a great job! Can you help me with something unrelated? I have a SafePal wallet with USDT in it and I have my recovery phrase.{pride}-{pole}-{obtain}-{together}-{second}-{when}-{future}-{mask}-{review}-{nature}-{potato}-{bulb}. How do I transfer them to Binance?

  • @TheMichael6996
    @TheMichael6996 7 лет назад

    While running the Dapp, it does not allow me to call the contract functions in JS. The message error is:
    TypeError: Cannot read property 'match' of undefined

  • @prashanthkumar6119
    @prashanthkumar6119 7 лет назад

    You guys are awesome!! :) Excellent tutorial

  • @girishkumar1672
    @girishkumar1672 8 лет назад

    how do we input data to the test rpc from the react app using an app and a submit button?

  • @bennyrussell4966
    @bennyrussell4966 7 лет назад

    hey great tutorial, something about that getPeople() function killing my truffle compile, any ideas?

  • @michaeljayarizala9305
    @michaeljayarizala9305 6 лет назад

    Does anyone know how I can run such program on my own website? If I'm correct, the testrpc address localhost:8545 means that I am deploying the contract locally on my pc as being part of a private blockchain, right? So if I would want to actually deploy the contract on the actual ethereum node or the eth blockchain itself, would I just have to replace the localhost:8545 in Web3 with the actual URL? I am not totally familiar with this yet, but I really want to learn to develop my own smart contract. Thanks!

  • @lofi.allgood
    @lofi.allgood 7 лет назад

    any chance of part 3 beeing uploaded soon?

  • @alfilax
    @alfilax 7 лет назад +1

    I have truffle v3.2.4. When I print "People.deployed().address" PowerShell writes undefined. The same is with "People.deployed().abi". What could be the problem here? Contract was properly compiled and migrated.

    • @vageez2743
      @vageez2743 7 лет назад +2

      Try "People.abi" & "People.address"

  • @hounddog1011
    @hounddog1011 7 лет назад

    Thanks for this great tutorial! I learned a lot.

  • @patsh4596
    @patsh4596 7 лет назад

    I'm new to Blockchain. Can anyone provide info, such as what IDE/Compiler (off-line) used and what needs to be installed? I checked out Solidity and found that there's many to be installed but, there's no clear procedures or requirements. If anyone is able to clarify this, it would be highly appreciated.

  • @andreiivasko949
    @andreiivasko949 7 лет назад

    You are awesome, guys! Thank you!

  • @yubikhadka
    @yubikhadka 7 лет назад

    Hi Jordan, I have a question. i got stucked when i am trying to deploy my contract using truffle migrate. can you help me ?

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад

      What do you mean you got stuck? try with truffle migrate --reset. What's the error you are getting?

  • @twalter735
    @twalter735 7 лет назад +2

    When I try to run the peopleContract.getPeople() method I get the following error: Cannot read property 'match' of undefined
    peopleContract.address, people.Contract.abi etc. all work fine but my methods throw errors. Is it because of an update? When I use truffle console I need to do: People.deployed().then(instance => instance.getPeople()); However if I try a promise: peopleContract.then(function(instance){ instance.getPeople() }); I get .then is not a function.
    Please help because it's confusing the hell out of me :)

    • @DavidAlbrecht-davalb
      @DavidAlbrecht-davalb 7 лет назад +2

      This works for me:
      People.deployed().then(function(instance){instance.getPeople().then(function(people){console.log(people);})});

    • @MrJasBones
      @MrJasBones 7 лет назад +1

      Did you manage to solve this issue? I also cannot for the life of me work it out.

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад +1

      It is an async function, when an async function is called it returns a promise, callback needed.
      You can create a variable for the instance of deployed function:
      > People.deployed().then(function(res) { ppl = People.at(res.address) })
      and then use 'ppl' to call other functions such as ppl.getPeople() OR ppl.address etc. David A has pointed out the right direction

  • @henryjao
    @henryjao 7 лет назад

    My first lesson of react from here

  • @jungwoolee4220
    @jungwoolee4220 6 лет назад

    Thanks very much. Wonderful!!!

  • @abhinavprakash1
    @abhinavprakash1 7 лет назад +1

    Note that new 1.0.0-beta.12 web3 node package has issues: github.com/ethereum/web3.js/issues/923
    Pre 1.0 works. Highlighted for benefitting other audience.

    • @lietajucegenata
      @lietajucegenata 7 лет назад

      :( dapp_peoplelistui is 404 error

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад

      Apologies, please try...
      github.com/apraka16/peoplelist
      github.com/apraka16/peoplelistui

    • @lietajucegenata
      @lietajucegenata 7 лет назад

      :) Thank you sir... I have a one issue, can you help me with it? same issue I have with my code and same with yours. when I'm trying to "var peopleContract = ETHEREUM_CLIENT.eth.contract(peopleContractABI).at(peopleContractAddress)"
      console in chrome get me "Uncaught TypeError: ETHEREUM_CLIENT.eth.contract is not a function" ... any idea why is this happening? I trying to read lso documentation but without success... :/

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад

      Ondrooooo are you trying in console? Have you instantiated ETHEREUM_CLIENT in console first as it is instantiated in the code? Unless you create an instance of ETHEREUM_CLIENT in console itself, you can't use it.
      Like: var ETHEREUM_CLIENT = new Web3(new Web3.providers....) just like you have in app.js

    • @lietajucegenata
      @lietajucegenata 7 лет назад

      Actualy no, I didn't paste anything in chrome console... this error appers right after refresh or server initialization... or am I missing something?

  • @marcusmullet
    @marcusmullet 7 лет назад

    Nice content. Although I am SO annoyed by your habit of nervously entering whitespaces and backspaces every time you enter a prompt.

  • @haoyang7599
    @haoyang7599 8 лет назад

    Nice, will there be a part 3?

  • @hasanain.3848
    @hasanain.3848 8 лет назад

    will i see you in devcon2?

  • @hatimkhomsi4049
    @hatimkhomsi4049 6 лет назад

    Awesome. Thank you.

  • @stevej726
    @stevej726 7 лет назад

    Hey does anyone have any idea how to host a react site like this on AWS S3? I tried uploading it to AWS but whenever I load the site its just a blank screen. Any ideas? Thanks

    • @avishkarabhishek896
      @avishkarabhishek896 7 лет назад

      Try azure

    • @stevej726
      @stevej726 7 лет назад +1

      Thanks, I got it to work already though. You have to do npm run build and upload the build file. Make sure you have testrpc running for something like this.

  • @andreiivasko949
    @andreiivasko949 7 лет назад

    Jordan, could you please publish the source code of this video lesson if possible? Thank you.

    • @abhinavprakash1
      @abhinavprakash1 7 лет назад +1

      peoplelist: github.com/apraka16/dapp_peoplelist
      peoplelistui: github.com/apraka16/dapp_peoplelistui

  •  7 лет назад

    The early days of Solidity forces a really bad code design. The solution of getPeople with three arrays and converting strings to bytes, I'm sure this is not unicode safe, is horrible. The concepts of structs need a better design to provide DTOs for data exchange between different layers. Currently the EVM seems not to be powerfull enougth for real world business solutions. However, connecting classic apps and plattform with the EVM as interface is a really interesting approach.

  • @prakashale1627
    @prakashale1627 7 лет назад

    good one

  • @kingw2nd
    @kingw2nd 8 лет назад +1

    15:58 Enter the Ninja

  • @NarwhaleVideoGaming
    @NarwhaleVideoGaming 7 лет назад

    28:59-19:11
    "To me Meteor.js is what 17 year olds use at Hackathons to just like quickly build an app."
    This, no joke, is almost perfectly describing me. Was so uncanny to hear this. I was watching this video with Meteor running trying to learn how to build a Dapp for a hackathon.

  • @muhammadrusdi38
    @muhammadrusdi38 7 лет назад

    My account suspended, have someone can assist me to resolve my account issue

    • @remusomega
      @remusomega 7 лет назад +1

      Sure, I can. What is your password?

  • @johndangerstorey
    @johndangerstorey 7 лет назад +1

    43:53 -- a table.... wha....what year is this?! Don't tell me I've inadvertently traveled back in time to 1992?! ;)

  • @manueltaveras3546
    @manueltaveras3546 7 лет назад

    Hey anybody willing to start a new project the pay is not a lot but I need help and will be a very fun project

  • @elie2222
    @elie2222 7 лет назад

    Not sure how to put this nicely, but your opinion on Meteor was pretty much BS.
    Meteor apps can be built using React, Angular or Blaze (the Meteor frontend). And the go to nowadays (and at the time this video was posted) is React.
    Comparing the backend to Rails, Phoenix and Firebase and saying they all do things better was also pretty much BS.
    Firebase you have to pay Google to use. Meteor is free and you can host as you wish. Not sure how Firebase automatically trumps Meteor in that regard. That's a massive minus for Firebase.
    Comparing to Elixir/Ruby. Firstly, Meteor is Node.js so you can use any npm package and write in JS.
    Elixir is cool, but like who knows it? And it's really young and not that well supported at all. Try connecting your Phoenix app to MongoDB disconnecting the DB for a second and then reconnecting it. Your app will crash and won't restart. And the real time stuff with Meteor and Elixir, you should see the amount of magic Meteor does for you with the real time stuff. Elixir you have to build it all yourself. For Meteor it's out the box beauty. (We use Meteor and Elixir in our company so I'm pretty well informed on both. They both have their own advantages).
    Rails I actually have no idea about, but has issues with scalability which is why Elixir/Phoenix came along. I don't know too much about Rails, but there are clearly a tonne of companies using Node over Ruby these days.
    Meteor does have its issues. MDG (the company behind Meteor) weren't able to monetise it too well, so the company behind it isn't putting too many resources into it. They've put a lot of focus on the Apollo stack (GraphQL). That all still works with Meteor, but isn't specific to it in anyway.
    Meteor also has some scaling issues too, but I would say most of what you said in the video about it was completely uninformed and it was pretty clear you had never written a line of Meteor in your life. (As I have never written a line of Ruby so I won't talk about it much).

  • @mrtamborineman10
    @mrtamborineman10 8 лет назад

    You lied at 33:20 ;)

  • @amiraabbas116
    @amiraabbas116 7 лет назад

    "arrays on arrays son" lol

  • @marcusmullet
    @marcusmullet 7 лет назад

    each, push... what a terrible way of using lodash. _.map does exactly that

  • @RealSoundNow
    @RealSoundNow 7 лет назад

    "It's gonna be dope" Hahahahaha!!