I am trying to call a contract from another contract.
first contract is the source of items like a data table. second contract is like a logic layer for the items.
I first deployed the contract1 and got the address, it is working fine.
When I tried to deploy the second contract which has the variable of type contract1 it is throwing the below error when compiling
Error: Identifier not found or not unique.
below is my second contact code
contract itemlistcallercontract {
ItemListContract itemlistcontract;
function itemlistcallercontract()
{
itemlistcontract = ItemListContract("0x16c5d0c8fccaf7e5824f5ae25c1662877cec6452");
}
function getitemcount() constant returns(int count)
{
return itemlistcontract.countItemList();
}
}
i am trying to take the reference of contract1 by passing its address in the contract2 constructor.
But the error is thrown in the declaration of the itemlistcontract variable it self.
Cant we call a contract deploying them seperately? Is there any point I am missing here?