Can you clarify for me: it is suggested that KYC information can be stored, checked against, then erased. Does this mean that this data is effectively private? Is it safe from an attacker who wants to know your identity? Or is it implied this kyc data would be encrypted? Also, is it possible to use this storage for any sort of key sharing?
Thank you. a question please. In the Reentrancy guard example, If I want the Reentrancy guard to apply on all my functions (only one function of my contract is allowed to be called in a transaction) then I don't need to reset the tstore(SLOT, 0) , correct?
All reentrancy guards need to be set back to zero at the end of function execution otherwise you are disabling the function as all future calls to it will revert.
if transient storage lock is not reset the function can only be called once in a transaction. Example 1. Send a transaction to multi call into a function with transient lock 2. First call will set the lock and execute fine. Here transient lock is not reset 3. Second call will revert. The function is still locked.
0:00 Intro
2:45 Transient storage
8:04 Reentrancy guard example
Code
solidity-by-example.org/transient-storage
Take a course
www.smartcontract.engineer/
Remix
remix.ethereum.org
#Solidity #SmartContract #Ethereum #スマートコントラクト
Can you clarify for me: it is suggested that KYC information can be stored, checked against, then erased. Does this mean that this data is effectively private? Is it safe from an attacker who wants to know your identity? Or is it implied this kyc data would be encrypted? Also, is it possible to use this storage for any sort of key sharing?
Great example. I was waiting for this one. Looking forward to seeing clever use cases.
Man thank you, you have best crypto contents in youtube
Great content thank you
Thank you. a question please. In the Reentrancy guard example, If I want the Reentrancy guard to apply on all my functions (only one function of my contract is allowed to be called in a transaction) then I don't need to reset the tstore(SLOT, 0) , correct?
yup
Why did we have to reset the slot value in the reentrancy example? unlike the val example where we did nothing to set the value back to 0.
All reentrancy guards need to be set back to zero at the end of function execution otherwise you are disabling the function as all future calls to it will revert.
you are right! logically transient storage doesnt have to be set back to 0 since it will be automatically cleared at the end of the tx.
@@passandscore_ transient storage is contexualised only within single tx. so it will be reset at the end of the tx and wont affect new tx execution
if transient storage lock is not reset the function can only be called once in a transaction.
Example
1. Send a transaction to multi call into a function with transient lock
2. First call will set the lock and execute fine. Here transient lock is not reset
3. Second call will revert. The function is still locked.
@@smartcontractprogrammer I understand that, but my only question was why not, why is it not reset?
Do you need to actually use assembly, or will setting X = true then X = false just make the Solidity compiler make TSTORE work under the hood?
for now you need assembly.
I think vyper also has transient storage without assembly
Time to start move. There are enough videos about solidity
I will consider once it gets more adoption
Like this comment is you like this video