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
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
cargo test fails with errors when the installed solc version is 0.8.0 or above:
running 2 tests
test ds_proxy_code ... FAILED
test ds_proxy_transformer ... FAILED
failures:
---- ds_proxy_code stdout ----
thread 'ds_proxy_code' panicked at 'could not compile DSProxyFactory: SolcError("Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n--> tests/solidity-contracts/DSProxy.sol\n\nWarning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.\n --> tests/solidity-contracts/DSProxy.sol:20:5:\n |\n20 | constructor() public {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\nError: Explicit type conversion not allowed from \"int_const 0\" to \"contract DSAuthority\".\n --> tests/solidity-contracts/DSProxy.sol:51:33:\n |\n51 | } else if (authority == DSAuthority(0)) {\n |
^^^^^^^^^^^^^^\n\nWarning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.\n --> tests/solidity-contracts/DSProxy.sol:94:5:\n |\n94 | constructor(address _cacheAddr) public {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\n")', ethers-middleware/tests/transformer.rs:121:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- ds_proxy_transformer stdout ----
thread 'ds_proxy_transformer' panicked at 'could not compile DSProxyFactory: SolcError("Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n--> tests/solidity-contracts/DSProxy.sol\n\nWarning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.\n --> tests/solidity-contracts/DSProxy.sol:20:5:\n |\n20 | constructor() public {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\nError: Explicit type conversion not allowed from \"int_const 0\" to \"contract DSAuthority\".\n --> tests/solidity-contracts/DSProxy.sol:51:33:\n |\n51 | } else if (authority == DSAuthority(0)) {\n | ^^^^^^^^^^^^^^\n\nWarning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.\n --> tests/solidity-contracts/DSProxy.sol:94:5:\n |\n94 | constructor(address _cacheAddr) public {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\n")', ethers-middleware/tests/transformer.rs:36:10
failures:
ds_proxy_code
ds_proxy_transformer
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.74s
This is because solc of version 0.8.0 cannot compile the test contracts. For example with DSProxy.sol:
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> DSProxy.sol
Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
--> DSProxy.sol:20:5:
|
20 | constructor() public {
| ^ (Relevant source part starts here and spans across multiple lines).
Error: Explicit type conversion not allowed from "int_const 0" to "contract DSAuthority".
--> DSProxy.sol:51:33:
|
51 | } else if (authority == DSAuthority(0)) {
| ^^^^^^^^^^^^^^
Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
--> DSProxy.sol:94:5:
|
94 | constructor(address _cacheAddr) public {
| ^ (Relevant source part starts here and spans across multiple lines).
We should probably do one of the followings:
make such incompatibility explicit by adding <0.8.0 to the pragma statements;
document this incompatibility in the Running the tests section on README;
update the test contracts so that that work with 0.8.0+
The text was updated successfully, but these errors were encountered:
The conversion is only allowed when there is at most one change in sign, width or type-category...
...
- Contract(uint): converting both type-category and width. Replace this by Contract(address(uint160(uint))).
cargo test
fails with errors when the installedsolc
version is0.8.0
or above:This is because
solc
of version 0.8.0 cannot compile the test contracts. For example withDSProxy.sol
:We should probably do one of the followings:
<0.8.0
to thepragma
statements;Running the tests
section on README;The text was updated successfully, but these errors were encountered: