Hi everyone!
I have successfully deployed an implementation of the ConfidentialERC20Mintable contract (from fhevm-contracts) on the Sepolia Testnet. I am currently interacting with it from the Ethers library (version 6.15.0), which is running on Node.js.
I am using the same account that I have deployed the contract to make the calls. When the GetBalance function is called, the balance of the account is returned correctly but in plain text rather than encrypted. What are the reasons for this? I have encountered the same issue when checking my balance on Etherscan. That is the first question I would like to discuss.
The second issue I am experiencing occurs when I attempt to mint tokens. Please be advised that Sepolia is reverting the transaction with the following error message:
Error: Error: transaction execution reverted (action="sendTransaction", data=null, reason=null, invocation=null, revert=null, transaction={ "data": "", "from": "0x8D9...d3", "to": "0x5c..ce" }, receipt={ "_type": "TransactionReceipt", "blobGasPrice": null, "blobGasUsed": null, "blockHash": "0xa27..e6", "blockNumber": 00000, "contractAddress": null, "cumulativeGasUsed": "24476964", "from": "0x8D9...d3", "gasPrice": "932686919", "gasUsed": "31498", "hash": "0x7af6d0d1aa7299...a1dced099fb840d", "index": 162, "logs": [ ], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "root": null, "status": 0, "to": "0x5c..ce" }, code=CALL_EXCEPTION, version=6.15.0)
at makeError (file:///home/ubuntu/backend/node_modules/ethers/lib.esm/utils/errors.js:132:21)
at assert (file:///home/ubuntu/backend/node_modules/ethers/lib.esm/utils/errors.js:151:15)
at checkReceipt (file:///home/ubuntu/backend/node_modules/ethers/lib.esm/providers/provider.js:1127:13)
at JsonRpcProvider.txListener (file:///home/ubuntu/backend/node_modules/ethers/lib.esm/providers/provider.js:1173:33)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
code: 'CALL_EXCEPTION',
action: 'sendTransaction',
data: null,
reason: null,
invocation: null,
revert: null,
transaction: {
to: '0x5c..ce',
from: '0x8D9...d3',
data: ''
},
receipt: TransactionReceipt {
provider: JsonRpcProvider {},
to: '0x5c..ce',
from: '0x8D9...d3',
contractAddress: null,
hash: '0x7af6d0d1aa7299a6189446b4827228588771a53daa790d0a3a1dced099fb840d',
index: 162,
blockHash: '0xa27..e6',
blockNumber: 00000,
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
gasUsed: 31498n,
blobGasUsed: null,
cumulativeGasUsed: 24476964n,
gasPrice: 932686919n,
blobGasPrice: null,
type: 2,
status: 0,
root: undefined
},
shortMessage: 'transaction execution reverted'
It seems that there is no data in mint transaction, but I do not why. The following code represents the way in which I make the call:
const tx = await contract.mint(signerAddress, 1000, {
gasLimit: 100_000n,
});
Can you help me answer these two questions?
Thank you so much!
Best regards