-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(chisel): Introduces a Solidity REPL #3465
Changes from all commits
e16f4c1
78f2f3c
f01a669
67d69a4
e7ea207
03474b2
953a845
cee35fd
1fe513d
b55227d
fc55768
8a7ea0c
0550d41
fe3862b
db80ca6
63eb7fd
87d50d9
e4112d2
299ffb9
3369bdb
22b801e
f07bc0b
deecf67
fff94d9
993f237
d885070
47ba73b
bb955b4
e3b2a60
607b103
4762dca
29f843b
2b233b5
cc79fdc
e73a2e2
9be045d
cc29c1a
0aad10b
5089fb5
7eaccad
eca445d
b28e007
b4366e4
6883033
0c1639a
ecbf347
2ef28c0
a4653b8
3f834d8
263f591
1dfad75
e0707d9
db271b7
13b7acb
9470f1a
cb23b1e
4dbc1d2
7eda9c2
07e40ea
e61bf4b
e9e2ae2
084f11b
9dd2159
684d3bb
1556c28
f7384bf
17f8dd0
8cd68aa
a55c772
600686f
cd4d3ca
69cda3c
da1ba6b
ce7b476
ac2f2ff
c9b2cf8
7e6dc0e
a3080d2
0a2eff0
096b7aa
39f172c
c3aeb06
7bf4fe8
01814ee
be18834
6b32b6c
38496db
e23160d
938e516
1f9d53c
78f3cb6
e366920
ff081b7
061a5b7
55d1d6d
1267808
79d4fde
d03c8d5
7024c44
840df92
f2a9583
e5af529
46ac42c
9503cc7
930f16b
33c416c
59da0cc
e6ed1ee
6ca012b
00d6ffd
f33fe04
a812f38
f565984
723fdd9
6aac079
321bb3a
927c291
139ff3f
caad14e
73cf641
0047d51
374e111
63bc09b
cd60940
33777bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ members = [ | |
"forge", | ||
"ui", | ||
"utils", | ||
"chisel", | ||
] | ||
|
||
[profile.dev] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[package] | ||
name = "chisel" | ||
version = "0.1.1" | ||
edition = "2021" | ||
authors = [ | ||
"clabby <https://github.com/clabby>", | ||
"asnared <https://github.com/abigger87>" | ||
] | ||
description = "Solidity REPL" | ||
repository = "https://github.com/foundry-rs/foundry/tree/main/chisel" | ||
license = "MIT" | ||
keywords = ["Rust", "Ethereum", "Foundry", "Chisel", "REPL", "Solidity", "Solang"] | ||
|
||
[lib] | ||
name = "chisel" | ||
path = "src/lib.rs" | ||
doctest = false | ||
|
||
[[bin]] | ||
name = "chisel" | ||
path = "src/bin/chisel.rs" | ||
|
||
[dependencies] | ||
foundry-evm = { path = "../evm" } | ||
forge = { path = "../forge" } | ||
foundry-config = { path = "../config" } | ||
foundry-cli = { path = "../cli" } | ||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we want another standalone binary, or should this rather be a forge subcommand @gakonst ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either one works! Let me know what your guys' preference is, can change things around if need be. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ii like the idea of a new binary as long as it works even w/o being inside a foundry project There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sounds good! This is the plan- will work with default configuration / any supplied flags if outside of a foundry project. Was planning on adding certain features that are enabled if the pwd is a foundry project if that's okay, though:
|
||
foundry-common = { path = "../common" } | ||
forge-fmt = { path = "../fmt" } | ||
tokio = { version = "1.21.2", features = ["full"] } | ||
clap = { version = "4.0", features = ["derive", "env", "wrap_help"] } | ||
rustyline = "10.0.0" | ||
solang-parser = "0.1.18" | ||
ethers = { git = "https://github.com/gakonst/ethers-rs" } | ||
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", features = ["project-util", "full"] } | ||
yansi = "0.5.1" | ||
strum = { version = "0.24.1", features = ["derive"] } | ||
serde = "1.0.145" | ||
serde_json = { version = "1.0.85", features = ["raw_value"] } | ||
semver = "1.0.14" | ||
bytes = "1.2.1" | ||
revm = "2.1.0" | ||
eyre = "0.6.8" | ||
dirs = "4.0.0" | ||
time = { version = "0.3.15", features = ["formatting"] } | ||
reqwest = "0.11.12" | ||
|
||
[dev-dependencies] | ||
serial_test = "0.9.0" | ||
criterion = "0.4.0" | ||
|
||
[build-dependencies] | ||
# used to generate constants | ||
vergen = { version = "7.0", default-features = false, features = ["build", "rustc", "git"] } | ||
|
||
[[bench]] | ||
name = "session_source" | ||
harness = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(arbitrary comment location to start a thread)
Is there a way to log the results of statements, for example in solidity shell I'll often test things like this
You can see solidity-shell shows the output of
1 << 4
but chisel does notThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, was planning on getting on expression evaluation over the weekend 😄 See: checklist.
Will require a small refactor of the current inspection logic, but shouldn't be too bad. At the moment, you have to assign values to a variable before inspecting them, which is pretty bad devx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry missed that in the checklist! Makes sense 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a fairly stable state now. Let me know if you run into any issues with it!