kfastov / worldcoin-bridge-linea

World ID state bridge for Linea
MIT License
6 stars 23 forks source link

Upgrade the Solidity version #11

Closed kfastov closed 2 months ago

kfastov commented 3 months ago

Hey team,

I'm thinking about importing Linea base contracts and interfaces directly from their repository. However, there's an issue: Linea contracts require Solidity v0.8.19, while our repo is on v0.8.15.

We chose this version to match the original state bridge repo. But do we really need to stick with v0.8.15, or can we upgrade to v0.8.19?


Updates from smart guys in the comments:

Jemiiah commented 3 months ago

also @kfastov i think we need to upgrade the repo to the 0.8.19 version cause i think linea contracts is not backwards compatible so it’s best to upgrade your implementation to 0.8.19 or use the caret to make your contracts forward compatible ^0.8.15

1.  Upgrade to v0.8.19: Update your project to use Solidity v0.8.19. This ensures full compatibility with the Linea contracts.
2.  Use Caret Versioning: In your Solidity contracts, specify the version with a caret to allow for forward compatibility:

pragma solidity ^0.8.15;

2.  This means your contracts will be compatible with any compiler version from v0.8.15 up to, but not including, v0.9.0.
3.  Run Tests and Check Dependencies: After upgrading, thoroughly test your project to ensure everything works as expected and check that all dependencies are compatible with the new version.
Jemiiah commented 3 months ago

does this answer satisfy your question ser?

kfastov commented 3 months ago

Hi @Jemiiah ! That's a good point. Also we'll be able to use more recent release versions of OZ and other dependencies. But I think it's better to start working on this issue after merging all pending PRs.

Jemiiah commented 3 months ago

@kfastov that sounds like a solid plan. I’ll be waiting for the prs to get merged

KodeSage commented 3 months ago

Hi @kfastov , I think we should upgrade to 0.8.19, so it can be compatible with the linear contracts.

also I the original state bridge repo is compatible with latter versions too.

piavgh commented 3 months ago

if they did the semver right, upgrading from 0.8.15 to 0.8.19 will cause no backward incompatible issue (we only update the patch version - major.minor.patch) But it's safer to check Solidity changelog carefully before proceeding v0.8.15: https://github.com/ethereum/solidity/blob/develop/Changelog.md#0815-2022-06-15 ... v0.8.19: https://github.com/ethereum/solidity/blob/develop/Changelog.md#0819-2023-02-22

kfastov commented 3 months ago

@Jemiiah the PRs are merged now, and I can assign this issue to you if you want, but I want to warn you that it's no longer part of ODHack because it's over

Jemiiah commented 3 months ago

sorry @kfastov i saw this information late I would love to take the work regardless

Jemiiah commented 3 months ago

also @kfastov what does that mean if it’s no longer part of ODHack

kfastov commented 3 months ago

also @kfastov what does that mean if it’s no longer part of ODHack

Hi @Jemiiah ! It means that I can't guarantee that this contribution will be 100% rewarded πŸ˜„

Jemiiah commented 3 months ago

okay @kfastov that still sounds promising πŸ˜‚πŸ˜‚ I’ll get right into it πŸš€πŸš€

kfastov commented 3 months ago

Cool cool! I'll change the description a bit to better fit the goal

Jemiiah commented 3 months ago

Alright thanks πŸš€

kfastov commented 2 months ago

I think it can be closed now