Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a way to print console.log in smart contracts #792

Closed
RomanHiden opened this issue Oct 5, 2020 · 1 comment
Closed

Create a way to print console.log in smart contracts #792

RomanHiden opened this issue Oct 5, 2020 · 1 comment

Comments

@RomanHiden
Copy link

Overview

Smart contracts are hard to debug. This feature would allow printing console.log messages. Currently the only way to debug transactions is thru tx.call_trace() and tx.subcalls

Specification

inlucde EVM that does allow printing console.log.
https://buidler.dev/buidler-evm/

pragma solidity >=0.4.25 <0.7.0;

 import "./ConvertLib.sol";
+import "@nomiclabs/buidler/console.sol";

...

    function sendCoin(address receiver, uint amount) public returns(bool sufficient) {
+       console.log(msg.sender, receiver, amount);
        if (balances[msg.sender] < amount) return false;

Dependencies

@nomiclabs

@iamdefinitelyahuman
Copy link
Member

Closing as a duplicate of #480

I'm definitely into this idea, it's just a big job and haven't found the bandwidth for it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants