Writing a dApp using Solidity, Truffle, Ganache, MetaMask | Part 1

  Рет қаралды 25,651

Web Dev Cody

Web Dev Cody

Күн бұрын

Пікірлер: 51
@craigkanyemba
@craigkanyemba 2 жыл бұрын
This is good, you just helped me on the bootstrap to vanilla js. Keep it up: )
@blackninja2.027
@blackninja2.027 2 жыл бұрын
Thanks and waiting for part 2❤
@WebDevCody
@WebDevCody 2 жыл бұрын
It’s already published
@akmalll_-1286
@akmalll_-1286 Ай бұрын
any solution, when i deploy, gas not be used in ganache and no transactions
@salvigi1676
@salvigi1676 2 жыл бұрын
Very good tutorial.
@AlexZaharia24
@AlexZaharia24 2 жыл бұрын
does the test create a new instance of the 'Tickets' contract each time? If yes, then why isn't it saved in ganache? The funds are withdrawn to the accounts and transfered to the new contract instances, but the contract instances are not persisted.
@silihuang1731
@silihuang1731 2 жыл бұрын
thanks for your tutorial !
@yongchanghe5576
@yongchanghe5576 2 жыл бұрын
Great Cody! Thank you for your detailed tutorial! I have learned a lot from these tutorial resources. And by the way, would you please share another tutorial using react as the front end to set up the UI and interact with the solidity smart contract deployed by truffle and ganache? Thank you in advance! I have worked with drizzle (using react as a front-end tool) but because I am lacking the knowledge of React, I cannot go any further. Cheers bro!😜
@SeibertSwirl
@SeibertSwirl 2 жыл бұрын
Good job babe!
@thayaganthusiyanthan9708
@thayaganthusiyanthan9708 2 жыл бұрын
Nice this is good!
@crypto_peng
@crypto_peng 2 жыл бұрын
would you use Hardhat or Foundry?
@HassanHatem-e8f
@HassanHatem-e8f Жыл бұрын
Can I Withdraw This (ETH) Or This Watch Only?
@jianmao4560
@jianmao4560 2 жыл бұрын
Thanks, that's great! But in the last step after I run truffle test, there is an error: Returned error: VM Exception while processing transaction: revert. What does this mean?
@blackninja2.027
@blackninja2.027 2 жыл бұрын
After running the truffle test um getting this error. > Everything is up to date, there is nothing to compile. Contract: Tickets 1) should allower a user to buy a ticket > No events were emitted 0 passing (173ms) 1 failing 1) Contract: Tickets should allower a user to buy a ticket: TypeError: instance.buyTickets is not a function at Context. (test/Tickets.js:13:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) Could you help me to fix this?
@AlexZaharia24
@AlexZaharia24 2 жыл бұрын
it should be instance.buyTicket() (drop the 's')
@emphaticstew5807
@emphaticstew5807 Жыл бұрын
This is is something that confuses me, what if my contract is already deployed? Do I still need to deploy or just compile the contracts? Thanks awesome videos!
@WebDevCody
@WebDevCody Жыл бұрын
You’d need to redeploy a brand new contract from what I understand
@sugamkuber9057
@sugamkuber9057 2 жыл бұрын
Thanks a lot, It really helped a lot, hope u keep doing great content like this..hehe :)
@WebDevCody
@WebDevCody 2 жыл бұрын
Haha idk, at this point I’m not a strong believer in web3. I may go back to my normal react tutorials
@harshnambiar
@harshnambiar 2 жыл бұрын
Hey! Nice tutorial. Could you cover the deployment to a couple of other EVM chains like Tron and FTM as well? Everything else would be same as ETH expect the deployment. There aren't many tutorials on these so this might be pretty cool.
@marcosemenzato9277
@marcosemenzato9277 2 жыл бұрын
Hi, this is a very cool tutorial thankyou. But for some reason I can't get it working. I mean, I can create the 10 items over the blockchain and with Ganache I can see them. The problem is that seems that the constructor is never called. The price is fixed to 0, and also the owner (I changed it to 1 for a test). What could be the problem?
@marcosemenzato9277
@marcosemenzato9277 2 жыл бұрын
I found out that I had already deployed the contract and so the constructor never got called. To solve the problem I just created a new project. Now, is there a way to force the deployment procedure from the beginning?
@chiranjithraghava8322
@chiranjithraghava8322 2 жыл бұрын
Hey . How do deploy tickets again
@fatimahnaqvi9086
@fatimahnaqvi9086 2 жыл бұрын
Hey, I am kinda new to solidity and really need to write the test code for my contract Can you please help me write test code for my contract if I send you my smart contract code? Need it urgently!
@kenansari
@kenansari 2 жыл бұрын
great tuto thank you Cody! A Question: How did you learn to code with Solidity? What was your source? the documentation? Thank you
@WebDevCody
@WebDevCody 2 жыл бұрын
I just used copilot to help me generate code and then I’d google the keywords if I didn’t understand them.
@kenansari
@kenansari 2 жыл бұрын
@@WebDevCody thanks
@nikitakehlerr311
@nikitakehlerr311 10 ай бұрын
@@WebDevCody genius
@marsalan8720
@marsalan8720 2 жыл бұрын
truffle migration giving an error. anybody can solve this kindly.
@francescosalzano5848
@francescosalzano5848 Жыл бұрын
I receive: "Tickets" hit an invalid opcode while deploying. Try: * Verifying that your constructor params satisfy all assert conditions. * Verifying your constructor code doesn't access an array out of bounds. * Adding reason strings to your assert statements.
@francescosalzano5848
@francescosalzano5848 Жыл бұрын
resolved, I changed the solidity version using the docker: true properties in the config
@LoremIpsum85
@LoremIpsum85 Жыл бұрын
yep, I changed solidity version to ^0.8.19 and kept //docker: true commented out
@SniperAlys
@SniperAlys 2 жыл бұрын
I have problem in 17:52 when do the truffle migration, i get this error Error: Error: CompileError: ParsedContract.sol:5:1: ParserError: Expected pragma, import directive or contract/interface/library definition. public uint256 constant TOTAL_TICKETS = 10; ^----^ ------> i have the same exactly code as you !!!! :(
@SniperAlys
@SniperAlys 2 жыл бұрын
and if I move constant declaration inside the contract, also i have another error about: SyntaxError: No visibility specified. Did you intend to add "public"? constructor() { ^ (Relevant source part starts here and spans across multiple lines). Any ideas? Sorry im new on Solidity :(
@matthewallen4295
@matthewallen4295 2 жыл бұрын
@@SniperAlys I'm coming across the same error. Were you able to solve?
@matthewallen4295
@matthewallen4295 2 жыл бұрын
@@SniperAlys I was able to solve it dude. Hit me up.
@SniperAlys
@SniperAlys 2 жыл бұрын
​@@matthewallen4295 yes I solved it too, it was a problem with the Solidity version if I remember correctly
@matthewallen4295
@matthewallen4295 2 жыл бұрын
@@SniperAlys Okay cool, i did it another way. But i'm now running into a new error with the test section.
@sugamkuber9057
@sugamkuber9057 2 жыл бұрын
can you please tell me the VSC extensions you used
@WebDevCody
@WebDevCody 2 жыл бұрын
I think I just used a solidity extension
@nh7788
@nh7788 2 жыл бұрын
How long is the waitlist for Copilot?
@WebDevCody
@WebDevCody 2 жыл бұрын
I’m not sure I got in a day after applying
@dhanviakash726
@dhanviakash726 2 жыл бұрын
Where those money paid for tickets will go ??
@WebDevCody
@WebDevCody 2 жыл бұрын
Into the contract. You’d need to add a withdraw money to get it out
@dhanviakash726
@dhanviakash726 2 жыл бұрын
@@WebDevCody if we add a withdraw money option First user with id 0 will get that money right?
@WebDevCody
@WebDevCody 2 жыл бұрын
@@dhanviakash726 you can code withdrawal to send the contract balance to whatever other account address you want.
@dhanviakash726
@dhanviakash726 2 жыл бұрын
@@WebDevCody okk thank you...
@Regalman
@Regalman Жыл бұрын
none of this works truffle is broken
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 6 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 35 МЛН
Intro to Foundry | The FASTEST Smart Contract Framework
19:21
Patrick Collins
Рет қаралды 41 М.
Ganache and Metamask | Blockchain
19:52
ADCB innovations
Рет қаралды 10 М.
ERC20 Token Tutorial | Create Your Own Cryptocurrency
1:13:56
Block Explorer
Рет қаралды 142 М.
Build Your First Blockchain App Using Ethereum Smart Contracts and Solidity
1:31:07
Create your First Decentralized App - Using React, Solidity & Truffle
31:40
Facundo Carballo - English
Рет қаралды 10 М.