Hi,
(I’m sorry for the crappy look of this post but as a new user, I cannot post links or images)
I was playing around with Zama’s testnet and I tried to deploy an encrypted ERC20 from this file
github /zama-ai/fhevm/blob/main/examples/EncryptedERC20.sol
I’m using remix with Zama’s custom plugin.
I can deploy the contract and call decimals(); name(); owner(); pendingOwner(); symbol() and decimals().
I can even transfer, accept and renounce ownership.
For some reason every function implementing FHE logic fails.
When calling the contract function from Zama’s plugin it just display transaction failed, but when calling it the old fashion way from remix “deploy and run transactions” tab, the transactions are pushed to the devnet and reverted.
So I can’t mint any new token and cannot call other functions.
Code is same as github except for that specific line :
import "../lib/TFHE.sol";
Which I replaced by :
import "https://github.com/zama-ai/fhevm/blob/main/lib/TFHE.sol";
In remix in order to import the files correctly.
I even tried by installing the node library using
npm install fhevm
and
npm install fhevm@0.6.0-0
because the first one gave me an outdated version.
This is not working either so I decided to stick to the first attempt setup, the basic remix environment.
What I figured is that somehow remix is pulling some outdated dependencies from node (fhevm-core-contracts/addresses).
Remix pulls the fhevm-core-contracts from npm.
It looks like there are differencies between the addresses of the fhevm github repo and the fhevm-core-contracts on npm.
For example :
ACL address in fhevm-core-contracts is : 0x339EcE85B9E11a3A3AA557582784a15d7F82AAf2
On github it’s 0x2Fb4341027eb1d2aD8B5D9708187df8633cAFA92
github /zama-ai/fhevm/blob/release/0.5.x/lib/ACLAddress.sol
and there are others (CoprocessorAddress.sol, FHEPaymentAddress.sol, FHEPaymentAddress.sol etc…).
I’ve tried modifying these addresses but I can’t get it to work. To be honest I don’t know which one is correct. It seems that another user had the same issue withe the Encrypted ERC20 2 days earlier.
Thanks to whoever read that.