Skip to content

Commit

Permalink
test: add bench for nesting (#963)
Browse files Browse the repository at this point in the history
* feat: added bench for nesting

* fix: nitpicks

* fix: remove unused deps

* test(market): compilator version has been changed

* use toolchain version from .env fir codestyle wf

* fix: fmt

* chore: update `proc-macro2` dep

Updated from 1.0.59 to 1.0.63

* Fix solidity version

---------

Co-authored-by: Konstantin Astakhov <[email protected]>
Co-authored-by: Andy Smith <[email protected]>
  • Loading branch information
3 people authored Jul 11, 2023
1 parent 83605d4 commit 28d97ca
Show file tree
Hide file tree
Showing 16 changed files with 998 additions and 33 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ jobs:
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Install latest nightly
uses: dtolnay/rust-toolchain@nightly
- name: Read .env file
uses: xom9ikk/dotenv@v2
- name: Install toolchain version from .env
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo fmt
Expand Down Expand Up @@ -50,9 +53,12 @@ jobs:
- uses: actions/[email protected]
- name: Install substrate dependencies
run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler
- name: Install latest nightly
uses: dtolnay/rust-toolchain@nightly
- name: Read .env file
uses: xom9ikk/dotenv@v2
- name: Install toolchain version from .env
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo check
Expand Down
28 changes: 13 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"rust-analyzer.cargo.extraEnv": {
"SKIP_WASM_BUILD": "1"
},
"rust-analyzer.cargo.features": [
"runtime-benchmarks",
"try-runtime"
]
}
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"rust-analyzer.cargo.extraEnv": {
"SKIP_WASM_BUILD": "1"
},
"rust-analyzer.cargo.features": ["runtime-benchmarks", "try-runtime"],
"solidity.packageDefaultDependenciesDirectory": "tests/node_modules"
}
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.

2 changes: 1 addition & 1 deletion pallets/evm-coder-substrate/procedural/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn derive_predispatch(item: proc_macro::TokenStream) -> proc_macro::TokenStr
let (impl_generics, ty_generics, _where_clause) = input.generics.split_for_impl();
let ident = &input.ident;
let Data::Enum(data) = &input.data else {
return Err(Error::new_spanned(input, "PreDispatch input is enum"))
return Err(Error::new_spanned(input, "PreDispatch input is enum"));
};

let matching = data
Expand Down
5 changes: 3 additions & 2 deletions pallets/structure/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,9 @@ impl<T: Config> Pallet<T> {
if is_collection(account.as_eth()) {
fail!(<Error<T>>::CantNestTokenUnderCollection);
}
let Some((collection, token)) = T::CrossTokenAddressMapping::address_to_token(account) else {
return Ok(())
let Some((collection, token)) = T::CrossTokenAddressMapping::address_to_token(account)
else {
return Ok(());
};

let dispatch = T::CollectionDispatch::dispatch(collection)?;
Expand Down
5 changes: 4 additions & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,15 @@
"@polkadot/util-crypto": "12.2.1",
"@polkadot/wasm-crypto-asmjs": "^7.2.1",
"@polkadot/wasm-crypto-wasm": "^7.2.1",
"@rmrk-team/evm-contracts": "^1.2.1",
"@typechain/web3-v1": "^6.0.3",
"chai-as-promised": "^7.1.1",
"chai-like": "^1.1.1",
"csv-writer": "^1.6.0",
"find-process": "^1.4.7",
"lossless-json": "^2.0.9",
"solc": "0.8.17",
"solc": "0.8.18",
"typechain": "^8.2.0",
"web3": "1.10.0"
},
"resolutions": {
Expand Down
Loading

0 comments on commit 28d97ca

Please sign in to comment.