Skip to content

Commit

Permalink
Add support for Solidity using the Solang compiler
Browse files Browse the repository at this point in the history
anchor init has a new option `-s` (or `--solidity`) which creates an
example using Solidity in the soldity directory of the anchor workspace.

anchor deploy/build/test work accordingly.

solang is required to be in the path, this can be downloaded from the
release at https://github.com/hyperledger/solang

anchor build/deploy finds all the solidity contracts by using the
solidity parser to find all contract declarations.

Next steps:
 - Seek feedback
 - Add solang to solana SDK
 - Improve examples
  • Loading branch information
seanyoung committed Mar 24, 2023
1 parent 00b57ba commit 02950d9
Show file tree
Hide file tree
Showing 6 changed files with 957 additions and 54 deletions.
209 changes: 209 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ anchor-syn = { path = "../lang/syn", features = ["idl", "init-if-needed"], versi
serde_json = "1.0"
shellexpand = "2.1.0"
toml = "0.5.8"
# solang parser may change in releases
solang-parser = "=0.2.3"
semver = "1.0.4"
serde = { version = "1.0.122", features = ["derive"] }
solana-sdk = "1.14.16"
Expand Down
Loading

0 comments on commit 02950d9

Please sign in to comment.