Can I update pragma solidity of logical contract?

I have a proxy with pragma solidity 0.8.16 and a contract in version 0.8.16 as well, but I need to update to 0.8.17 the logical contract because of a bug in compilation 0.8.16 and it affected my logical contract, I can compile the logical contract for 0.8.17, even with proxy in version 0.8.16?

Dear, @ano9823
I think it is impossible
You must redeploy smart contract with compiler version 0.8.17

@warrior_dragon I compiled the contract in version 0.8.16, at the time it had no bugs.

but found medium-high bug from version 0.8.13 to 0.8.16 and fixed only in 0.8.17

I don't know if the proxy contract, it might have this bug, I'm using the transparent contract.

This bug: https://blog.soliditylang.org/2022/09/08/storage-write-removal-before-conditional-termination/

I'm using:
openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol

@ano9823
Could you share your contract address?

@warrior_dragon this one with bug version 0.8.16: https://testnet.bscscan.com/address/0xada99a4572b949ed8a81c6f798003849555c183d#code

But I don't know if the proxy contract is hit by the bug.

You need to refer to the bug report to understand if your contract is affected. It likely isn't.

If it is, you can't change it and you need to find a workaround.

1 Like

@frangio maybe i can update the logical contract to 0.8.17 but the proxy can't, the proxy is an admin proxy contract and transparent proxy but i don't know if that was affected by the bug.

does anyone have an idea what to do?

Like I said before, you need to check if you are actually affected by the bug. Your contract is most likely not affected and in that case there is nothing that you need to do.

@frangio if the proxy is unaffected then everything is fine. this makes me calmer.

I understood that the bug is after a condition.