I checked this but it does not help me. I am writing an inherited contract and I would like to hide the CheckValue
function from the console. How do I go about this? I wish to check if the value I am entering in the withdrawal section is being verified on its own.
This is working, I just wish to hide the function from the console. Changing visibility throws an error and I only wish to hide CheckSum
instead of the others.
Code below, I'm new to solidity :)
pragma solidity ^0.4.25;
interface Regulator{
function CheckValue(uint amount) external returns(bool);
function loan() external returns(bool);
}
contract PracticeInheritance is Regulator{
uint private value;
constructor (uint amount) public{
value +=amount;
}
function deposit(uint amount) public{
value += amount;
}
function withdraw(uint amount) public{
if (CheckValue(amount)){
value -= amount;
}
}
function balance() view public returns(uint){
return value;
}
function CheckValue(uint amount)public returns(bool){
return amount <= value;
}
function loan()public returns(bool){
return value >=0;
}
}
contract PracticeContract is PracticeInheritance(500){
string private name;
uint private age;
function setName(string _name) public{
name = _name;
}
function setAge(uint _age) public{
age = _age;
}
function getName() public constant returns(string){
return name;}
function getAge() public constant returns(uint){
return age;}
}
I wish to hide it from here but the functionality must remain same i.e it should still check the value passed from withdraw
but CheckValue
should not show in the console here