Skip to content

Commit

Permalink
Feat: update rust version to 1.74.1 and update dependencies (#68)
Browse files Browse the repository at this point in the history
* formatting Cargo.tomls

* Change workspace dependencies

* Fix CI

---------

Co-authored-by: Oleksandr Anyshchenko <[email protected]>
  • Loading branch information
mrLSD and aleksuss authored Dec 12, 2023
1 parent 92613ba commit 3dc55b8
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 37 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install cargo-make
run: cargo make -V || cargo install cargo-make
- name: Run cargo fmt
run: cargo make check-fmt
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install cargo-make
run: cargo make -V || cargo install cargo-make
- name: Run Contract cargo lint checker
run: cargo make check
15 changes: 5 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,25 @@ name: Tests
jobs:
test:
name: Test suite (mainnet)
runs-on: [self-hosted, heavy]
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v2
- name: Restore cache
run: |
cache-util restore cargo_git cargo_registry sandbox:${{ env.NEAR_SANDBOX_BIN_PATH }}
uses: actions/checkout@v4
- name: Install cargo-make
run: cargo make -V || cargo install cargo-make
- name: Install sandbox
run: |
if [[ ! -f ${{ env.NEAR_SANDBOX_BIN_PATH }} ]]; then
rm -rf nearcore
git clone --depth 1 --branch 1.35.0 https://github.com/near/nearcore
cd nearcore
make sandbox-release
cp target/release/near-sandbox $HOME/bin/
cache-util save sandbox:${{ env.NEAR_SANDBOX_BIN_PATH }}
cp target/release/near-sandbox ${{ env.NEAR_SANDBOX_BIN_PATH }}
cd ../
rm -rf nearcore
fi
- name: Test mainnet
run: cargo make --profile mainnet test
- name: Save cache
run: |
cache-util save cargo_git cargo_registry

env:
NEAR_SANDBOX_BIN_PATH: /usr/local/bin/near-sandbox
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ license = "CC0 1.0"

[workspace.dependencies]
aurora-engine-types = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "develop", default-features = false }
near-sdk = "4.1"
near-primitives = "0.17"
near-contract-standards = "4.1"
byte-slice-cast = "1"

[patch.crates-io]
parity-secp256k1 = { git = 'https://github.com/paritytech/rust-secp256k1', rev = "d05fd8e" }
Expand Down
23 changes: 12 additions & 11 deletions eth-connector-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
[package]
name = "aurora-eth-connector-tests"
version .workspace= true
author.workspaces = true
edition.workspaces = true
version.workspace = true
authors.workspace = true
edition.workspace = true
description = ""
documentation = ""
readme = true
homepage.workspaces = true
repository.workspaces = true
license.workspaces = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
publish = false
autobenches = false

[dev-dependencies]
aurora-eth-connector = { path = "../eth-connector" }
aurora-engine-types = { workspace = true, features = ["impl-serde"] }
near-sdk.workspace = true
near-primitives.workspace = true
near-contract-standards.workspace = true
byte-slice-cast.workspace = true

anyhow = "1.0"
near-sdk = "4.1"
near-primitives = "0.17"
near-units = "0.2"
near-contract-standards = "4.1"
tokio = { version = "1", features = ["full"] }
workspaces = "0.7.0"
byte-slice-cast = "1.2"
hex = "0.4.3"
ethabi = "18.0"
rlp = { version = "0.5.0", default-features = false }
Expand Down
25 changes: 13 additions & 12 deletions eth-connector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
[package]
name = "aurora-eth-connector"
version .workspace= true
author.workspaces = true
edition.workspaces = true
version.workspace = true
authors.workspace = true
edition.workspace = true
description = "Aurora Eth Connector NEAR contract"
documentation = ""
readme = true
homepage.workspaces = true
repository.workspaces = true
license.workspaces = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
publish = false
autobenches = false

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
aurora-engine-types = { worspace = true, features = ["impl-serde", "borsh-compat"] }
byte-slice-cast = "1"
aurora-engine-types = { workspace = true, features = ["impl-serde", "borsh-compat"] }
near-contract-standards.workspace = true
near-sdk.workspace = true
byte-slice-cast.workspace = true

ethabi = { version = "18", default-features = false }
hex = "0.4"
near-contract-standards = "4.1"
near-sdk = "4.1"
rlp = "0.5"
serde = "1"
serde_json = "1"
Expand All @@ -32,7 +33,7 @@ rand = "0.8"
[features]
log = []
integration-test = ["log"]
# Currently feature `mainnet` used only for
# Currently feature `mainnet` used only for
# Makefile.toml profiles to indicate basic features
mainnet = ["log"]
migration = ["log"]
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[toolchain]
channel = "1.74.1"
components = ["minimal", "rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]

0 comments on commit 3dc55b8

Please sign in to comment.