Skip to content

Commit

Permalink
Merge branch 'main' into erc1155
Browse files Browse the repository at this point in the history
  • Loading branch information
programskillforverification committed Sep 21, 2024
2 parents 1b2d10e + b1eef80 commit 4cbbeb7
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 46 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: check-publish
# This workflow checks that the libraries can be published on crates.io.
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check-publish:
name: Check publish on crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set up rust
uses: dtolnay/rust-toolchain@master
id: toolchain
with:
target: wasm32-unknown-unknown
components: rust-src
toolchain: nightly-2024-01-01

- uses: Swatinem/rust-cache@v2

- name: check motsu-proc
run: cargo publish -p motsu-proc --dry-run

- name: check motsu
run: cargo publish -p motsu --dry-run

- name: check openzeppelin-crypto
run: cargo publish -p openzeppelin-crypto --target wasm32-unknown-unknown --dry-run

# TODO: https://github.com/OpenZeppelin/rust-contracts-stylus/issues/291
# - name: check openzeppelin-stylus
# run: cargo publish -p openzeppelin-stylus --target wasm32-unknown-unknown --dry-run
20 changes: 10 additions & 10 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ edition = "2021"
license = "MIT"
keywords = ["arbitrum", "ethereum", "stylus"]
repository = "https://github.com/OpenZeppelin/rust-contracts-stylus"
version = "0.1.0-rc"

[workspace.lints.rust]
missing_docs = "warn"
Expand Down Expand Up @@ -97,6 +98,14 @@ syn = { version = "2.0.58", features = ["full"] }
proc-macro2 = "1.0.79"
quote = "1.0.35"

# members
openzeppelin-stylus = { path = "contracts" }
openzeppelin-crypto = { path = "lib/crypto" }
motsu = { path = "lib/motsu"}
motsu-proc = { path = "lib/motsu-proc", version = "0.1.0" }
e2e = { path = "lib/e2e" }
e2e-proc = {path = "lib/e2e-proc"}

[profile.release]
codegen-units = 1
panic = "abort"
Expand Down
6 changes: 3 additions & 3 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives = { workspace = true, features = ["tiny-keccak"] }
alloy.workspace = true
tokio.workspace = true
eyre.workspace = true
koba.workspace = true
e2e = { path = "../lib/e2e" }
e2e.workspace = true
serde = "1.0.203"
keccak-const = "0.2.0"
4 changes: 2 additions & 2 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
version = "0.1.0-rc"
version.workspace = true

[dependencies]
alloy-primitives.workspace = true
Expand All @@ -18,7 +18,7 @@ keccak-const.workspace = true

[dev-dependencies]
alloy-primitives = { workspace = true, features = ["arbitrary"] }
motsu = { path = "../lib/motsu" }
motsu.workspace = true
rand.workspace = true

[features]
Expand Down
6 changes: 3 additions & 3 deletions examples/access-control/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions examples/basic/token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions examples/ecdsa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true

Expand Down
6 changes: 3 additions & 3 deletions examples/erc20-permit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives = { workspace = true, features = ["tiny-keccak"] }
stylus-sdk.workspace = true
stylus-proc.workspace = true
Expand All @@ -17,7 +17,7 @@ mini-alloc.workspace = true
alloy.workspace = true
eyre.workspace = true
tokio.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true

[features]
e2e = []
Expand Down
6 changes: 3 additions & 3 deletions examples/erc20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
Expand All @@ -17,7 +17,7 @@ mini-alloc.workspace = true
alloy.workspace = true
eyre.workspace = true
tokio.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true

[features]
e2e = []
Expand Down
6 changes: 3 additions & 3 deletions examples/erc721-consecutive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
alloy-sol-types.workspace = true
stylus-sdk.workspace = true
Expand All @@ -16,7 +16,7 @@ mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true
rand.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions examples/erc721-metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true
rand.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions examples/erc721/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true
rand.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions examples/merkle-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
publish = false
version = "0.0.0"
version.workspace = true

[dependencies]
openzeppelin-crypto = { path = "../../lib/crypto" }
openzeppelin-crypto.workspace = true
alloy-primitives.workspace = true
alloy-sol-types.workspace = true
stylus-sdk.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions examples/ownable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ publish = false
version = "0.0.0"

[dependencies]
openzeppelin-stylus = { path = "../../contracts" }
openzeppelin-stylus.workspace = true
alloy-primitives.workspace = true
stylus-sdk.workspace = true
stylus-proc.workspace = true
mini-alloc.workspace = true

[dev-dependencies]
alloy.workspace = true
e2e = { path = "../../lib/e2e" }
e2e.workspace = true
tokio.workspace = true
eyre.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
version = "0.1.0-rc"
version.workspace = true

[dependencies]
mini-alloc.workspace = true
Expand Down
Loading

0 comments on commit 4cbbeb7

Please sign in to comment.