0

Using sol compiler 0.5.1

I am trying to fetch data from old smart contract's function called people, the smart contract is already deployed on the blockchain

mapping(address => Person ) public people;

and in new contract i imported it and define like this

ADNIOX token;
      
constructor () public {
                        token = ADNIOX(0x5244e79314c710E5cA2715c071F3d2750CcAEa90);
                            }

Below is the response I get.

token.people(_addr);

now i want do check some variable values from above response and process according to it.

Person memory p = token.people(_addr);

(uint a,address b,uint256 c,uint256 d,ADNIOX.userState e ,ADNIOX.withdrawState f ,ADNIOX.remainToken g ,uint256 h,uint256 i) = token.people(_addr);

I tried both ways but it haven't worked for me.

The contract is deployed here: https://ropsten.etherscan.io/address/0x6dc4e20f7fd3540793d9dcb337667f5c5b8f0cb2#readContract

The contract gives the values of whole object

Response

The problem for me is that I want to check the value of one of these variables and compare it to my defined criteria and then proceed to complete the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.