Skip to content
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

Deploying Balancer Contracts -> ParserError: Expected pragma on @balancer-labs/v2-interfaces && @balancer-labs/v2-solidity-utils #2567

Open
0xEmilio opened this issue Jul 1, 2024 · 1 comment

Comments

@0xEmilio
Copy link

0xEmilio commented Jul 1, 2024

I created a new hardhat project and moved the contracts for weighted pools in.

When I call npx compile, I am met with:

PS C:\Users\---\Documents\programming\---\hardhat> npx hardhat compile
@balancer-labs/v2-interfaces/contracts/solidity-utils/helpers/BalancerErrors.sol:24:1: ParserError: Expected pragma, import directive or contract/interface/library/struct/enum definition.
function _require(bool condition, uint256 errorCode) pure {
^------^

@balancer-labs/v2-solidity-utils/contracts/helpers/ScalingHelpers.sol:35:1: ParserError: Expected pragma, import directive or contract/interface/library/struct/enum definition.
function _upscale(uint256 amount, uint256 scalingFactor) pure returns (uint256) {
^------^

Error HH600: Compilation failed

my hardhat config:


/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: {
    version: "0.7.0",
    settings: {
      optimizer: {
        enabled: true,
        runs: 200,
      },
    },
  },
};

and deps

        "@balancer-labs/v2-interfaces": "^0.4.0",
        "@balancer-labs/v2-pool-utils": "^4.1.1",
        "@balancer-labs/v2-solidity-utils": "^4.0.0"
      },```
      
Curious if this is me doing something dumb or if compilation fails due to an actual issue. Thanks.
@0xEmilio
Copy link
Author

0xEmilio commented Jul 3, 2024

Seems like the code is not encapsulated, doing do requires refactoring so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant