I deployed this contract and also interacted with it using ganache.
pragma solidity ^0.4.0;
contract Counter {
int private count = 0;
function incrementCounter() public {
count += 1;
}
function decrementCounter() public {
count -= 1;
}
function getCount() public constant returns (int) {
return count;
}
}
However, when interacting with the contract, any account on Ganache can interact with it and use the function increment. How can I define only one account from Ganache to be able to change this function ?? I just wanna to add some security to the contract?
This is link for the smartcontract I follow: https://medium.com/crypto-currently/build-your-first-smart-contract-fc36a8ff50ca