You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context from the perspective of new developers following quick-start guide from LayerZero docs but trying to use Foundry instead of using this repository and Hardhat:
When setting up Foundry and installing OpenZeppelin libraries by default it will install latest version (>= 5). This results in the error in OmniCounter example:
➜ lzcross git:(master) ✗ forge build
[⠊] Compiling...
[⠊] Installing Solc version 0.8.23
[⠔] Successfully installed Solc 0.8.23
[⠊] Compiling 35 files with 0.8.23
[⠢] Solc 0.8.23 finished in 459.69ms
Error:
Compiler run failed:
Error (3415): No arguments passed to the base constructor. Specify the arguments or mark "OmniCounter" as abstract.
--> src/OmniCounter.sol:9:1:
|
9 | contract OmniCounter is NonblockingLzApp {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> lib/openzeppelin-contracts/contracts/access/Ownable.sol:38:16:
|
38 | constructor(address initialOwner) {
|
Seems easily fixable though by changing constructor in LzApp.sol to:
OZ recently released a major upgrade https://blog.openzeppelin.com/introducing-openzeppelin-contracts-5.0 these contracts should be updated to resolve the backwards incompatible changes
The text was updated successfully, but these errors were encountered: