Welcome to the forum discussion for this section. Here you can ask questions or post feedback.
These lessons look much better. Iâve just finished the first version but going to start again with these. Iâll let you know how I get on. Thanks.
Thank you Darren! I hope this version should be easier to follow along
Hi Filip, itâs much better.
What do you think of this. Itâs a front end I built for the gambling app from your course.
Love it! Great job. Have you connected it to the smart contract?
Hi Filip,
Thanks for your response means a lot. Not yet I want to get the front end finished first. I think connecting to the smart contract should be fairly straight forward.
In this respect the only thing that confuses me is does the user need to have metamask installed?
If so how do websites like Binance & Coinbase get round this?
Sorry if this is a stupid question.
Thanks in advance,
Darren.
Great! Sounds like a plan.
Binance and Coinbase get around this because they hold the private keys for their customers. But generally in crypto, we want our clients to be in charge of their own keys. Thatâs why we need metamask.
If you were to go the binance route, then you would need a database of your own where you keep username, passwords and encryption keys. Which would be way harder then just using metamask or similar tools.
Yes of course. However I do think having to use metamask or similar this is a fairly big barrier to adoption. Really we need something native preinstalled into browsers.
Hi Filip,
After all that I had to redesign the website as of course itâs a coin flip Dapp and not Dice throw. Ha Ha.
Iâve done that now and want to connect the smart contract next.
In this respect what I donât understand from the tutorials is the Dapp is designed in Superblocks. If I want to run the code outside of Superblocks how would I do this pls?
Thanks in advance,
Darren.
Wow. What an improvement. Love it!
After following some first lectures in course I can say it is excellent!
As a very experienced programmer, I find it very useful to refresh my knowledge about data structures from other programming languages and to see what is possible and how is implementation done in Solidity.
I am starting again and i love the new vids. Filip i am back with solidity. And i love the app version so i can follow up @workđȘ
Hi Filip
Starting out with only a basic understanding but want to get an overall view of smart contracts
Am in the architectural/ building industry which needs programmable money
will see how far I can get with this course
Thank you
Weâre glad to have you here! Good luck
Hi @filip, I hope that this thread is the right one to post my issue. I am building my first dapp and I am stuck now. I built a contract that emits two events and through web3.js I am trying to process them. On Brave browser everything works as it has to, but with Opera browser it is not. Opera do not recognize when the event happens. If I try to console.log anything directly after event, console is silent. Can you help me please? This is my code that handles the event, thanks.
kotloContract.events.allEvents()
.on('data', (event) => {
if (event.event == "newCard"){
cardMessage(event.returnValues[3], event.returnValues[0], event.returnValues[1], event.returnValues[2], event.returnValues[4]);
}
else if (event.event == "newUser"){
userMessage(event.returnValues.name);
}
})
.on('error', console.error);
I have this mapping contract but i get this error when deploying
browser/Untitled.sol:26:3: TypeError: Member âheightâ not found or not visible after argument-dependent lookup in struct HelloWorld.Person memory.
newPerson.height = height;
^--------------^
and this is my code
pragma solidity ^0.5.12;
contract HelloWorld {
struct Person{
string name;
uint age;
uint heigt;
}
mapping(address=>Person) private people;
function createPerson(string memory name, uint age, uint height ) public {
address creator = msg.sender;
//Create Person
Person memory newPerson;
newPerson.name = name;
newPerson.age = age;
newPerson.height = height;
people['creator'] = newPerson;
}
function getPerson() public view returns(string memory name, uint age, uint height){
address creator = msg.sender;
return (people[creator].name, people[creator].age, people[creator].height);
}
}
i cant find the error
Hey @yayo, looks like you have a little tipo in your Person strucs declaration.
struct Person{
string name;
uint age;
uint heigt; => uint height;
}
thanks, i didnt see that
i was trying to find this sine 10 hours now
thanks
About the types video: I notice that youâre using âuintâ, which upon closer inspection is âunsigned integerâ, meaning thereâs no sign bit and you canât code negative numbers. Might want to mention that.
Upon closer closer inspection âuintâ is acting like a template for âuint32â, âuint64â, âuint128â, etc. As a scientific programmer I find that both very awesome and very sloppy (for hardware-in-the-loop purposes). Even C allows you to slice off memory by-the-bit for extreme efficiency.
And speaking of: where are the floating point types? What are we coding here, a BASIC Stamp?!? What if I wanted to send $4.95?
Iâm not even asking for anything mathematically useful like Fortranâs âcomplexâ or a ârationalâ, or a âquaternionâ type. Solidity thus far seems useless for engineering problems like orbit mechanics or drone control systems. And I suppose thatâs fair considering the gas costs.
So apparently Solidity is designed for bean countingâWHOLE beans only! None of that split pea nonsense.
Where are mappings in ethereum stored?
somewhere in memory? storage?