Skip to content

Commit

Permalink
Define Error and Panic with structs since error will not parse …
Browse files Browse the repository at this point in the history
…in 0.6.0
  • Loading branch information
ggiraldez committed Dec 20, 2024
1 parent 9b52fa4 commit 8f1d518
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 37 deletions.
22 changes: 13 additions & 9 deletions crates/solidity/inputs/language/src/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6920,6 +6920,12 @@ codegen_language_macros::compile!(Language(
functions = [],
enabled = From("0.6.2")
),
BuiltInType(
name = "Error",
fields = [BuiltInField(definition = "string reason")],
functions = [],
enabled = From("0.6.0")
),
BuiltInType(
name = "$ErrorType",
fields = [BuiltInField(definition = "bytes4 selector")],
Expand Down Expand Up @@ -6980,6 +6986,12 @@ codegen_language_macros::compile!(Language(
],
functions = []
),
BuiltInType(
name = "Panic",
fields = [BuiltInField(definition = "uint errorCode")],
functions = [],
enabled = From("0.6.0")
),
BuiltInType(
name = "$StringType",
fields = [],
Expand Down Expand Up @@ -7062,14 +7074,6 @@ codegen_language_macros::compile!(Language(
BuiltInVariable(definition = "$MessageType msg"),
BuiltInVariable(definition = "uint now", enabled = Till("0.7.0")),
BuiltInVariable(definition = "$StringType $string"),
BuiltInVariable(definition = "$TransactionType tx"),
BuiltInVariable(
definition = "error Error(string memory reason)",
enabled = From("0.6.0")
),
BuiltInVariable(
definition = "error Panic(uint errorCode)",
enabled = From("0.6.0")
)
BuiltInVariable(definition = "$TransactionType tx")
]
));

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f1d518

Please sign in to comment.