Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Blockchain CBDE Exam - Topic 5 Question 125 Discussion

Using selfdestruct(beneficiary) with the beneficiary being a contract without a payable fallback function:
B) it's impossible to secure a contract against receiving ether, because selfdestruct will always send ether to the address in the argument. This is a design decision of the Ethereum platform.
A) will throw an exception, because the fallback function is non-payable and thus cannot receive ether.
C) selfdestruct doesn't send anything to a contract, it just re-assigns the owner of the contract to a new person. Sending ether must be done outside of selfdestruct.

Blockchain CBDE Exam - Topic 5 Question 125 Discussion

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

Using selfdestruct(beneficiary) with the beneficiary being a contract without a payable fallback function:

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Adaline
1 month ago
Totally agree with A! Makes sense.
upvoted 0 times
...
Margart
1 month ago
A) is correct, can't send ether to a non-payable fallback.
upvoted 0 times
...
Evangelina
2 months ago
I’m confused about the implications of selfdestruct. Does it really just re-assign ownership? I thought it had to do with ether transfer too.
upvoted 0 times
...
Lashawn
2 months ago
I feel like I saw a similar question where selfdestruct was discussed, and it mentioned that it doesn't actually send ether to a contract. So maybe C is the right choice?
upvoted 0 times
...
Leslie
2 months ago
I'm not entirely sure, but I remember something about selfdestruct always sending ether. Could it be that option B is correct?
upvoted 0 times
...
Jamika
2 months ago
I think option A makes sense because if the fallback function is non-payable, it can't accept ether, right?
upvoted 0 times
...

Save Cancel