Hello, I integrated solidity-coverage with my smart contract and I run into these issues. Is there any help or workaround
TypeError: Overriding function changes state mutability from "view" to "nonpayable".
function acceptRelayedCall(
^ (Relevant source part starts here and spans across multiple lines).
tabookey-gasless/contracts/IRelayRecipient.sol:35:5: Overridden function is here:
function acceptRelayedCall(address ... alData) public view returns (uint);
^-------------------------------------------------------------------------^
npm install --save-dev solidity-coverage@beta
--network
flag, specifying the network you usually use with your tests:truffle run coverage --network <your-test-network-name>
development: {
host: '127.0.0.1',
port: 8545,
network_id: '*', // Match any network id
},
coverage: {
host: 'localhost',
network_id: '*',
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
}
truffle test
?
truffle run coverage
.
During instrumentation:
interface/IERC20.sol
solidity-coverage cleaning up, shutting down ganache server
ParserError: Could not instrument: interface/IERC20.sol. (Please verify solc can compile this file without errors.) extraneous input 'abstract' expecting {<EOF>, 'pragma', 'import', 'contract', 'interface', 'library'} (9:0)
etherlime
working with solidity-coverage
before. Do you currently support this scenario? I am hitting a lot of issues trying to either use the etherlime
coverage functionality (which utilises 0x coverage tool under the bonnet) or use the solidity-coverage
on top of an etherlime
project. I don’t get why the tools have to be so tied in with the test/deploy framework underneath, i.e. solidity-coverage
with truffle
and etherlime
with 0x coverage
I don’t get why the tools have to be so tied in with the test/deploy framework underneath, i.e. solidity-coverage with truffle and etherlime with 0x coverage
Hello,
I am Getting compilation failed error while generation coverage, precisely after instrumentation and truffle compile is working fine
Error:
* Line 1, Column 1
Syntax error: value, object or array expected.
* Line 1, Column 2
Extra non-whitespace after JSON value.
Compilation failed. See above.
My solidity version is 0.5.7
Please check this for my truffle-config and .solcover.js https://ethereum.stackexchange.com/questions/79460/compilation-failed-during-instrumentation-of-solidity-coverage
Could anyone help me if i am doing any mistake in config
updated solidity-coverage version to 0.7.1 and truffle 5.0.31
Getting this error now, during compilation after instrumentation
> solidity-coverage cleaning up, shutting down ganache server
Error: TypeError: Cannot convert undefined or null to object
at Object.compile (/home/udkreddy/Dushyanth/NexusMutual/nxm-smart-contracts/node_modules/truffle/build/webpack:/packages/truffle-workflow-compile/legacy/index.js?6101:72:1)
at <anonymous>
Find repo here : https://github.com/udkreddy/nxm-smart-contracts/tree/coverage-fix