How I add Security to the smart contract?

by Mohamed Ismail   Last Updated August 14, 2018 05:28 AM

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:

Related Questions

which wallet is usable with ganache test-rpc?

Updated April 23, 2018 14:28 PM

Unable to check for msg.value

Updated June 18, 2018 08:28 AM

Is drizzle a contracts lib?

Updated July 17, 2018 22:28 PM

See the contract code in Meta Mask or/and Ganache

Updated July 22, 2018 05:28 AM