Issues with trivial encryption

Hi,
I’m having problems in deploying simple contracts via Remix on the Zama Devnet using the trivial encryption.
As the operation is called in the constructor, the deployment does not work.
Is it possibile that something is going wrong with trivial encryption?

I tried with this simple smart contract and a revert error came out:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "fhevm/lib/TFHE.sol";
import {SepoliaZamaFHEVMConfig} from "fhevm/config/ZamaFHEVMConfig.sol";

contract SustainabilityIndex is SepoliaZamaFHEVMConfig{
    euint32 internal x;

    constructor(){
        x = TFHE.asEuint32(0);
        TFHE.allowThis(x);
    }

    function setValue(uint32 _value) public {
        x=TFHE.asEuint32(_value);
        
    }
}

Than you in advance.

What network are you deploying on? And what is the error message?
The Zama Devnet is no longer supported fyi. You should deploy on Sepolia.

Hey :wave:

As @Jat mentioned we stopped supporting zama’s old devnet. Could you try deploying on sepolia testnet?

You can check the newer docs here: Welcome to fhEVM | fhEVM
Also if you are using Remix this tutorial is the most up to date: Using Remix | fhEVM

And in case you have some more issues and need faster answers you can join our telegram group for fhevm devs Telegram: Contact @zamadevs :blush: