Skip to content

Commit

Permalink
feat(abi): introduce solidity compatible function ABI (#179)
Browse files Browse the repository at this point in the history
* feat(abi): introduce macro impl_codec for encoding ABIs

* chore(deps): upgrade dependencies

* feat(evm): introduce solidity abi

* feat(abi): conditonal compilation

* chore(abi): rename evm-abi to sol-abi

* ci(dep): review dep only on PR

* chore(RELEASES): append RELEASES note
  • Loading branch information
clearloop authored Dec 16, 2023
1 parent 5014cbd commit 387999b
Show file tree
Hide file tree
Showing 25 changed files with 342 additions and 143 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
dep:
name: Review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down
57 changes: 20 additions & 37 deletions Cargo.lock

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

48 changes: 25 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ members = [
"cli/conta",
"cli/elko",
"codegen",
"codegen/opcodes",
"compiler",
"compiler/filetests",
"evm/opcodes",
"evm/abi",
"zink/codegen",
"zint",
]
Expand All @@ -22,42 +23,43 @@ homepage = "https://github.com/clearloop/zink"
repository = "https://github.com/clearloop/zink.git"

[workspace.dependencies]
anyhow = "1.0.71"
cargo_metadata = "0.15.4"
clap = "4.3.10"
anyhow = "1.0.75"
cargo_metadata = "0.18.1"
clap = "4.4.11"
curl = "0.4.44"
color-eyre = "0.6.2"
colored = "2.0.4"
colored = "2.1.0"
crates-io = "0.37.0"
etc = "0.1.16"
ethers = "2.0.11"
hex = "0.4.3"
indexmap = "2.0.0"
once_cell = "1.18.0"
indexmap = "2.1.0"
once_cell = "1.19.0"
parking_lot = "0.12.1"
paste = "1.0.13"
paste = "1.0.14"
postcard = { version = "1.0.8", default-features = false }
proc-macro2 = "1.0.69"
proc-macro2 = "1.0.70"
quote = "1.0.33"
revm = "3.5.0"
semver = "1.0.18"
serde = "1.0.171"
sha3 = "0.10.6"
smallvec = "1.11.0"
syn = { version = "2.0.38", features = [ "full" ] }
target-lexicon = "0.12.8"
thiserror = "1.0.40"
tokio = "1.34.0"
toml = "0.7.6"
tracing = "0.1.37"
tracing-subscriber = "0.3.17"
url = "2.4.1"
semver = "1.0.20"
serde = "1.0.193"
sha3 = "0.10.8"
smallvec = "1.11.2"
syn = { version = "2.0.41", features = [ "full" ] }
target-lexicon = "0.12.12"
thiserror = "1.0.50"
tokio = "1.35.0"
toml = "0.8.8"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
url = "2.5.0"
wasm-opt = "0.113.0"
wasmparser = "0.107.0"
wat = "1.0.75"
wat = "1.0.82"

elko = { path = "cli/elko", version = "=0.1.7" }
opcodes = { package = "evm-opcodes", path = "codegen/opcodes", version = "=0.0.3", features = ["data"] }
opcodes = { package = "evm-opcodes", path = "evm/opcodes", version = "=0.0.3", features = ["data"] }
sol-abi = { path = "evm/abi", version = "=0.0.1" }
zabi = { path = "abi", version = "=0.1.7" }
zinkup = { path = "cli", version = "=0.1.7" }
zingen = { path = "codegen", version = "=0.1.7" }
Expand Down
8 changes: 8 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v0.1.8

### Changes

- Solidity compatible ABI
- Refactor `zabi` a wrapper a `sol-abi`
- Conditional compilation for abi related crates

## v0.1.7

### Added
Expand Down
23 changes: 18 additions & 5 deletions abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ license.workspace = true
repository.workspace = true

[dependencies]
hex.workspace = true
postcard = { workspace = true, default-features = false, features = [ "use-std" ] }
serde = { workspace = true, features = [ "derive" ] }
sha3.workspace = true
thiserror.workspace = true
sol-abi.workspace = true

# optional features
hex = { workspace = true, optional = true }
postcard = { workspace = true, default-features = false, features = [ "use-std" ], optional = true }
serde = { workspace = true, features = [ "derive" ], optional = true }
sha3 = { workspace = true, optional = true }
syn = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }

# TODO: introduce feature alloc.
[features]
default = [ "hex", "selector", "syn" ]
bytes = [ "postcard", "serde" ]
hex = [ "dep:hex", "thiserror", "bytes" ]
selector = [ "sha3" ]
serde = [ "dep:serde", "sol-abi/serde" ]
syn = [ "dep:syn", "sol-abi/syn" ]
Loading

0 comments on commit 387999b

Please sign in to comment.