Skip to content

Commit

Permalink
chore: increase clippy lints level and tiny refactoring (#27)
Browse files Browse the repository at this point in the history
* chore: increase clippy lints level and tiny refactoring

* chore: fix tests

* chore: fix lints
  • Loading branch information
aleksuss authored May 3, 2023
1 parent 900d0bf commit 9596308
Show file tree
Hide file tree
Showing 17 changed files with 1,712 additions and 666 deletions.
1,799 changes: 1,404 additions & 395 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Lints](https://github.com/aurora-is-near/aurora-fungible-token/actions/workflows/lints.yml/badge.svg)](https://github.com/aurora-is-near/aurora-fungible-token/actions/workflows/lints.yml)
[![Tests](https://github.com/aurora-is-near/aurora-fungible-token/actions/workflows/tests.yml/badge.svg)](https://github.com/aurora-is-near/aurora-fungible-token/actions/workflows/tests.yml)

Aurora Eth Connecotr - Fungible Token implementation is the smart contract on the NEAR Protocol for
Aurora Eth Connecotr - Fungible Token implementation is the smart contract on the NEAR Protocol for
[Aurora Engine](https://github.com/aurora-is-near/aurora-engine).
It is implementation for [NEP-141](https://nomicon.io/Standards/Tokens/FungibleToken/Core).

Expand All @@ -25,10 +25,12 @@ cargo install --force cargo-make
#### Running unit & integration tests

To run tests, there are a few cargo make tasks we can run:

- `test`, tests the whole cargo workspace and ETH contracts. Requires a
`--profile` argument.

For example, the following will test the whole workspace and ETH contracts:

```sh
cargo make --profile mainnet test
```
Expand All @@ -38,6 +40,7 @@ cargo make --profile mainnet test
Every task with `cargo make` must have a `--profile` argument.

The current available `profile`s are:

- `mainnet`, suitable for mainnet.
- `testnet`, suitable for testnet.
- `local`, suitable for local development.
Expand All @@ -49,6 +52,7 @@ other `.env` files. See `bin/local-custom.env` for more details.

Every make most follow the following pattern, though `--profile` is not required
for all such as cleanup:

```sh
cargo make [--profile <profile>] <task>
```
Expand All @@ -58,6 +62,7 @@ cargo make [--profile <profile>] <task>
To build the binaries there are a few commands to do such following the format.

The current available build `task`s are:

- `default`, does not need to be specified, runs `build`. Requires a `--profile`
argument.
- `build`, builds smart contract and produces the
Expand All @@ -69,22 +74,26 @@ The current available build `task`s are:
`aurora-<profile>.wasm` in the `bin` folder.

For example, the following will build the mainnet debug binary:

```sh
cargo make --profile mainnet build
```

#### Running checks & lints

To run lints and checks, the following tasks are available:

- `check`, checks the format, clippy and ETH contracts.
- `check-fmt`, checks the workspace Rust format only.
- `check-clippy`, checks the Rust workspace with clippy only.

For example the following command will run the checks. `profile` is not required
here:
```

```sh
cargo make check
```

## License
**aurora-eth-connector** has [**CCO-1.0** license](LICENSE)

**aurora-eth-connector** has [**CCO-1.0** license](LICENSE)
6 changes: 3 additions & 3 deletions eth-connector-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ autobenches = false

[dev-dependencies]
aurora-eth-connector = { path = "../eth-connector" }
aurora-engine-types = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "develop", default-features = false, features = ["impl-serde"] }
aurora-engine-types = { git = "https://github.com/aurora-is-near/aurora-engine.git", tag = "2.9.0", default-features = false, features = ["impl-serde"] }
anyhow = "1.0"
near-sdk = "4.0"
near-primitives = "0.5"
near-primitives = "0.16"
near-units = "0.2"
near-contract-standards = "4.1"
tokio = { version = "1.24", features = ["full"] }
tokio = { version = "1", features = ["full"] }
workspaces = "0.7.0"
byte-slice-cast = "1.2"
hex = "0.4.3"
Expand Down
Loading

0 comments on commit 9596308

Please sign in to comment.