Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    rudolfix
    @rudolfix
    I think there was a bug there and in fact revert codes were not generated. At least I didn't manage to get them in that version. Ganache CLI v6.1.8 (ganache-core: 2.2.1) this one worked from the get go. revert codes are game changer in testing :) so yes if you could update the packages I'd be really grateful
    thanks!
    area
    @area
    We have been using revert codes with solidity coverage at colony without issue, so there's something we're missing
    cgewecke
    @cgewecke
    @rudolfix Can confirm what area says above . . . I think what's going on is that in 6.1.6 they started passing back the return data and Truffle V5 was able to do the message decoding on it's side. In 6.1.8 they decided to add the code to the error message string on the ganache side. trufflesuite/ganache-core@a04585c
    I guess we should upgrade ganache-core again because agree this really helpful.
    rudolfix
    @rudolfix
    thank you! you are probably right. I'm using my own fork of truffle because it was lacking overloads.. we'll go back to main branch soon but upgrade of ganache-cli is really appreciated!
    Filip Małachowicz
    @Exef
    Hello! I've tried to update your package to the newest version of ganache-cli, but something is wrong for me. I created own fork of testrpc-sc (https://github.com/Exef/testrpc-sc ) which I updated using ganache-cli master branch. Next I build it, and published it to npm under https://www.npmjs.com/package/ethereumjs-testrpc-sc-fork. I used this as a new dependency of my fork of solidity-coverage (https://github.com/Exef/solidity-coverage/tree/develop). All test passes using new dependency, so for tests I pushed it to npm as https://www.npmjs.com/package/solidity-coverage-fork. I've also corrected all places that used solidity-coverage instead of solidity-coverage-fork (especially require.resolve in app.js). Unfortunately something goes wrong and my truffle package during running solidity-coverage command errors with Error: Cannot find module 'ethereumjs-testrpc-sc-fork/build/cli.node.js', cause there is no build folder inside of the node_modules/ethereumjs-testrpc-sc-fork.
    Victor
    @lacabra
    Hi there, thanks to the project maintainers for your great work on this project, I can't wait to get it integrated in our development. I'm using darq-truffle instead of truffle, and I can't get solidity-coverage to work. I've searched and tried various things to no avail, so I've opened this issue: sc-forks/solidity-coverage#304
    I just wanted to say hello đź‘‹and make myself available here in case I can help troubleshoot this issue faster. Thank you
    George Spasov
    @Perseverance
    @cgewecke Hey guys. George from etherlime here. Quite some time ago I had to change the library for keccak due to heavy installation issues of sol-cov as dependancy.
    Did noticed that I had no response to the PR
    youve probably missed it
    Can you please take a look at it
    I hate for etherlime to be pointing to our own fork repo
    Juwita W
    @juwitaw
    Hi guys, I'm facing error instrumenting when using solidity-coverage on my ERC-20 contract. It said There was a problem instrumenting ./coverageEnv/contracts/LearnToken.sol: SyntaxError: Expected ")", ",", "days", "ether", "finney", "hours", "minutes", "seconds", "szabo", "weeks", "wei", "years", comment, end of line, or whitespace but "*" found.
    on line above
    contract LearnToken is IBuyMechanism, BurnableToken, CappedToken(1200000000 * (10 ** uint256(18))) {
    Any idea how to resolve this beside changing 1200000000 * (10 ** uint256(18)) into 1200000000000000000000000000?
    simonschmoll
    @simonschmoll

    Hey guys, are you already supporting payable addresses?
    Because when I run the coverage I get:
    Skipping instrumentation of ./coverageEnv/contracts/Migrations.sol Instrumenting ./coverageEnv/contracts/Owned.sol Cleaning up... There was a problem instrumenting ./coverageEnv/contracts/Owned.sol: SyntaxError: Expected ";", "=", comment, end of line, or whitespace but "p" found. Line: 7, Column: 21

    Really great that you put a tool out there for test coverage :)

    fpaun23
    @fpaun23
    Good question @simonschmoll , I have the same issue with a contract I am working on.
    address payable public wallet; coverage error: There was a problem instrumenting ./coverageEnv/contracts/AbstractPaymentQuantum.sol: SyntaxError: Expected ";", "=", comment, end of line, or whitespace but "p" found. Line: 7, Column: 21
    As I can see it is not supported and the question would be if is there any solution for this at this moment?
    Stef Heyenrath
    @StefH
    @fpaun23 : I noticed the same. For now I did remove payable from my address.
    Stef Heyenrath
    @StefH

    I've troubles running coverage using:

    solidity-coverage 0.5.11
    Truffle v5.0.0-beta.2 (core: 5.0.0-beta.2)
    [Coverage] Solidity v0.5.0 (solc-js)

    I get an error like

    Error: while migrating Migrations: Returned error: Exceeds block gas limit
    [Coverage]     at ...\node_modules\truffle\build\webpack:\packages\truffle-deployer\src\deployment.js:364:1
    [Coverage]     at <anonymous>
    [Coverage]     at process._tickCallback (internal/process/next_tick.js:188:7)

    Example project can be found at : https://github.com/mstack/bootcamp-blockchain-smartcontracts/tree/master/Lab 2 in the Solidity folder.

    Stef Heyenrath
    @StefH
    It seems to work now. I did change some settings. If you want to know the details, take a look at that Lab 2 or Lab 4 solutions in that GitHub project.
    SolidityPower
    @SolidityDev_twitter

    Hello, I am getting this error:

    Event trace could not be read.
    Error: ENOENT: no such file or directory, open './allFiredEvents'

    How can I fix this?

    Stef Heyenrath
    @StefH

    I fixed this by using nodetouch allFiredEvents

    Example coverage command:

    `"coverage": "npm run clean && nodetouch allFiredEvents && concurrently --names \"GanacheCLI,Coverage\" --kill-others \"node_modules\\.bin\\ganache-cli --quiet --port 8555 --gasPrice 0x01 --gasLimit 0xfffffffffff --allowUnlimitedContractSize\" \"node_modules\\.bin\\solidity-coverage\" || true",
    Guy Lando
    @guylando
    no matter what I do solidity-coverage runs out of gas (while normal test does not run out of gas). I even increased ganache gas limit to 40 million and truffle config coverage network gas limit to 20 million and still nothing helps. any ideas?
    transaction with 1,000,000,000 gas still ran out of gas
    Guy Lando
    @guylando
    solved by adding --allowUnlimitedContractSize parameter to testchain
    0age
    @0age
    Hi there - running into an issue using 0.6.0-beta.5 and Solidity 0.5.8 where instrumentation is inserting events in require statements between the close parenthesis and the semicolon, i.e. require(value == true, "value cannot be false")<emit __BAD_INSTRUMENTATION_GOING_HERE>;
    Getting ParsedContract.sol:129:6: ParserError: Expected ';' but got 'emit'
    Any idea what could be causing this or how to go about fixing it? I wasn't hitting this error back when the contract was pared down a bit from its current size if it's any help
    0age
    @0age
    Found the cause - I had emojis in the comments
    removing them fixed the coverage - interesting edge-case!
    area
    @area
    Ah, right, the old 'how many characters is a Unicode character' dilemma
    Never considered that :)
    0age
    @0age
    Well most sane devs never considered putting emoji in their comments!
    Makoto Inoue
    @makoto
    @cgewecke hello. Do you have any plan about when to release 0.7 mentioned at https://github.com/sc-forks/solidity-coverage/issues/355#issuecomment-514862829 ?
    cgewecke
    @cgewecke
    Hi @makoto, there should be a beta version ready by the end of August. Do you have a repo you would like to use this in? We could use it as a test target for 0.7.0 to make sure everything works ok.
    cgewecke
    @cgewecke
    @makoto The work on 0.7.0 is happening in #357, design discussion for it is happening in #346.
    Makoto Inoue
    @makoto
    I am currently using it at https://github.com/wearekickback/contracts
    I am in the middle of making big change and test coverage started failing even though the same test passes if I run as normal test
    Keen to try out if the latest could fix what I a encountering
    cgewecke
    @cgewecke
    @makoto I opened a PR at wearekickback which might fix: wearekickback/contracts#27
    Makoto Inoue
    @makoto
    ah thanks. I will give a try
    Makoto Inoue
    @makoto
    @cgewecke it passed!!! You are genious!
    Xiao Liang
    @yxliang01
    @cgewecke Happy to see you release 0.7 beta! Thanks for your effort :) This is going to be very helpful. :rocket:
    cgewecke
    @cgewecke
    Thanks @yxliang01!
    Richard Abambillah
    @Anthler

    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); ^-------------------------------------------------------------------------^

    cgewecke
    @cgewecke
    Hi @Anthler - Could you try with the 0.7.0 beta? It avoids rewriting state-mutability modifiers so this error shouldn't occur there...
    npm install --save-dev solidity-coverage@beta
    The installation instructions are different...the beta README is here: https://github.com/sc-forks/solidity-coverage/tree/beta#install