1

I am currently working on a real estate blockchain project. Now I have 2 contracts user.sol and property.sol. The person who is registered on the website through user.sol can only buy or sell property in property.sol. I have a modifier in user.sol contract named CheckingRegistration which checks the person who is requesting to buy or sell property in property.sol is registered or not. I have deployed my user contract on blockchain. Now my question is how do I access the state of a person that whether he is registered or not in my property.sol which will deploy later.

  • Please share your code. It is hard to refer to your question otherwise. – goodvibration Dec 23 '18 at 21:37
0

You can add a Instance of user to the property contract like this:

contract User{
    function CheckingRegistration...        
}
contract Property{
    User us;
}

Then u have to write a function where the User in Property is given to the deployed User address like:

function Property(address _a}...{
         us = User(_a)
}

After that u can call the CheckingRegistration Function for the specific User.

Cheers

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.