-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation errors when using multiple pragmas and solc >= 0.7.4 #611
Comments
Are you using the latest solidity-coverage version? (0.7.14) Can you show the relevant solidity files? |
as far as I can tell, it is related to using |
Example file: // SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.7.6;
pragma abicoder v2;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IGeyser} from "../Geyser.sol";
import {IFactory} from "../Factory/IFactory.sol";
import {IUniversalVault} from "../UniversalVault.sol";
contract MockStakeHelper {
function flashStake(
address geyser,
address vault,
address recipient,
uint256 amount,
bytes calldata lockPermission,
bytes calldata unstakePermission
) external {
IGeyser(geyser).stake(vault, amount, lockPermission);
IGeyser(geyser).unstakeAndClaim(vault, recipient, amount, unstakePermission);
}
function stakeBatch(
address[] calldata geysers,
address[] calldata vaults,
uint256[] calldata amounts,
bytes[] calldata permissions
) external {
for (uint256 index = 0; index < vaults.length; index++) {
IGeyser(geysers[index]).stake(vaults[index], amounts[index], permissions[index]);
}
}
} |
yessir |
Ah it might be a bug introduced in that version - some logic was added to support file level function definitions and it might not handle multiple pragmas correctly. Could you see if downgrading to 0.7.13 fixes? |
Indeed - downgrading fixed it! |
Ok sweet - thanks for reporting. |
Hello
Regards |
@giosdas Thanks for pinging. Just patched this in |
The text was updated successfully, but these errors were encountered: