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

generate contract interfaces #4

Open
richard-ramos opened this issue Mar 15, 2019 · 0 comments
Open

generate contract interfaces #4

richard-ramos opened this issue Mar 15, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@richard-ramos
Copy link
Member

richard-ramos commented Mar 15, 2019

It would be interesting if flattener could be used to generate the interface of a contract, just like in this example

 1 pragma solidity ^0.5.0;
 2 
 3 contract SimpleStorage {
 4   uint public storedData;
 5 
 6   constructor(uint initialValue) public {
 7     storedData = initialValue;
 8   }
 9 
10   function set(uint x) public {
11     storedData = x;
12   }
13 
14   function get() public view returns (uint retVal) {
15     return storedData;
16   }
17 
18 }

generated interface:

  1 pragma solidity ^0.5.0;
  2 
  3 interface SimpleStorage {
  4   uint public storedData;
  5   constructor(uint initialValue) public;
  6   function set(uint x) public;
  7   function get() public view returns (uint retVal);
  8 }

(Could be part of the scaffolding instead of the flattener)

@richard-ramos richard-ramos added the enhancement New feature or request label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant