No Constant/Immutable Secret Types

In Solidity, constant variables are evaluated at compile-time and replaced with their respective values in the bytecode of the contract. On the other hand, immutable variables are set at contract deployment and cannot be changed thereafter. In both cases, these scenarios prevent them from being recognized by our security mechanism, rendering them invalid.

Don't: use constant\immutable secret types.

contract BadContract {
  ctUint32 private constant constVal = MpcCore.setPublic32(5);
  ctUint32 private immutable immutableVal;

  constructor(uint32 _val) {
    immutableVal = MpcCore.setPublic32(_val);
  }
}

Do : Simply remove the constant\immutable keywords

Last updated