Skip to content

Commit

Permalink
Merge branch 'main' into feat/ERC721RoyaltyExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
bidzyyys authored Feb 11, 2025
2 parents b2be2b1 + d5876c2 commit 5610195
Show file tree
Hide file tree
Showing 72 changed files with 7,122 additions and 3,274 deletions.
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]

### Added
Expand All @@ -18,13 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed (Breaking)

-
- Extract `IAccessControl` trait from `AccessControl` contract. #527

### Fixed

-


## [v0.2.0-alpha.3] - 2025-01-30

### Added
Expand All @@ -50,7 +48,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add full support for reentrancy (changed `VestingWallet` signature for some functions). #407
- `Nonce::use_nonce` panics on exceeding `U256::MAX`. #467


## [v0.2.0-alpha.2] - 2024-12-18

### Added
Expand All @@ -74,7 +71,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Update internal functions of `Erc721` and `Erc721Consecutive` to accept a reference to `Bytes`. #437


## [v0.2.0-alpha.1] - 2024-11-15

### Added
Expand Down
13 changes: 9 additions & 4 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ default-members = [
"examples/ecdsa",
"examples/poseidon",
]
exclude = ["fuzz"]

# Explicitly set the resolver to version 2, which is the default for packages
# with edition >= 2021.
Expand Down Expand Up @@ -121,7 +122,7 @@ proc-macro2 = "1.0.79"
quote = "1.0.35"

# test helpers
motsu = "0.3.0"
motsu = "0.4.0"

# members
openzeppelin-stylus = { path = "contracts" }
Expand Down
33 changes: 29 additions & 4 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,25 @@ Some other examples of automation are:

Always check your code with the linter (`clippy`), by running:

$ cargo clippy --tests --all-features
```shell
cargo clippy --tests --all-features
```

And make sure your code is formatted with, using:

$ cargo +nightly fmt
```shell
cargo +nightly fmt
```

Finally, ensure there is no trailing whitespace anywhere.

### Running tests

Make sure all tests are passing with:

$ cargo test --all-features
```shell
cargo test --all-features
```

### Running end-to-end tests

Expand All @@ -241,12 +247,31 @@ Then you will be able to run e2e tests:
./scripts/e2e-tests.sh
```

### Running fuzz tests

To run fuzz tests, you need to have [cargo-fuzz] installed.
Then from the root of the project you can use `cargo fuzz list` to view the list of all existing fuzz targets:

```shell
cargo fuzz list
```

Finally you need to run:

```shell
cargo fuzz run <fuzz target name>
```

[cargo-fuzz]: https://rust-fuzz.github.io/book/cargo-fuzz/setup.html

### Checking the docs

If you make documentation changes, you may want to check whether there are any
warnings or errors:

$ cargo doc --all-features
```shell
cargo doc --all-features
```

## Pull requests

Expand Down
6 changes: 3 additions & 3 deletions benches/src/erc721.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ pub async fn run(cache_opt: Opt) -> eyre::Result<Vec<FunctionReport>> {
let token_3 = uint!(3_U256);
let token_4 = uint!(4_U256);

let _ = receipt!(contract.mint(alice_addr, token_2))?;
let _ = receipt!(contract.mint(alice_addr, token_3))?;
let _ = receipt!(contract.mint(alice_addr, token_4))?;
receipt!(contract.mint(alice_addr, token_2))?;
receipt!(contract.mint(alice_addr, token_3))?;
receipt!(contract.mint(alice_addr, token_4))?;

// IMPORTANT: Order matters!
use Erc721::*;
Expand Down
2 changes: 1 addition & 1 deletion benches/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn cache_contract(
) -> eyre::Result<()> {
// We don't need a status code.
// Since it is not zero when the contract is already cached.
let _ = Command::new("cargo")
Command::new("cargo")
.args(["stylus", "cache", "bid"])
.args(["-e", &env("RPC_URL")?])
.args(["--private-key", &format!("0x{}", account.pk())])
Expand Down
4 changes: 2 additions & 2 deletions benches/src/vesting_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ pub async fn run(cache_opt: Opt) -> eyre::Result<Vec<FunctionReport>> {
let contract = VestingWallet::new(contract_addr, &alice_wallet);
let erc20 = Erc20::new(erc20_addr, &alice_wallet);

let _ = receipt!(contract.receiveEther().value(uint!(1000_U256)))?;
let _ = receipt!(erc20.mint(contract_addr, uint!(1000_U256)))?;
receipt!(contract.receiveEther().value(uint!(1000_U256)))?;
receipt!(erc20.mint(contract_addr, uint!(1000_U256)))?;

// IMPORTANT: Order matters!
use VestingWallet::*;
Expand Down
8 changes: 8 additions & 0 deletions contracts/proptest-regressions/utils/math/alloy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc f58ea2d53136bc78804abf3cc86633f05fad78c146b9462904fbac613cd74a2b # shrinks to x = 0, y = 0
cc eef31162ab6714625e038aa5625425e31970b3637872924e6d6ab6de8f9cc12a # shrinks to x = 6277101735386680763835789423207666416102355444464034512896, y = 6277101735386680763835789423207666416102355444464034512896
Loading

0 comments on commit 5610195

Please sign in to comment.