difftreelog
ci fix js-packages paths
in: master
18 files changed
.github/workflows/collator-selection.ymldiffbeforeafterboth--- a/.github/workflows/collator-selection.yml
+++ b/.github/workflows/collator-selection.yml
@@ -181,7 +181,7 @@
yarn add mochawesome
# Wanted by both wait_for_first_block
# export RPC_URL="${RELAY_SAPPHIRE_HTTP_URL:-${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}}"
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
env:
.github/workflows/forkless-update-data.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-data.yml
+++ b/.github/workflows/forkless-update-data.yml
@@ -146,19 +146,19 @@
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})
- name: "Reconcile: runtime is upgraded"
- working-directory: tests
+ working-directory: js-packages/tests
run: |
yarn
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Executing upgrade"
- yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
+ yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
- name: Run Parallel tests after forkless upgrade
- working-directory: tests
+ working-directory: js-packages/tests
run: |
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
@@ -166,7 +166,7 @@
- name: Run Sequential tests after forkless upgrade
if: success() || failure()
- working-directory: tests
+ working-directory: js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -161,19 +161,19 @@
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
- name: "Reconcile: runtime is upgraded"
- working-directory: tests
+ working-directory: js-packages/tests
run: |
yarn
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Executing upgrade"
- yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
+ yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
- name: Run Parallel tests after forkless upgrade
- working-directory: tests
+ working-directory: js-packages/tests
run: |
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
@@ -181,7 +181,7 @@
- name: Run Sequential tests after forkless upgrade
if: success() || failure()
- working-directory: tests
+ working-directory: js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
.github/workflows/governance.ymldiffbeforeafterboth--- a/.github/workflows/governance.yml
+++ b/.github/workflows/governance.yml
@@ -86,7 +86,7 @@
run: |
yarn install
yarn add mochawesome
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
.github/workflows/make-bench.ymldiffbeforeafterboth--- a/.github/workflows/make-bench.yml
+++ b/.github/workflows/make-bench.yml
@@ -43,16 +43,15 @@
time make bench
- name: Run node dev mode in background
- working-directory: ./
run: |
./target/release/unique-collator --dev &
- name: RUN Calibrate
- working-directory: ./tests
+ working-directory: js-packages/scripts
run: |
- yarn install
- yarn ts-node --esm src/calibrate.ts
- yarn ts-node --esm src/calibrateApply.ts
+ yarn
+ yarn ts-node --esm calibrate.ts
+ yarn ts-node --esm calibrateApply.ts
- name: show git diff
run: |
.github/workflows/market-test.ymldiffbeforeafterboth--- a/.github/workflows/market-test.yml
+++ b/.github/workflows/market-test.yml
@@ -119,10 +119,10 @@
# Temporary disable node readyness check. Have to dig into the script logic.
# - name: Wait for chain up and running
-# working-directory: tests
+# working-directory: js-packages/tests
# run: |
# yarn install
-# ./scripts/wait_for_first_block.sh
+# ../scripts/wait_for_first_block.sh
# echo "Ready to start tests"
# env:
# RPC_URL: http://127.0.0.1:9944/
.github/workflows/node-only-update.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -170,6 +170,7 @@
run: |
yarn
yarn add mochawesome
+ # TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
@@ -197,7 +198,7 @@
- name: Ensure network is alive
if: success()
run: |
- ./tests/scripts/wait_for_first_block.sh
+ ./js-packages/scripts/wait_for_first_block.sh
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
@@ -217,6 +218,7 @@
run: |
yarn install
yarn add mochawesome
+ # TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
.github/workflows/polkadot-types.ymldiffbeforeafterboth--- a/.github/workflows/polkadot-types.yml
+++ b/.github/workflows/polkadot-types.yml
@@ -74,13 +74,13 @@
# run: sudo apt install jq -y
- name: Run generate_types_package script
- working-directory: tests
+ working-directory: js-packages
run: |
yarn install
- /bin/bash ./scripts/generate_types/wait_for_first_block.sh
+ ./scripts/wait_for_first_block.sh
git config --global user.name "Unique"
git config --global user.email github-actions@usetech.com
- /bin/bash ./scripts/generate_types/generate_types_package.sh --release ${{ matrix.usage }} --push
+ ./scripts/generate_types/generate_types_package.sh --release ${{ matrix.usage }} --push
env:
RPC_URL: http://127.0.0.1:9944/
.github/workflows/xcm.ymldiffbeforeafterboth--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -327,22 +327,22 @@
retention-days: 2
- name: Yarn install
- working-directory: tests
+ working-directory: js-packages/tests
run: |
yarn install
yarn add mochawesome
- name: Call HRMP initialization
- working-directory: tests
+ working-directory: js-packages/tests
run: |
- yarn ts-node --esm src/util/createHrmp.ts ${{matrix.network}}
+ yarn ts-node --esm util/createHrmp.ts ${{matrix.network}}
- name: Run XCM tests
working-directory: js-packages/tests
run: |
# Wanted by both wait_for_first_block
export RPC_URL="${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}"
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
.github/workflows/yarn-dev.ymldiffbeforeafterboth--- a/.github/workflows/yarn-dev.yml
+++ b/.github/workflows/yarn-dev.yml
@@ -66,7 +66,7 @@
run: |
yarn install
yarn add mochawesome
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
@@ -90,13 +90,13 @@
working-directory: js-packages/scripts
run: |
yarn install
- npx ts-node --esm ./src/benchmarks/mintFee/index.ts
+ npx ts-node --esm ./benchmarks/mintFee/index.ts
- name: Run benchmark opsFee tests
working-directory: js-packages/scripts
run: |
yarn install
- npx ts-node --esm ./src/benchmarks/opsFee/index.ts
+ npx ts-node --esm ./benchmarks/opsFee/index.ts
- name: Stop running containers
if: always() # run this step always
Makefilediffbeforeafterboth1.PHONY: _help2_help:3 @echo "regenerate_solidity - generate stubs/interfaces for contracts defined in native (via evm-coder)"4 @echo "evm_stubs - recompile contract stubs and ABI"5 @echo "bench - run frame-benchmarking"6 @echo " bench-evm-migration"7 @echo " bench-unique"89NATIVE_FUNGIBLE_EVM_STUBS=./pallets/balances-adapter/src/stubs10NATIVE_FUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/nativeFungible.json1112FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs13FUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/fungible.json1415NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs16NONFUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/nonFungible.json1718REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs19REFUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/reFungible.json20REFUNGIBLE_TOKEN_EVM_ABI=./js-packages/tests/src/eth/abi/reFungibleToken.json2122CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/23CONTRACT_HELPERS_ABI=./js-packages/tests/src/eth/abi/contractHelpers.json2425COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/26COLLECTION_HELPER_ABI=./js-packages/tests/src/eth/abi/collectionHelpers.json2728TESTS_API=./js-packages/tests/src/eth/api/2930.PHONY: regenerate_solidity31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol3233UniqueNativeFungible.sol:34 PACKAGE=pallet-balances-adapter NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh35 PACKAGE=pallet-balances-adapter NAME=erc::gen_impl OUTPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh36 37UniqueFungible.sol:38 PACKAGE=pallet-fungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh39 PACKAGE=pallet-fungible NAME=erc::gen_impl OUTPUT=$(FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4041UniqueNFT.sol:42 PACKAGE=pallet-nonfungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh43 PACKAGE=pallet-nonfungible NAME=erc::gen_impl OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4445UniqueRefungible.sol:46 PACKAGE=pallet-refungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh47 PACKAGE=pallet-refungible NAME=erc::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4849UniqueRefungibleToken.sol:50 PACKAGE=pallet-refungible NAME=erc_token::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh51 PACKAGE=pallet-refungible NAME=erc_token::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5253ContractHelpers.sol:54 PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh55 PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_impl OUTPUT=$(CONTRACT_HELPERS_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5657CollectionHelpers.sol:58 PACKAGE=pallet-unique NAME=eth::collection_helper_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh59 PACKAGE=pallet-unique NAME=eth::collection_helper_impl OUTPUT=$(COLLECTION_HELPER_STUBS)/$@ ./.maintain/scripts/generate_sol.sh6061UniqueNativeFungible: UniqueNativeFungible.sol62 INPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/UniqueNativeFungible.raw ./.maintain/scripts/compile_stub.sh63 INPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NATIVE_FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh64 65UniqueFungible: UniqueFungible.sol66 INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_STUBS)/UniqueFungible.raw ./.maintain/scripts/compile_stub.sh67 INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6869UniqueNFT: UniqueNFT.sol70 INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/UniqueNFT.raw ./.maintain/scripts/compile_stub.sh71 INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh7273UniqueRefungible: UniqueRefungible.sol74 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungible.raw ./.maintain/scripts/compile_stub.sh75 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh7677UniqueRefungibleToken: UniqueRefungibleToken.sol78 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungibleToken.raw ./.maintain/scripts/compile_stub.sh79 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_TOKEN_EVM_ABI) ./.maintain/scripts/generate_abi.sh8081ContractHelpers: ContractHelpers.sol82 INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_STUBS)/ContractHelpers.raw ./.maintain/scripts/compile_stub.sh83 INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_ABI) ./.maintain/scripts/generate_abi.sh8485CollectionHelpers: CollectionHelpers.sol86 INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_STUBS)/CollectionHelpers.raw ./.maintain/scripts/compile_stub.sh87 INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_ABI) ./.maintain/scripts/generate_abi.sh8889evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers9091# TODO: Create benchmarking profile, make it a proper dependency92.PHONY: benchmarking-node93benchmarking-node:94 cargo build --profile production --features runtime-benchmarks9596define _bench =97.PHONY: bench-$(1)98bench-$(1): benchmarking-node99 ./target/production/unique-collator \100 benchmark pallet --pallet pallet-$(1) \101 --wasm-execution compiled --extrinsic '*' \102 $(if $(4),$(4),--template=.maintain/frame-weight-template.hbs) --steps=50 --repeat=80 --heap-pages=4096 \103 --output=$$(if $(3),$(3),./pallets/$(if $(2),$(2),$(1))/src/weights.rs)104endef105106# _bench,pallet,(pallet_dir|),(output|),(extra|)107$(eval $(call _bench,evm-migration))108$(eval $(call _bench,configuration))109$(eval $(call _bench,common))110$(eval $(call _bench,unique))111$(eval $(call _bench,fungible))112$(eval $(call _bench,refungible))113$(eval $(call _bench,nonfungible))114$(eval $(call _bench,structure))115$(eval $(call _bench,foreign-assets))116$(eval $(call _bench,collator-selection))117$(eval $(call _bench,identity))118$(eval $(call _bench,app-promotion))119$(eval $(call _bench,maintenance))120$(eval $(call _bench,xcm,,./runtime/common/weights/xcm.rs,"--template=.maintain/external-weight-template.hbs"))121122.PHONY: bench123bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity124125.PHONY: check126check:127 SKIP_WASM_BUILD=1 cargo check --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests128129.PHONY: clippy130clippy:131 cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests132133.PHONY: git-hooks134git-hooks:135 cp .githooks/pre-commit .git/hooks/pre-commit136137.PHONY: git-blame138git-blame:139 git config blame.ignoreRevsFile .git-blame-ignore-revs140141.PHONY: init142init:143 make git-hooks144 cd tests145 yarn installdoc/separate_rpc.mddiffbeforeafterboth--- a/doc/separate_rpc.md
+++ b/doc/separate_rpc.md
@@ -77,7 +77,7 @@
* runtime/quartz/Cargo.toml
* runtime/unique/Cargo.toml
-7. Create tests/src/interfaces/ModuleName/definitions.ts and describe the necessary methods in it.
+7. Create js-packages/types/ModuleName/definitions.ts and describe the necessary methods in it.
```ts
type RpcParam = {
name: string;
@@ -105,19 +105,19 @@
};
```
-8. Describe definitions from paragraph 7 in tests/src/interfaces/definitions.ts.
+8. Describe definitions from paragraph 7 in js-packages/types/definitions.ts.
```ts
export {default as ModuleName} from './module/definitions';
```
-9. tests/src/substrate/substrate-api.ts
+9. js-packages/tests/substrate/substrate-api.ts
* Set the RPC interface in the `defaultApiOptions` function, add an entry in the `rpc` parameter
```ts
module: defs.module.rpc,
```
-10. tests/src/util/playgrounds/unique.dev.ts
+10. js-packages/playgrounds/unique.dev.ts
* Specify RPC interface in `connect` function, add entry in `rpc` parameter
```ts
module: defs.module.rpc,
- ```
\ No newline at end of file
+ ```
js-packages/.dockerignorediffbeforeafterboth--- a/js-packages/.dockerignore
+++ b/js-packages/.dockerignore
@@ -1,2 +1 @@
node_modules/
-Dockerfile-tests
js-packages/Dockerfile-testsdiffbeforeafterboth--- a/js-packages/Dockerfile-tests
+++ /dev/null
@@ -1,38 +0,0 @@
-# ===== Integration Tests ======
-
-
-FROM ubuntu:22.04
-LABEL maintainer="UniqueNetwork.io"
-
-RUN apt -y update; apt -y upgrade; apt -y install curl
-
-
-RUN mkdir unique_parachain
-WORKDIR /unique_parachain
-
-RUN apt-get -y update && \
- apt-get -y upgrade && \
- apt-get -y install curl jq && \
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \
- export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- nvm install v16.2.0 && \
- nvm alias default v16.2.0 && \
- nvm use default
-
-ENV YARN_CACHE_FOLDER ~/.yarn
-
-COPY package.json yarn.lock ./
-
-RUN export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- npm install --global yarn && \
- yarn add mochawesome && \
- yarn --pure-lockfile
-
-COPY . .
-
-CMD export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- ./scripts/wait_for_first_block.sh && \
- NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
js-packages/scripts/benchmarks/mintFee/index.tsdiffbeforeafterboth--- a/js-packages/scripts/benchmarks/mintFee/index.ts
+++ b/js-packages/scripts/benchmarks/mintFee/index.ts
@@ -14,23 +14,23 @@
export const CONTRACT_IMPORT: ContractImports[] = [
{
- fsPath: `${dirname}/../../../../tests/eth/api/CollectionHelpers.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/CollectionHelpers.sol`,
solPath: 'eth/api/CollectionHelpers.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/ContractHelpers.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/ContractHelpers.sol`,
solPath: 'eth/api/ContractHelpers.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueRefungibleToken.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungibleToken.sol`,
solPath: 'eth/api/UniqueRefungibleToken.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueRefungible.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungible.sol`,
solPath: 'eth/api/UniqueRefungible.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueNFT.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueNFT.sol`,
solPath: 'eth/api/UniqueNFT.sol',
},
];
js-packages/scripts/package.jsondiffbeforeafterboth--- a/js-packages/scripts/package.json
+++ b/js-packages/scripts/package.json
@@ -14,10 +14,10 @@
"tslib": "^2.6.2"
},
"scripts": {
- "benchMintingFee": "ts-node src/benchmarks/mintFee/benchmark.ts",
- "loadTransfer": "ts-node src/transfer.nload.ts",
- "generateEnv": "ts-node --esm ./src/generateEnv.ts",
- "propose-upgrade": "ts-node --esm ./src/proposeupgrade.ts",
- "propose-fast-track": "ts-node --esm ./src/proposefasttrack.ts"
+ "benchMintingFee": "ts-node benchmarks/mintFee/benchmark.ts",
+ "loadTransfer": "ts-node transfer.nload.ts",
+ "generateEnv": "ts-node --esm ./generateEnv.ts",
+ "propose-upgrade": "ts-node --esm ./proposeupgrade.ts",
+ "propose-fast-track": "ts-node --esm ./proposefasttrack.ts"
}
}
js-packages/scripts/wait_for_first_block.shdiffbeforeafterboth--- /dev/null
+++ b/js-packages/scripts/wait_for_first_block.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+DIR=$(dirname "$0")
+
+. "$DIR/functions.sh"
+
+last_block_id=0
+block_id=0
+function get_block {
+ block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)
+ block_id=$((block_id_hex))
+ echo Id = $block_id
+}
+
+function had_new_block {
+ last_block_id=$block_id
+ get_block
+ if (( last_block_id != 0 && block_id > last_block_id )); then
+ return 0
+ fi
+ return 1
+}
+
+function reset_check {
+ last_block_id=0
+ block_id=0
+}
+
+while ! had_new_block; do
+ echo "Waiting for next block..."
+ sleep 12
+done
+reset_check
+
+echo "Chain is running, but lets wait for another block after a minute, to avoid startup flakiness."
+sleep 60
+
+while ! had_new_block; do
+ echo "Waiting for another block..."
+ sleep 12
+done
+
+echo "Chain is running!"
js-packages/tests/package.jsondiffbeforeafterboth--- a/js-packages/tests/package.json
+++ b/js-packages/tests/package.json
@@ -26,6 +26,10 @@
"_test": "yarn setup && mocha --timeout 9999999 --loader=ts-node/esm.mjs",
"_testParallel": "yarn setup && mocha --timeout 9999999 --parallel --loader=ts-node/esm.mjs",
"test": "yarn _test './**/*.*test.ts'",
+ "testParallel": "yarn _testParallel './**/*.test.ts'",
+ "testSequential": "yarn _test './**/*.seqtest.ts'",
+ "testGovernance": "RUN_GOV_TESTS=1 yarn _test ./**/governance/*.*test.ts",
+ "testCollators": "RUN_COLLATOR_TESTS=1 yarn _test ./**/collator-selection/**.*test.ts --timeout 49999999",
"load": "yarn _test './**/*.load.ts'"
}
}