Thank you for continuing to deliver great tutorials
@veerabadhraswamygopu79942 жыл бұрын
Best solidity videos in KZbin .......thanks man...
@berkingurcan60972 жыл бұрын
best channel on youtube
@fakemonkgin Жыл бұрын
high quality content
@meka4996 Жыл бұрын
This is amazing! Thanks!
@thomascherret51542 жыл бұрын
Awesome video, thank you!
@danielany15902 жыл бұрын
Thanks for your great tutorials! I have a question. Why use `revert` and `if` at error case, instead of require? Does have any gas efficient? or other benefits?
@illegalskillsexception98262 жыл бұрын
As far as I know, require is more gas efficient than writing if + revert. However writing custom Errors is more gas efficient than the require statement. The most efficient solution would be to have a require statement with custom error, but this is not yet supported in solidity (hopefully in future). In this case it shouldnt matter much i guess because using custom errors are pretty convenient.
@danielany15902 жыл бұрын
@@illegalskillsexception9826 great! thanks
@shubhamsingh74052 жыл бұрын
Thnx for this very helpful tutorial. Why do we need to check whether _func parameter is empty string or not, anyways its going to call receive if we just send the _data with call?
@MrCoreyTexas4 ай бұрын
On line 103, why do you have to cast a string into bytes to check the length? From all of my previous experience I'd think a string datatype would support a length operator. If not, solidity has pretty weird exceptions.
@relikpL Жыл бұрын
Amazing content, and I always refer to your work. Is it possible for others to view that a timelocked transaction was queued up? I know that DAOs and other web3 projects use Timelocks for certain admin controls, and this is something that others can view and withdraw from the protocol if it's malicious, for example? Is that a different Timelock implementation (OpenZeppelin, I think)?
@smartcontractprogrammer Жыл бұрын
yes from the event logs
@РомаПетров-ж1н2 жыл бұрын
Do we get something for offchaining txs storing only its hash aside storage gas fees economy? And does it make significant difference? Am I right that we can get "cashback" when deleting executed txs from contract storage?
@smartcontractprogrammer2 жыл бұрын
yes you can save gas by simply storing the hash inside the contract yes htere is a refund for deleting data
@lucascyrne6301 Жыл бұрын
Could you continue this implementation focusing in atomic swaps? I wonder how can we use it to be able to transfer ERC20 tokens between EVM-based blockchains. Thank you very much about such rich content!
@KirillDvoretskov2 жыл бұрын
thanks!!!!!!
@Ts2pc2 жыл бұрын
I am confused this for 24 hours. For example, if I decide to donate 1 ETH to you today(6/19), and I set the _timestamp= 1 day, so what does that mean? then, you set min=3 days and max=10days, so what does that mean? then you set the grace_period = 30 days, so what does that mean? we already have current+min and cruuent+max, why still need grace_period? in the other word, if we have grace_period, then we don't need current+min and current+max? also, is the _timestamp really necessary?
@mustaphaidris15842 жыл бұрын
Grace period is just a period that is given to you before the transaction expires
@Ts2pc2 жыл бұрын
@@mustaphaidris1584 Thanks for your reply! I still don't get the answer. It would very much appreciated if you can use my donate case to explain those the relationship of block.timestamp, min delay, max delay and grace period!
@eatmungbeans2 жыл бұрын
MIN and MAX dictate the range of time you can *set* for the transaction to be executable. Grace period is the amount of time you have after the time that was set to execute the transaction
@Ts2pc2 жыл бұрын
@@eatmungbeans Thanks a lot! It’s really helpful!
@bskrksyp2 жыл бұрын
And there is no way to keep repeating on certain interval right ? for that we may have to use Chainlink Keepers ?
@smartcontractprogrammer2 жыл бұрын
Yes. Chainlink keeper or write a bot or something
@muzingnimzing4382 жыл бұрын
Isn't this what is used for vesting of tokens???
@smartcontractprogrammer2 жыл бұрын
No. I can make a video about vesting
@muzingnimzing4382 жыл бұрын
@@smartcontractprogrammer Was there ever a time that you weren't good at this...so good it seems you were born with it...thanks for being available ... Honestly wouldn't mind the vesting video...
@kumarprasoon88812 жыл бұрын
please help , this code is not running in remix ide
@McMcMarik2 жыл бұрын
Hey, why passing all the params twice in queue and execute, instead of string the tx with a running tx_id, and just using it in execute(tx_id)?
@smartcontractprogrammer2 жыл бұрын
expensive to store transaction data
@hippocratech2 жыл бұрын
Is there any reason you use "revert" with custom defined errors, rather then "require"?
@smartcontractprogrammer2 жыл бұрын
Just to mix things up. Also can't use require with custom errors.
@MrCoreyTexas4 ай бұрын
I guess with custom errors you can pass in arguments appropriate to the situation, whereas when you use require, generally it outputs a fixed string. I've tried to do string manipulation in Solidiy, and let me tell you, it is really hairy & ugly. I haven't tested, but I'm guessing it would use less gas to use custom errors vs. trying some kind of string manipulation with require().
@heresmypersonalopinion Жыл бұрын
DOES THIS DELAY ALL BUYS AND SELLS?
@smartcontractprogrammer Жыл бұрын
no
@crypto_peng2 жыл бұрын
9:33 how you quickly re-align the code in Remix?
@smartcontractprogrammer2 жыл бұрын
highlight + tab or highlight + shift + tab
@crypto_peng2 жыл бұрын
@@smartcontractprogrammer awesome
@rajvishah1877 Жыл бұрын
Where can I find the full code?
@smartcontractprogrammer Жыл бұрын
solidity-by-example.org/app/time-lock/
@22-Zar2 жыл бұрын
Is it possible to time lock a flash loan?
@daniel.contreras2 жыл бұрын
No, flashloans need to be repaid in the same transaction, so no delays are allowed. When doing time locks, you are operating with two or more different transactions.
@gosuto-inzasheru2 жыл бұрын
@@daniel.contreras you could still queue a flashloan into a timelock, and have it execute (and pay back) in the same future block. Not sure if that is what the question is about though.