I have a problem understanding the concept of deployed object. Kindly follow the link:

Executing reentrancy on Truffle Console: attacker not stealing 5 ether , why only 2 reentrant calls?

The link shows a Solidity smart contract having the following function:

function () external payable{
      emit LogFallback(count, address(this).balance);
      if(count < 5 ) {

It says to replace 'owner' with address(this). It says that the owner is a deployed object. It has a constructor also:

constructor (address payable victim) public {       
 owner = msg.sender;      
 count =0;      

The following link :


According to the above link, deployed object is declared in the constructor.

Please guide me what is the difference between the address(this) and the 'owner' concerning stack exchange question. If we consider 'owner' as a deployed object then it confronts with the oreilly link. Somebody please guide me. @clement



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.