Skip to content

Commit

Permalink
Merge pull request #2 from aurora-is-near/feat/use-near-standard-nep1…
Browse files Browse the repository at this point in the history
…41-implementation

Refactor with NEAR standard NEP141
  • Loading branch information
mrLSD authored Jan 5, 2023
2 parents 0f147b0 + 1092914 commit c6f7359
Show file tree
Hide file tree
Showing 34 changed files with 565 additions and 1,981 deletions.
4 changes: 2 additions & 2 deletions .env/custom_example.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#
# Simply remove the prefixed `#` to enable them.

# The cargo features should either be `mainnet`, `testnet` or something extra in order to make use
# The cargo features should either be `mainnet`, `default` or something extra in order to make use
# of your own custom features.
#CARGO_FEATURES_BUILD = "mainnet"

# The cargo test features are used to build a test environment version of the fungible-token WASM and test
# library. Either use `mainnet-test`, `testnet-test` or something extra in order to make use of your
# library. Either use something extra in order to make use of your
# own custom features.
#CARGO_FEATURES_BUILD_TEST = "mainnet,integration-test"

Expand Down
2 changes: 1 addition & 1 deletion .env/local.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CARGO_FEATURES_BUILD = "testnet"
CARGO_FEATURES_BUILD = "mainnet"
RUSTC_FLAGS_BUILD = "-C link-arg=-s"
NEAR_EVM_ACCOUNT = "aurora.test.near"
WASM_FILE = "aurora-eth-connector-local.wasm"
Expand Down
2 changes: 1 addition & 1 deletion .env/mainnet.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CARGO_FEATURES_BUILD = "mainnet"
CARGO_FEATURES_BUILD_MIGRATION = "mainnet,migration"
CARGO_FEATURES_BUILD_TEST = "mainnet,integration-test,migration"
CARGO_FEATURES_TEST = "mainnet-test"
CARGO_FEATURES_TEST = ""
RUSTC_FLAGS_BUILD = "-C link-arg=-s"
NEAR_EVM_ACCOUNT = "aurora"
WASM_FILE = "aurora-eth-connector-mainnet.wasm"
Expand Down
8 changes: 4 additions & 4 deletions .env/testnet.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CARGO_FEATURES_BUILD = "testnet"
CARGO_FEATURES_BUILD_MIGRATION = "testnet,migration"
CARGO_FEATURES_BUILD_TEST = "testnet,integration-test,migration"
CARGO_FEATURES_TEST = "testnet-test"
CARGO_FEATURES_BUILD = "mainnet"
CARGO_FEATURES_BUILD_MIGRATION = "mainnet,migration"
CARGO_FEATURES_BUILD_TEST = "mainnet,integration-test,migration"
CARGO_FEATURES_TEST = ""
RUSTC_FLAGS_BUILD = "-C link-arg=-s"
NEAR_EVM_ACCOUNT = "aurora"
WASM_FILE = "aurora-eth-connector-testnet.wasm"
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ jobs:
steps:
- name: Clone the repository
uses: actions/checkout@v2
- name: Run Contract cargo clippy
run: cargo make clippy
- name: Run cargo clippy
run: cargo clippy

- name: Run Contract cargo lint checker
run: cargo make check
16 changes: 2 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@ on:
name: Tests
jobs:
test:
name: Test suite (mainnet, testnet)
name: Test suite (mainnet)
runs-on: [self-hosted, heavy]
steps:
- name: Clone the repository
uses: actions/checkout@v2
- name: Restore cache
run: |
cache-util restore cargo_git cargo_registry sccache yarn_cache
cache-util restore aurora-contract-target@generic@${{ hashFiles('**/Cargo.lock') }}:target
- name: Build mainnet test WASM
run: cargo make --profile mainnet build-test
- name: Test mainnet
run: cargo make --profile mainnet test-workspace
- name: Build testnet test WASM
run: cargo make --profile testnet build-test
- name: Test testnet
run: cargo make --profile testnet test-workspace
- name: Save cache
run: |
cache-util save cargo_git cargo_registry sccache yarn_cache
cache-util msave aurora-contract-target@generic@${{ hashFiles('**/Cargo.lock') }}:target

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTC_WRAPPER: sccache
24 changes: 19 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ category = "Test"
command = "${CARGO}"
args = [
"test",
# "test_migration",
"--features",
"${CARGO_FEATURES_TEST}",
"--",
"--test-threads=4",
"--nocapture"
]

Expand Down
8 changes: 3 additions & 5 deletions eth-connector-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aurora-eth-connector-tests"
version = "0.1.0"
version = "0.2.0"
authors = ["Aurora Labs <[email protected]>", "Evgeny Ukhanov <[email protected]>"]
edition = "2021"
description = ""
Expand All @@ -19,15 +19,13 @@ anyhow = "1.0"
near-sdk = "4.0"
near-primitives = "0.5"
near-units = "0.2"
near-contract-standards = "4.1"
tokio = { version = "1.14", features = ["full"] }
workspaces = "0.6"
workspaces = "0.7.0"
byte-slice-cast = "1.2"
hex = "0.4.3"
ethabi = "17.1"
rlp = { version = "0.5.0", default-features = false }
aurora-engine-migration-tool = { git = "https://github.com/aurora-is-near/aurora-engine-migration-tool.git" }

[features]
mainnet-test = []
testnet-test = []

Loading

0 comments on commit c6f7359

Please sign in to comment.