FREE MASTERCLASS "Get Into Web3 In a Bear Market" 👉 Link: eattheblocks.c... 👉 Full roadmap to learn Web3 Development & get a 6 figure remote job 👉 EVEN during this bear market
FREE MASTERCLASS "Get Into Web3 In a Bear Market" 👉 Link: eattheblocks.com/masterclass 👉 Full roadmap to learn Web3 Development & get a 6 figure remote job 👉 EVEN during this bear market
^0.8.20 , some tutorials put this for compatible purpose, not for deploying in the production, then putting ^ symbol is not always wrong, it is depending on the objective of example.
true, if you're building standalone contracts or working with other compatible versions then specifying an exact compiler version is fine however some dependencies don't play nice with exact compiler versions, a big one being uniswap periphery contracts and a handful of other very integral dependencies that show up a lot onchain
11:41 for "pure" keyword, I compiled the code example with and without optimization using no mutability, "view" and then "pure", and bytecode is exact same in every case (except for metadata hash ofc)
Do free functions (or importing scripts) still count towards the size of the contract? I don't see why they wouldn't but I have my fingers crossed for the opposite lol.
trying to use console.log but not working giving error code: pragma solidity ^0.8.8; import "hardhat/console.sol"; contract Tricks { function Console() external pure { uint256 a=30; int256 b=-25; console.log (a); console.log (b); } } error: TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console). --> SOLIDITY/SOLIDITY/Tricks.sol:13:10: | 13 | console.log (b); | ^^^^^^^^^^^
So you do a horrible unbounded loop in the iterate() function example, say "et voila", only to let people know in the following trick that doing so is actually a terrible idea. Lol
@@EatTheBlocks there is still a gas limit on reads, plus you might well need to use a read function in a write function, so it's still a pretty ugly thing to do imho
FREE MASTERCLASS "Get Into Web3 In a Bear Market"
👉 Link: eattheblocks.com/masterclass
👉 Full roadmap to learn Web3 Development & get a 6 figure remote job
👉 EVEN during this bear market
We want more videos like this.
yes! thanks for your support
exactly
^0.8.20 , some tutorials put this for compatible purpose, not for deploying in the production, then putting ^ symbol is not always wrong, it is depending on the objective of example.
true, if you're building standalone contracts or working with other compatible versions then specifying an exact compiler version is fine
however some dependencies don't play nice with exact compiler versions, a big one being uniswap periphery contracts and a handful of other very integral dependencies that show up a lot onchain
mind explosion .... thankyou
thanks!
Thank you for this.
Thanks for your support
this is awesome, thanks for sharing these advanced tips
No worries!
Thank you! This is really helpful. Much appreciated.
Glad to hear it!
can't like this enough!🙏🙏🙏
thank u
Welcome
11:41 for "pure" keyword, I compiled the code example with and without optimization using no mutability, "view" and then "pure", and bytecode is exact same in every case (except for metadata hash ofc)
Wow that’s a lot of information ,merci
My pleasure!
Nice tips and tricks, I love the section on reentrancy guards 👌
Thanks, glad you liked these Solidity tricks!
14:04 Thank you professor, just like in the college 😅
haha
this was great
THanks!
your videos are the best!
Wow, thanks!
Wow. I really love this
Thank you
Hey pal!
Yes yes yes ooo solidity so good
exactly
You're like the crypto-Asterix, excellent videos anyway, thanks.
thx!
109th...Thanks Julien
Congrats!
Do free functions (or importing scripts) still count towards the size of the contract?
I don't see why they wouldn't but I have my fingers crossed for the opposite lol.
Suggest some courses for beginner to advance in blockchain developement
Here you go (it's my course):
eattheblocks.com/course/
The best
What about huff ?
Good suggestion. I might do a tutorial on that
trying to use console.log but not working giving error
code:
pragma solidity ^0.8.8;
import "hardhat/console.sol";
contract Tricks
{
function Console() external pure
{
uint256 a=30;
int256 b=-25;
console.log (a);
console.log (b);
}
}
error:
TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console).
--> SOLIDITY/SOLIDITY/Tricks.sol:13:10:
|
13 | console.log (b);
| ^^^^^^^^^^^
Are you trying in Remix?
@@EatTheBlocks yes
replace pure with view
Solidity: EXCUSE MEEE!!! Did you just assume my GENDERR!!!
😂😂😂
u are awosomeeeee
Thanks!
capo
05:16 😂 Tu as fais ton "et voilà" comme un étranger qui essaie de parler français
Ah non, en Anglais on peut dire voila.
So you do a horrible unbounded loop in the iterate() function example, say "et voila", only to let people know in the following trick that doing so is actually a terrible idea. Lol
No, you missed the point. Unbounded loops should be avoided in transactions. If you are just reading data, it's not a transaction.
@@EatTheBlocks there is still a gas limit on reads, plus you might well need to use a read function in a write function, so it's still a pretty ugly thing to do imho
@EatTheBlocks
What's up