Solidity Testing With Truffle For Beginners | Full Course | 5 Test Examples

  Рет қаралды 28,284

EatTheBlocks

EatTheBlocks

Күн бұрын

Пікірлер: 32
@mumk
@mumk 2 жыл бұрын
The test is passing, and I felt exhilarating, thanks a bunch!
@martatofan1089
@martatofan1089 2 жыл бұрын
Very helpful tutorial! Thanks!
@Banksy_said_hi
@Banksy_said_hi 3 жыл бұрын
This instruction is marvelous
@EatTheBlocks
@EatTheBlocks 3 жыл бұрын
Thanks!
@GajeshSNaik
@GajeshSNaik 4 жыл бұрын
Can I use remix to test smart contract?
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
I think so but I Truffle is more suited for testing
4 жыл бұрын
Indeed! Truffle seems not intuitive at the beginning but, as you get more experience, you realize that it makes your life easier as developer.
@huckhopper6252
@huckhopper6252 5 жыл бұрын
How do you pass in things like Msg.sender and Msg,value into your tests?
@EatTheBlocks
@EatTheBlocks 5 жыл бұрын
you can customize web3 transactions like this: web3.methods.foo(/*args here*/).send({from: /*address here*/, value: /* amount of ether sent */})
@0f0crypto
@0f0crypto 3 жыл бұрын
I followed the exact steps (up to ~9:00), but I get an error right away that the contract has not been deployed to the network ... so clearly there are some steps missing ... :(
@JunPrg
@JunPrg 3 жыл бұрын
Awesome... Thank you so much
@EatTheBlocks
@EatTheBlocks 3 жыл бұрын
Most welcome 😊
@auroraiiit5765
@auroraiiit5765 4 жыл бұрын
at @22.41 how can we explicitly send 10 as uint parameter for the add function in the contract?
@cryptotester5042
@cryptotester5042 3 жыл бұрын
Have you got an example on how to test a payable function with parameters?
@talhajavaid2778
@talhajavaid2778 2 жыл бұрын
having error says artifact not defined how do I fix it kindly help
@newborn7850
@newborn7850 2 жыл бұрын
difference between assert and expect
@theemacsen1518
@theemacsen1518 5 жыл бұрын
What are the vim plugins you use for Solidity?
@EatTheBlocks
@EatTheBlocks 5 жыл бұрын
this one: github.com/TovarishFin/vim-solidity (its forked from an older plugin that is abandoned)
@theemacsen1518
@theemacsen1518 5 жыл бұрын
@@EatTheBlocks Thank you
@rachelblack6407
@rachelblack6407 4 жыл бұрын
Im curious, so the contract is only re-deployed after every contract block in the test file, not after each time an instance is created and deployed with contract.deploy()?
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
The migration script is re-executed after each contract() block. But you can also manually deploy more contract instances with the deploy() method
@mullabro2
@mullabro2 3 жыл бұрын
thank u
@EatTheBlocks
@EatTheBlocks 3 жыл бұрын
Welcome
@jomoljaison1545
@jomoljaison1545 3 жыл бұрын
please do it in tronbox
@mudassir45
@mudassir45 5 жыл бұрын
When ever I am running following test : 1. Should NOT update a non-existing user 2. Should destroy an existing user 3. Should NOT destroy a non-existing user. all these test fail and give this error: AssertionError: Unspecified AssertionError please help how to solve this
@EatTheBlocks
@EatTheBlocks 5 жыл бұрын
Hey, thanks for reporting an error. However, Its impossible to help you with so little info. Please ask for help in the eattheblocks forum with the required info, as explained here: forum.eattheblocks.com/t/how-to-ask-for-help/62/2
@leykunejigu7477
@leykunejigu7477 3 жыл бұрын
Thank you for this awesome Tutorial. One question I got is, wouldn't it be better to define a function that returns crud.read() in the describe(contract) block and use it in the It blocks to avoid duplication.
@eyalhochstadt3878
@eyalhochstadt3878 3 жыл бұрын
I am trying to use the toNumber method, but get the result saying toNumber is not a function.
@justkaz7104
@justkaz7104 Жыл бұрын
464
@pjos2981
@pjos2981 3 жыл бұрын
Sir I can get 100 subscriber if you teach us fullstack block chain developer course step by step
@apurvpandey17
@apurvpandey17 3 жыл бұрын
it's outdated bro what are you doing?
@EricBishard
@EricBishard 3 жыл бұрын
You do know this is a 2019 video right?
How to Write Basic Tests | Testing with Foundry
9:29
Smart Contract Programmer
Рет қаралды 11 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Master Ethers.js for Blockchain Step-by-Step [Full Course]
1:25:36
Dapp University
Рет қаралды 116 М.
Build Your First Blockchain App Using Ethereum Smart Contracts and Solidity
1:31:07
Hardhat Tutorial | Smart contract framework (Truffle alternative)
34:08
7 JavaScript Changes You Missed in 2024
14:07
ForrestKnight
Рет қаралды 12 М.
Fuzz | Testing with Foundry
9:07
Smart Contract Programmer
Рет қаралды 4,9 М.
DeepSeek R1 Fully Tested - Insane Performance
15:10
Matthew Berman
Рет қаралды 164 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН