Skip to content

pinkiebell/develatus-apparatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

develatus-apparatus - Solidity coverage tool πŸ› πŸ”¬

develatus-apparatus

How it works

The develatus-apparatus (πŸ‘) acts as a RPC proxy between your node and application / integration tests. It intercepts eth_call, eth_sendTransaction and eth_sendRawTransaction calls and uses debug_trace{Transaction||Call} to create a coverage report for Contracts it derives from your build artifacts.

Notes

  • Tested with geth v1.9.25.
  • Uses the debug_trace{Transaction||Call} - JavaScript Tracer
  • You may have to enable the debug-rpc api. Like --rpcapi=eth,net,web3,debug

How to use

Just run develatus-apparatus inside your project folder, it reads a configuration file named .develatus-apparatus.js .

Example contents of that file:

export default {
  testCommand: 'yarn mocha --timeout 120000 test/contracts/*.js',
  artifactsPath: 'build/contracts',
  proxyPort: 8333,
  rpcUrl: 'http://localhost:8222',
  fuzzyMatchFactor: 0.8,
  ignore: /(mocks|test)\/.*\.sol/,
  solcSettings: {
    evmVersion: 'istanbul',
    optimizer: {
      enabled: true,
      runs: 256,
      details: {
        peephole: true,
        jumpdestRemover: true,
        orderLiterals: false,
        deduplicate: true,
        cse: true,
        constantOptimizer: true,
        yul: false,
      },
    },
    metadata: {
      'bytecodeHash': 'none',
    },
  },
};

TODO: More readme πŸͺ

About

develatus-apparatus - Solidity coverage tool πŸ› πŸ”¬

Resources

License

Stars

Watchers

Forks