BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Blockchain Exam CBDE Topic 1 Question 99 Discussion

Actual exam question for Blockchain's CBDE exam
Question #: 99
Topic #: 1
[All CBDE Questions]

Address.Call vs. Address.Delegatecall:

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Micah
28 days ago
I think the real question is, why do we even need all these different call functions? Can't we just have one that does everything? *sigh* Solidity, you so complicated.
upvoted 0 times
Argelia
9 days ago
A) Address.call() is used for calling other contracts using the scope of the called contract in terms of storage variables. Address.delegatecall() is used for libraries, which uses the storage variables of the contract who called. Libraries are a great way to re-use already existing code and delegatecall can make sure that no storage is used from the library, instead it looks like the code is directly copied into the calling contract.
upvoted 0 times
...
...
Remona
1 months ago
This question is as clear as mud! I'm just going to guess and say B. Maybe I'll get lucky and the answer will be something completely different.
upvoted 0 times
...
Lindsey
1 months ago
Hmm, this is a tricky one. I'm going to go with A, but I'm not 100% sure. I need to review my notes on these Solidity functions again.
upvoted 0 times
Val
3 days ago
User2: I agree, A seems to be the right choice.
upvoted 0 times
...
Harrison
5 days ago
User1: I think A is the correct option.
upvoted 0 times
...
Kerry
14 days ago
User 3: I agree, A is the way to go. Delegatecall is for libraries.
upvoted 0 times
...
Brittani
16 days ago
Yeah, A sounds right. It's all about the scope of storage variables.
upvoted 0 times
...
Corrie
17 days ago
I think A is the correct option.
upvoted 0 times
...
...
Steffanie
1 months ago
So, Address.call() is more for calling other contracts with their own storage?
upvoted 0 times
...
Julene
1 months ago
Yes, that's correct. It allows the library code to be executed in the context of the calling contract.
upvoted 0 times
...
Lewis
2 months ago
B sounds more accurate to me. From what I know, delegatecall is used to call other contracts and maintain the calling contract's storage, while call is used for libraries.
upvoted 0 times
Catherin
17 days ago
That's right, call is specifically used for libraries to avoid using storage variables.
upvoted 0 times
...
Gertude
18 days ago
Yes, delegatecall is important when you want to reuse code from libraries.
upvoted 0 times
...
Jaclyn
21 days ago
I agree, delegatecall is used to maintain the calling contract's storage.
upvoted 0 times
...
...
Johnna
2 months ago
I think Address.delegatecall() is used for libraries, right?
upvoted 0 times
...
Kirk
2 months ago
I think the correct answer is A. This makes more sense in terms of how the different functions work with libraries and storage variables.
upvoted 0 times
Fatima
18 days ago
It looks like the code is directly copied into the calling contract with delegatecall.
upvoted 0 times
...
Alesia
30 days ago
Libraries are a great way to re-use already existing code and delegatecall can make sure that no storage is used from the library.
upvoted 0 times
...
Rosio
1 months ago
That's right, Address.delegatecall() is used for libraries, which uses the storage variables of the contract who called.
upvoted 0 times
...
Cherry
2 months ago
I agree, A) Address.call() is used for calling other contracts using the scope of the called contract in terms of storage variables.
upvoted 0 times
...
...

Save Cancel