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++) { ... }
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.
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!
+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.
+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.
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?
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
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!
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.
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.
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 :)
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
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.
:) 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... :/
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
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
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.
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.
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.
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).
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++) { ... }
Jordan you're like the Deadpool of web dev.
It's a pretty accurate description
This is really cool for people to know how powerful ethereum smart contract can use in real world. Thank you very much.
i have programmed in dozens of languages and I can tell you 1 thing - solidity is a mess! Thank you guys for those tutorials.
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.
Awesome guys , made life simple in Ethereum work.
Guys, this is excellent! Keep it up
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!
+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.
+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.
awesome looking for part 3, that has events and listeners......
Having independent React app and manually set web3 to talk to testrpc is easier than integrate react/webpack to truffle you think?
Awesome videos. great starting point on working with ethereum.
AWESOME TUTORIAL. WHEN IS THE PART THREE(3) COMING?
can i know when the part 3 will be streamed?
Get a load of this decypher.tv/series/ethereum-development their own platform, has other related videos as well
But those vides don't show react.js integration
Still looking for the part 3
Thanks Jordan 👍 great work,glad if you publish more videos on eth;
Im having some struggles while deploying my code. it says some attrs are removed on the truffle version im using. like constant.
Nice! This is really helping me getting forward with smart contracts and truffle. Will you upload part 3 soon? ;-)
Are you guys gonna do a Part 3 ?
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?
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
You guys are awesome!! :) Excellent tutorial
how do we input data to the test rpc from the react app using an app and a submit button?
hey great tutorial, something about that getPeople() function killing my truffle compile, any ideas?
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!
any chance of part 3 beeing uploaded soon?
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.
Try "People.abi" & "People.address"
Thanks for this great tutorial! I learned a lot.
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.
You are awesome, guys! Thank you!
Hi Jordan, I have a question. i got stucked when i am trying to deploy my contract using truffle migrate. can you help me ?
What do you mean you got stuck? try with truffle migrate --reset. What's the error you are getting?
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 :)
This works for me:
People.deployed().then(function(instance){instance.getPeople().then(function(people){console.log(people);})});
Did you manage to solve this issue? I also cannot for the life of me work it out.
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
My first lesson of react from here
Thanks very much. Wonderful!!!
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.
:( dapp_peoplelistui is 404 error
Apologies, please try...
github.com/apraka16/peoplelist
github.com/apraka16/peoplelistui
:) 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... :/
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
Actualy no, I didn't paste anything in chrome console... this error appers right after refresh or server initialization... or am I missing something?
Nice content. Although I am SO annoyed by your habit of nervously entering whitespaces and backspaces every time you enter a prompt.
Nice, will there be a part 3?
Soon?
Awesome! I be sure to check those out.
will i see you in devcon2?
Awesome. Thank you.
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
Try azure
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.
Jordan, could you please publish the source code of this video lesson if possible? Thank you.
peoplelist: github.com/apraka16/dapp_peoplelist
peoplelistui: github.com/apraka16/dapp_peoplelistui
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.
good one
15:58 Enter the Ninja
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.
My account suspended, have someone can assist me to resolve my account issue
Sure, I can. What is your password?
43:53 -- a table.... wha....what year is this?! Don't tell me I've inadvertently traveled back in time to 1992?! ;)
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
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).
You lied at 33:20 ;)
"arrays on arrays son" lol
each, push... what a terrible way of using lodash. _.map does exactly that
"It's gonna be dope" Hahahahaha!!