hedera-local-node icon indicating copy to clipboard operation
hedera-local-node copied to clipboard

Support hardhat and foundry console.log

Open ebadiere opened this issue 1 year ago • 0 comments

Problem

When iteratively developing smart contracts against a local node, the console.log from frameworks like hardhat and foundry are very useful and time savers. The alternative is to define DEBUG events, and emit them in the smart contracts and then read them in the driving javascript or typescript code. The console.log requires one import into the contract being developed and the it can be used to log values in the local node running.

Solution

  • support the hardhat console.log, "import "hardhat/console.sol";
  • support the foundry console.log "import "forge-std/console.sol";

Alternatives

Emitting debug events as described above.

ebadiere avatar Nov 06 '23 22:11 ebadiere