We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to run compileSourceString(fileName, srcAsStr, compilerVersionArray), on the following contract:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract CharleneSample is ERC20, Ownable { constructor() ERC20("Sample", "SPL") Ownable(msg.sender) { _mint(msg.sender, 1000000 * 10 ** decimals()); // Mint initial supply to contract creator } function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } }
I get the following error:
response: 'Unable to compile: Compiler Errors: ==== 0.8.23 ====:\n' + ' TypeError: Wrong argument count for constructor call: 1 arguments given but expected 0\n' + ' --> contracts/CharleneSimple.sol:7:35:\n' + ' |\n' + '7 | contract CharleneSample is ERC20, Ownable(msg.sender) {\n' + ' | ^^^^^^^^^^^^^^^^^^^\n' + '\n' + '\n', status: 400, options: undefined }
It seems like solc-typed-ast for some reason doesn't recognize that Ownable takes in a constructor argument.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to run compileSourceString(fileName, srcAsStr, compilerVersionArray), on the following contract:
I get the following error:
It seems like solc-typed-ast for some reason doesn't recognize that Ownable takes in a constructor argument.
The text was updated successfully, but these errors were encountered: