-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import hy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(import click) | ||
(import pathlib [Path]) | ||
(import helpers *) | ||
(import dasy.cli.helpers *) | ||
|
||
|
||
(defn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(import sys) | ||
(import click) | ||
(import dasy [compiler parser]) | ||
(import vyper.compiler [OUTPUT_FORMATS as VYPER_OUTPUT_FORMATS]) | ||
(import dasy.parser.output [get_external_interface]) | ||
|
||
|
||
|
||
(setv format_help = """ | ||
Format to print, one or more of: | ||
bytecode (default) - Deployable bytecode | ||
bytecode_runtime - Bytecode at runtime | ||
abi - ABI in JSON format | ||
abi_python - ABI in python format | ||
source_map - Vyper source map | ||
method_identifiers - Dictionary of method signature to method identifier | ||
userdoc - Natspec user documentation | ||
devdoc - Natspec developer documentation | ||
combined_json - All of the above format options combined as single JSON output | ||
layout - Storage layout of a Vyper contract | ||
ast - AST in JSON format | ||
external_interface - External (Dasy) interface of a contract, used for outside contract calls | ||
vyper_interface - External (Vyper) interface of a contract, used for outside contract calls | ||
opcodes - List of opcodes as a string | ||
opcodes_runtime - List of runtime opcodes as a string | ||
ir - Intermediate representation in list format | ||
ir_json - Intermediate representation in JSON format | ||
hex-ir - Output IR and assembly constants in hex instead of decimal | ||
no-optimize - Do not optimize (don't use this for production code) | ||
""") | ||
|
||
(setv OUTPUT_FORMATS (VYPER_OUTPUT_FORMATS.copy)) | ||
(setv ) | ||
|
||
|
||
OUTPUT_FORMATS = VYPER_OUTPUT_FORMATS.copy() | ||
OUTPUT_FORMATS["vyper_interface"] = OUTPUT_FORMATS["external_interface"] | ||
OUTPUT_FORMATS["external_interface"] = get_external_interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters