No Public Contract Variables

Public state variables are inherently accessible to other contracts for manipulation. If a different contract modifies these values, they may not undergo the necessary validation process. Consequently, such modifications may result in an invalid ciphertext.

Don't: Do not use public secret types.

contract BadContract {
  ctUint32 public bad;
  //....
}

Do : Remove the public keyword and either add private or retain the default internal.

Last updated