DeclarationError: Undeclared identifier error when using sendValue()

Buy timestamp does not seem like something anyone would use chainlink for so that probably does not have anything to do with it.

The code you posted isn't really incomplete. It's just an interface and these only contain function declarations. There should be Agregator.sol with implementation somewhere.

Anyway, if you want help with this, I'd suggest to create a new topic with a meaningful title and give some more details there. Preferably post your code. There are many people here who could help you but right now you're commenting in an old thread that's gathering lots of unrelated problems due to a very generic title (DeclarationError is a very common error). No one will notice you here.

The original question in this topic has been answered so it should really be closed.

Thanks for the help.
I need to hire some new devs first and then will see where we get to.

Hi Cameel,

Please could you help me with the error : DeclarationError: Undeclared identifier. "checkValue" not (or not yet) declared

'''// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
interface Regulator
{
function checkValue(uint amount) external view returns (bool);
function loan() external view returns (bool) ;

}
contract Bank is Regulator
{
uint private value;
constructor(uint amount)
{
value=amount;
}
function checkValue(uint amount) external view returns (bool)
{
return value>=amount;
}

function deposit(uint amount) payable public
{
    value+=amount; 
}
 
function withdraw(uint amount)  public 
{
    if (checkValue(amount)) {value-=amount;}
}

function balance() public view returns (uint)  
{
    return value;   
}
 

function loan() external view  returns (bool) 
{
   return value>0;
}

}
contract Name is Bank(10)
{
string private name;
uint private age;

function setName(string memory newName) public 
{ 
    name=newName;
}

function getName() public view returns (string memory )  
{ 
    return name; 
}

function setAge(uint  newAge) public 
{
    age=newAge;
}
function getAge() public view returns (uint )
{
   return age;
}

}'''

Undeclared identifier is a generic error that is simply fixed by making sure the function or variable is in scope.

1 Like