Multi Delegatecall | Solidity 0.8

  Рет қаралды 9,384

Smart Contract Programmer

Smart Contract Programmer

Күн бұрын

Пікірлер: 29
@0xmetario
@0xmetario 2 жыл бұрын
I love your content 😍♥️ Please make a video on flash loans and how to create whitelist function
@mosipvp
@mosipvp 2 жыл бұрын
new day, new insane awesome tuts again. thankssssssssss t4sk
@sdfsfsfd437
@sdfsfsfd437 2 жыл бұрын
Great videos! This is a super channel.
@Ibrahim-oc5ql
@Ibrahim-oc5ql 2 жыл бұрын
Batch thanks
@Ts2pc
@Ts2pc 2 жыл бұрын
In the last lesson(multicall), It seems we don't ask the called contract to inherit multicall contract? Why is it necessary in multidellegate call? (Alice -> Test inherits multi call -> multicall to Test (msg.sender is address(this)); Alice -> Test inherits multi delegatecall -> multi delegate call to Test (msg.sender is alice))?
@xuan9793
@xuan9793 2 жыл бұрын
It's great to show vulnerabilities of the calls! But I don't fully understand why is it unsafe thou... Thanks for the video anyway!
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
several contracts were hacked with this bug
@brunobernard86
@brunobernard86 Жыл бұрын
It took me some time also to actually understand it, Basically what is happening: Imagine you are buying multiple sweets and each is 1 dollar. The bug with delegatecall is: Lets say you want to buy 3 sweets (like in the video) but you handed over 1 dollar. Delegate call actually received 1$. The bug is msg.value is 1 for every consecutive calls. Making as if you paid $3 dollar instead of $1. Delegatecall do not exhaust the msg.value. So back to the code: if you paid an NFT For 1 eth. If you had the delegate call for the NFT you can mint all NFTs at the same price with 1 eth. Scary.
@apah
@apah Жыл бұрын
Is it possible to use multicall and multidelegatecall for state changing functions ? In this case do we have to make it payable and send enough funds to allow the contract to run the transactions ? Are these two methods the way to go to group multiple transactions ? (let's say to make many ERC20 transfers) Thanks
@smartcontractprogrammer
@smartcontractprogrammer Жыл бұрын
yes, no, yes
@apah
@apah Жыл бұрын
@@smartcontractprogrammer appreciate it
@picardyoon1617
@picardyoon1617 Жыл бұрын
Hello, I wonder if you success in using multicall and multidelegatecall for state changing functions ?
@mattyost
@mattyost 2 жыл бұрын
so this could be used to batch multiple transfer calls to multiple contracts?
@viktor3512
@viktor3512 2 жыл бұрын
Buddy, fix the section of your tutorial regarding mapping You specified that the keyType can be "address,, bytes1 or uint" The _KeyType can be any built-in value type, bytes, string, or any contract or enum type. Other user-defined or complex types, such as mappings, structs or array types are not allowed. _ValueType can be any type, including mappings, arrays and structs.
@D3athW1ng
@D3athW1ng 2 жыл бұрын
Regarding the error you pointed out here, I don't think I've seen this as an option with solidity but couldn't you limit the amount of values the array could take to one to prevent the error for the mint function?
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
Then multi-delegatecall can only call one function
@D3athW1ng
@D3athW1ng 2 жыл бұрын
@@smartcontractprogrammer ahh point
@spicer41282
@spicer41282 2 жыл бұрын
I love your Vids! Can you help us beginners by describing the context / situations this is used? 🙏 Thanks in advance!
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
Uniswap V3
@MyNNiCo
@MyNNiCo 2 жыл бұрын
Hey, can you make a video about Deploying a Smart Contract from Frontend. I would have to normally run npx hardhat run scripts/deploy.js in my terminal to deploy. Is it possible to deploy in the frontend?
@CarryOnRk
@CarryOnRk 2 жыл бұрын
I Love your every tutorial Can you also create a video on merkle tree?
@roryoconnor8546
@roryoconnor8546 2 жыл бұрын
Does the contract that your calling have to inherit the multideligate call contract? How would you go about calling other contracts that dont interit it?
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
Yes. Modify multi-delegatecall to be able to call different contracts
@kewenlu4264
@kewenlu4264 Жыл бұрын
I modified the contracts based on multiCall and it still works fine, is it necessary to inherit MultiCall as shown in video?
@smartcontractprogrammer
@smartcontractprogrammer Жыл бұрын
Separation of concerns - It's good programming practice
@erth8096
@erth8096 2 жыл бұрын
Please create a tutorial about how to make whitelist
@hernanphillip334
@hernanphillip334 2 жыл бұрын
What would be the reason of using a multiDelegateCall inside your contract? I tried the same bug without being inherited and it didn't worked
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
batch transactions into multiDelegateCall
@سرالحضارات-ي4ق
@سرالحضارات-ي4ق 2 жыл бұрын
We need video for strong code contract flash loan Arbitrage can make you profits more than gas Fees more than 10 times
Uniswap V2 Price Oracle | DeFi
13:40
Smart Contract Programmer
Рет қаралды 10 М.
Time Lock | Solidity 0.8
21:09
Smart Contract Programmer
Рет қаралды 15 М.
Perfect Pitch Challenge? Easy! 🎤😎| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 90 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 38 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 55 МЛН
Delegatecall | Solidity 0.8
9:26
Smart Contract Programmer
Рет қаралды 25 М.
Accessing Private Data | Hack Solidity (0.6)
17:13
Smart Contract Programmer
Рет қаралды 20 М.
JWT авторизация. Основы JWT - механизма.
6:45
Хочу вАйти
Рет қаралды 16 М.
Unsafe Delegatecall (part 1) | Hack Solidity (0.6)
9:04
Smart Contract Programmer
Рет қаралды 12 М.
Dutch Auction | Solidity 0.8
13:48
Smart Contract Programmer
Рет қаралды 13 М.
Upgrading Solidity Smart Contracts with Proxy Delegate Calls
28:52
Unsafe Delegatecall (part 2) | Hack Solidity (0.6)
14:01
Smart Contract Programmer
Рет қаралды 8 М.
What are AI Agents?
12:29
IBM Technology
Рет қаралды 649 М.
Solidity: delegatecall vulnerabilities
6:37
Derek Arends
Рет қаралды 2,1 М.
Perfect Pitch Challenge? Easy! 🎤😎| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 90 МЛН